Pi-Hole Switched IP while on

Please follow the below template, it will help us to help you!

Expected Behaviour:

not to switch ip while its on.

Actual Behaviour:

it switched to a new ip address from its manually static ip
http://oi66.tinypic.com/28bdwlx.jpg

Debug Token:

This process collects information from your Pi-hole, and optionally uploads it to a unique and random directory on tricorder.pi-hole.net.

The intent of this script is to allow users to self-diagnose their installations.  This is accomplished by running tests against our software and providing the user with links to FAQ articles when a problem is detected.  Since we are a small team and Pi-hole has been growing steadily, it is our hope that this will help us spend more time on development.

NOTE: All log files auto-delete after 48 hours and ONLY the Pi-hole developers can access your data via the given token. We have taken these extra steps to secure your data and will work to further reduce any personal information gathered.

*** [ INITIALIZING ]
[i] 2018-07-09:18:40:44 debug log has been initialized.

*** [ INITIALIZING ] Sourcing setup variables
[i] Sourcing /etc/pihole/setupVars.conf...

*** [ DIAGNOSING ]: Core version
[i] Core: v3.3.1 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Branch: master
[i] Commit: v3.3.1-0-gfbee18e

*** [ DIAGNOSING ]: Web version
[i] Web: v3.3 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Branch: master
[i] Commit: v3.3-0-ge48aa29

*** [ DIAGNOSING ]: FTL version
[✓] FTL: v3.0

*** [ DIAGNOSING ]: dnsmasq version
[i] 2.75

*** [ DIAGNOSING ]: lighttpd version
[i] 1.4.35

*** [ DIAGNOSING ]: php version
[i] 7.0.30

*** [ DIAGNOSING ]: Operating system
[✓] Ubuntu 16.04.4 LTS

*** [ DIAGNOSING ]: SELinux
[i] SELinux not detected

*** [ DIAGNOSING ]: Processor
[i] x86_64

*** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the enp0s3 interface:
   192.168.1.135/24 does not match the IP found in /etc/pihole/setupVars.conf (https://discourse.pi-hole.net/t/use-ipv6-ula-addresses-for-pi-hole/2127)

[✓] IPv6 address(es) bound to the enp0s3 interface:
   fe80::2a0:98ff:fe49:99f3 does not match the IP found in /etc/pihole/setupVars.conf (https://discourse.pi-hole.net/t/use-ipv6-ula-addresses-for-pi-hole/2127)

   ^ Please note that you may have more than one IP address listed.
   As long as one of them is green, and it matches what is in /etc/pihole/setupVars.conf, there is no need for concern.

   The link to the FAQ is for an issue that sometimes occurs when the IPv6 address changes, which is why we check for it.

[i] Default IPv4 gateway: 192.168.1.1
   * Pinging 192.168.1.1...
[✓] Gateway responded.

*** [ DIAGNOSING ]: Ports in use
[] is in use by 
[22] is in use by sshd
[53] is in use by dnsmasq
[80] is in use by lighttpd
[4711] is in use by pihole-FTL

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] chaseonlinebanking1.world is 192.168.1.101 via localhost (127.0.0.1)
[✗] Failed to resolve chaseonlinebanking1.world via Pi-hole (192.168.1.101)
[✓] doubleclick.com is 172.217.5.78 via a remote, public DNS server (8.8.8.8)

*** [ DIAGNOSING ]: Pi-hole processes
[✓] dnsmasq daemon is active
[✓] lighttpd daemon is active
[✓] pihole-FTL daemon is active

*** [ DIAGNOSING ]: Setup variables
    PIHOLE_INTERFACE=enp0s3
    IPV4_ADDRESS=192.168.1.101/24
    IPV6_ADDRESS=
    PIHOLE_DNS_1=72.235.80.12
    PIHOLE_DNS_2=72.235.80.4
    QUERY_LOGGING=true
    INSTALL_WEB=true
    LIGHTTPD_ENABLED=1
    DNSMASQ_LISTENING=single

*** [ DIAGNOSING ]: Dashboard and block page
[✓] X-Pi-hole: A black hole for Internet advertisements.
[✓] X-Pi-hole: The Pi-hole Web interface is working!

*** [ DIAGNOSING ]: Gravity list
-rw-r--r-- 1 root root 4868979 Jul  8 11:41 /etc/pihole/gravity.list
   -----head of gravity.list------
   192.168.1.101 0.0.0.0
   192.168.1.101 0.r.msn.com
   192.168.1.101 0.start.bz
   192.168.1.101 000.0x1f4b0.com

   -----tail of gravity.list------
   192.168.1.101 zzz.clickbank.net
   192.168.1.101 zzzezeroe.fr
   192.168.1.101 zzzpooeaz-france.com
   192.168.1.101 zzzrtrcm2.com

*** [ DIAGNOSING ]: contents of /etc/pihole

-rw-r--r-- 1 root root 633 Jul  8 11:41 /etc/pihole/adlists.default
   https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
   https://mirror1.malwaredomains.com/files/justdomains
   http://sysctl.org/cameleon/hosts
   https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
   https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
   https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
   https://hosts-file.net/ad_servers.txt

-rw-r--r-- 1 root root 633 Jul  8 11:41 /etc/pihole/adlists.list
   https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
   https://mirror1.malwaredomains.com/files/justdomains
   http://sysctl.org/cameleon/hosts
   https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
   https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
   https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
   https://hosts-file.net/ad_servers.txt

-rw-r--r-- 1 root root 43 Jul  8 11:41 /etc/pihole/local.list
   192.168.1.101 PiHole
   192.168.1.101 pi.hole

-rw-r--r-- 1 root root 238 Jul  8 11:41 /etc/pihole/logrotate
   /var/log/pihole.log {
   	su root syslog
   	daily
   	copytruncate
   	rotate 5
   	compress
   	delaycompress
   	notifempty
   	nomail
   }
   /var/log/pihole-FTL.log {
   	su root syslog
   	weekly
   	copytruncate
   	rotate 3
   	compress
   	delaycompress
   	notifempty
   	nomail
   }

*** [ DIAGNOSING ]: contents of /etc/dnsmasq.d

-rw-r--r-- 1 root root 1519 Jul  8 12:22 /etc/dnsmasq.d/01-pihole.conf
   addn-hosts=/etc/pihole/gravity.list
   addn-hosts=/etc/pihole/black.list
   addn-hosts=/etc/pihole/local.list
   localise-queries
   no-resolv
   cache-size=10000
   log-queries=extra
   log-facility=/var/log/pihole.log
   local-ttl=2
   log-async
   server=72.235.80.12
   server=72.235.80.4
   interface=enp0s3

*** [ DIAGNOSING ]: contents of /etc/lighttpd

-rw-r--r-- 1 root root 3027 Jul  8 11:41 /etc/lighttpd/lighttpd.conf
   server.modules = (
   	"mod_access",
   	"mod_accesslog",
   	"mod_auth",
   	"mod_expire",
   	"mod_compress",
   	"mod_redirect",
   	"mod_setenv",
   	"mod_rewrite"
   )
   server.document-root        = "/var/www/html"
   server.error-handler-404    = "pihole/index.php"
   server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
   server.errorlog             = "/var/log/lighttpd/error.log"
   server.pid-file             = "/var/run/lighttpd.pid"
   server.username             = "www-data"
   server.groupname            = "www-data"
   server.port                 = 80
   accesslog.filename          = "/var/log/lighttpd/access.log"
   accesslog.format            = "%{%s}t|%V|%r|%s|%b"
   index-file.names            = ( "index.php", "index.html", "index.lighttpd.html" )
   url.access-deny             = ( "~", ".inc", ".md", ".yml", ".ini" )
   static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
   compress.cache-dir          = "/var/cache/lighttpd/compress/"
   compress.filetype           = ( "application/javascript", "text/css", "text/html", "text/plain" )
   include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
   include_shell "/usr/share/lighttpd/create-mime.assign.pl"
   include_shell "find /etc/lighttpd/conf-enabled -name '*.conf' -a ! -name 'letsencrypt.conf' -printf 'include \"%p\"
' 2>/dev/null"
   $HTTP["url"] =~ "^/admin/" {
       
       setenv.add-response-header = (
           "X-Pi-hole" => "The Pi-hole Web interface is working!",
           "X-Frame-Options" => "DENY"
       )
       $HTTP["url"] =~ ".ttf$" {
           
           setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
       }
   }
   $HTTP["url"] =~ "^/admin/\.(.*)" {
        url.access-deny = ("")
   }
   include_shell "cat external.conf 2>/dev/null"

*** [ DIAGNOSING ]: contents of /etc/cron.d

-rw-r--r-- 1 root root 1496 Jul  8 11:41 /etc/cron.d/pihole
   29 4   * * 7   root    PATH="$PATH:/usr/local/bin/" pihole updateGravity
   00 00   * * *   root    PATH="$PATH:/usr/local/bin/" pihole flush once quiet
   @reboot root /usr/sbin/logrotate /etc/pihole/logrotate
   */10 *  * * *   root    PATH="$PATH:/usr/local/bin/" pihole updatechecker local
   51 15  * * *   root    PATH="$PATH:/usr/local/bin/" pihole updatechecker remote
   @reboot root    PATH="$PATH:/usr/local/bin/" pihole updatechecker remote reboot

*** [ DIAGNOSING ]: contents of /var/log/lighttpd

-rw-r--r-- 1 www-data www-data 1270 Jul  9 18:39 /var/log/lighttpd/error.log
   2018-07-08 11:41:13: (log.c.164) server started 
   2018-07-08 11:41:22: (server.c.1558) server stopped by UID = 0 PID = 1 
   2018-07-08 11:41:22: (log.c.164) server started 
   2018-07-08 12:17:26: (mod_fastcgi.c.2695) FastCGI-stderr: PHP Notice:  Undefined index: HTTP_HOST in /var/www/html/pihole/index.php on line 10
   2018-07-08 12:17:26: (mod_fastcgi.c.2695) FastCGI-stderr: PHP Notice:  Undefined index: HTTP_HOST in /var/www/html/pihole/index.php on line 10
   2018-07-08 12:19:09: (server.c.1558) server stopped by UID = 0 PID = 1 
   2018-07-08 12:19:15: (log.c.164) server started 
   2018-07-09 18:28:27: (mod_fastcgi.c.2695) FastCGI-stderr: PHP Notice:  Undefined index: HTTP_HOST in /var/www/html/pihole/index.php on line 10
   2018-07-09 18:28:27: (mod_fastcgi.c.2695) FastCGI-stderr: PHP Notice:  Undefined index: HTTP_HOST in /var/www/html/pihole/index.php on line 10
   2018-07-09 18:36:16: (mod_fastcgi.c.2695) FastCGI-stderr: PHP Notice:  Undefined index: HTTP_HOST in /var/www/html/pihole/index.php on line 10
   2018-07-09 18:36:16: (mod_fastcgi.c.2695) FastCGI-stderr: PHP Notice:  Undefined index: HTTP_HOST in /var/www/html/pihole/index.php on line 10
   2018-07-09 18:39:50: (server.c.1558) server stopped by UID = 0 PID = 1 
   2018-07-09 18:39:56: (log.c.164) server started 

*** [ DIAGNOSING ]: contents of /var/log

-rw-r--r-- 1 pihole pihole 4787 Jul  9 18:39 /var/log/pihole-FTL.log
   [2018-07-09 00:00:02.031] NOTICE: pihole.log has been flushed
   [2018-07-09 00:00:02.031]   Resetting internal data structure
   [2018-07-09 00:00:02.031]   Queries in memory before flushing: 134
   [2018-07-09 00:00:02.032] FATAL: Trying to free NULL pointer in pihole_log_flushed() (flush.c:61)
   [2018-07-09 00:00:02.074] Gravity list entries: 132559
   [2018-07-09 00:00:02.074] No blacklist present
   [2018-07-09 00:00:02.074] No wildcard blocking list present
   [2018-07-09 00:00:02.075] Notice: Increasing queries struct size from 0 to 10000 (440.21 KB)
   [2018-07-09 00:00:02.075] Notice: Increasing domains struct size from 0 to 1000 (472.21 KB)
   [2018-07-09 00:00:02.075] Notice: Increasing clients struct size from 0 to 10 (472.45 KB)
   [2018-07-09 00:00:02.075] New client: 127.0.0.1 localhost (0/10)
   [2018-07-09 00:00:02.075] Notice: Increasing forwarded struct size from 0 to 4 (472.60 KB)
   [2018-07-09 00:00:02.079] New forward server: 72.235.80.4 hnlldnsdhcp.hawaiiantel.net (0/4)
   [2018-07-09 00:00:02.079] Notice: Increasing overTime struct size from 0 to 100 (478.24 KB)
   [2018-07-09 00:00:02.083] New forward server: 72.235.80.12 wphudnsdhcp.hawaiiantel.net (1/4)
   [2018-07-09 00:00:02.083] Imported 132 queries from the long-term database
   [2018-07-09 00:00:02.083] Reading from /var/log/pihole.log (rw-r--r--)
   [2018-07-09 05:30:18.876] Notice: Increasing overTime struct size from 100 to 200 (484.95 KB)
   [2018-07-09 18:39:56.697] 
   [2018-07-09 18:39:56.697] FTL branch: v3.0
   [2018-07-09 18:39:56.697] FTL version: v3.0
   [2018-07-09 18:39:56.697] FTL commit: a1b2fa03f8f3e3713b57a26a4e9a062fec0573d7
   [2018-07-09 18:39:56.697] FTL date: 2018-02-14 12:45:47 -0800
   [2018-07-09 18:39:56.697] FTL user: pihole
   [2018-07-09 18:39:56.697] Notice: Found no readable FTL config file

*** [ DIAGNOSING ]: Pi-hole log
-rw-r--r-- 1 dnsmasq root 67161 Jul  9 18:41 /var/log/pihole.log
   -----head of pihole.log------
   Jul  9 00:00:02 dnsmasq[1545]: 85 127.0.0.1/54861 query[PTR] 4.80.235.72.in-addr.arpa from 127.0.0.1
   Jul  9 00:00:02 dnsmasq[1545]: 85 127.0.0.1/54861 forwarded 4.80.235.72.in-addr.arpa to 72.235.80.4
   Jul  9 00:00:02 dnsmasq[1545]: 85 127.0.0.1/54861 forwarded 4.80.235.72.in-addr.arpa to 72.235.80.12
   Jul  9 00:00:02 dnsmasq[1545]: 85 127.0.0.1/54861 reply 72.235.80.4 is HNLLDNSDHCP.hawaiiantel.net
   Jul  9 00:00:02 dnsmasq[1545]: 86 127.0.0.1/33597 query[PTR] 12.80.235.72.in-addr.arpa from 127.0.0.1
   Jul  9 00:00:02 dnsmasq[1545]: 86 127.0.0.1/33597 forwarded 12.80.235.72.in-addr.arpa to 72.235.80.12
   Jul  9 00:00:02 dnsmasq[1545]: 86 127.0.0.1/33597 reply 72.235.80.12 is WPHUDNSDHCP.hawaiiantel.net
   Jul  9 01:31:23 dnsmasq[1545]: 87 127.0.0.1/51494 query[A] ntp.ubuntu.com from 127.0.0.1
   Jul  9 01:31:23 dnsmasq[1545]: 87 127.0.0.1/51494 forwarded ntp.ubuntu.com to 72.235.80.4
   Jul  9 01:31:23 dnsmasq[1545]: 87 127.0.0.1/51494 forwarded ntp.ubuntu.com to 72.235.80.12
   Jul  9 01:31:23 dnsmasq[1545]: 88 127.0.0.1/51494 query[AAAA] ntp.ubuntu.com from 127.0.0.1
   Jul  9 01:31:23 dnsmasq[1545]: 88 127.0.0.1/51494 forwarded ntp.ubuntu.com to 72.235.80.12
   Jul  9 01:31:23 dnsmasq[1545]: 87 127.0.0.1/51494 reply ntp.ubuntu.com is 91.189.89.199
   Jul  9 01:31:23 dnsmasq[1545]: 87 127.0.0.1/51494 reply ntp.ubuntu.com is 91.189.91.157
   Jul  9 01:31:23 dnsmasq[1545]: 87 127.0.0.1/51494 reply ntp.ubuntu.com is 91.189.94.4
   Jul  9 01:31:23 dnsmasq[1545]: 87 127.0.0.1/51494 reply ntp.ubuntu.com is 91.189.89.198
   Jul  9 01:31:23 dnsmasq[1545]: 88 127.0.0.1/51494 reply ntp.ubuntu.com is 2001:67c:1560:8003::c8
   Jul  9 01:31:23 dnsmasq[1545]: 88 127.0.0.1/51494 reply ntp.ubuntu.com is 2001:67c:1560:8003::c7
   Jul  9 01:49:08 dnsmasq[1545]: 89 127.0.0.1/60596 query[A] ntp.ubuntu.com from 127.0.0.1
   Jul  9 01:49:08 dnsmasq[1545]: 89 127.0.0.1/60596 forwarded ntp.ubuntu.com to 72.235.80.4


********************************************
********************************************
[✓] ** FINISHED DEBUGGING! **

    * The debug log can be uploaded to tricorder.pi-hole.net for sharing with developers only.
    * For more information, see: https://pi-hole.net/2016/11/07/crack-our-medical-tricorder-win-a-raspberry-pi-3/
    * If available, we'll use openssl to upload the log, otherwise it will fall back to netcat.
[i] Debug script running in automated mode
    * Using openssl for transmission.

***********************************
***********************************
[✓] Your debug token is: 99q1k0ji5c
***********************************
***********************************

   * Provide the token above to the Pi-hole team for assistance at
   * https://discourse.pi-hole.net
   * Your log will self-destruct on our server after 48 hours.
   * A local copy of the debug log can be found at: /var/log/pihole_debug-sanitized.log

What is the output from ip -4 address? It sounds like you have it set to DHCP client and that is changing the IP address.

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
inet 192.168.1.135/24 brd 192.168.1.255 scope global enp0s3
valid_lft forever preferred_lft forever

And the output from cat /etc/dhcpcd.conf please?

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private
interface enp0s3
  static ip_address=192.168.1.101/24
  static routers=192.168.1.1
  static domain_name_servers=127.0.0.1
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.
hostname

# Use the hardware address of the interface for the Client ID.
#clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
duid

# Persist interface configuration when dhcpcd exits.
persistent

sorry that was the top. i missed that

Thanks, finally the contents of /etc/network/interfaces. I think you might have to set the static IP in /etc/network/interfaces and remove the interface line from /etc/dhcpcd.conf but lets look at your /etc/network/interfaces first.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp0s3
iface enp0s3 inet dhcp

Okay, the options are to either set the line to iface enp0s3 inet manual or configure the interface for a static IP address in /etc/network/interfaces and remove the /etc/dhcpcd.conf section setting the static IP. The configuration now is still asking for an IP address from DHCP and overriding dhcpcd.

/etc/network/interfaces


# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp0s3
iface enp0s3 inet manual

/etc/dhcpcd.conf



# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.
hostname

# Use the hardware address of the interface for the Client ID.
#clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
duid

# Persist interface configuration when dhcpcd exits.
persistent

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate Stable Private IPv6 Addresses instead of hardware based ones
#slaac private
#interface enp0s3
#  static ip_address=192.168.1.101/24
#  static routers=192.168.1.1
#  static domain_name_servers=127.0.0.1

Like that?

If you set the /etc/network/interfaces to manual you will need to leave in the /etc/dhcpcd.conf configuration untouched.

Only comment out the /etc/dhcpcd.conf lines if you set the /etc/network/interfaces to a static IP configuration as per the Ubuntu documentation for setting a static IP address. networking - How do I set a static IP in Ubuntu? - Ask Ubuntu

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.