Yes you can depending on what other web daemon you have running now ?
Looks like the blogger is not taking into account that Pi-hole will install the dhcpcd5
software package that deals with network settings and applying them.
Configuring the /etc/network/interfaces
file manually will conflict with dhcpcd5
:
pi@noads:~ $ apt show dhcpcd5
[..]
Description: DHCPv4, IPv6RA and DHCPv6 client with IPv4LL support
dhcpcd is a one stop network management daemon which includes
* RFC compliant DHCPv4 and DHCPv6 clients
* DHCPv6 Prefix Delegation support
* IPv4LL (aka ZeroConf) support
* ARP address conflict resolution
* Link carrier detection
* Wireless SSID profiles
* ARP ping profiles
After Pi-hole is installed better use IP aliasing like below that will give you an additional virtual interface eth0.0
:
pi@noads:~ $ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
iface eth0 inet manual
auto eth0.0
iface eth0.0 inet manual
pi@noads:~ $ tail /etc/dhcpcd.conf
#fallback static_eth0
interface eth0
static ip_address=10.0.0.2/24
static routers=10.0.0.1
static domain_name_servers=127.0.0.1
interface eth0.0
static ip_address=192.168.1.99/24
pi@noads:~ $ sudo service networking restart
pi@noads:~ $
pi@noads:~ $ ip -4 a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
inet 10.0.0.2/24 brd 10.0.0.255 scope global eth0
valid_lft forever preferred_lft forever
3: eth0.0@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
inet 192.168.1.99/24 brd 192.168.1.255 scope global eth0.0
valid_lft forever preferred_lft forever
pi@noads:~ $ ip -4 r
default via 10.0.0.1 dev eth0 src 10.0.0.2 metric 202
10.0.0.0/24 dev eth0 proto kernel scope link src 10.0.0.2 metric 202
192.168.1.0/24 dev eth0.0 proto kernel scope link src 192.168.1.99 metric 203
The two IP addresses are residing in different subnets 192.168.1.0/24 and 192.168.4.0/24.
A device living in the 192.168.1.0/24 subnet wont be able to communicate with devices in the 192.168.4.0/24 subnet without a router between them.
If lucky and not having a misconfigured network (like no default gateway or routes), try run below one first:
echo 'nameserver 8.8.8.8' | sudo tee /etc/resolv.conf
And run install again:
curl -sSL https://install.pi-hole.net | bash -x
If not lucky, you'll have to check IP's:
ip a
And routes:
ip r
And fix those first.
EDIT: added routes output
EDIT: some more