awesome!
ABCDEFGHIJKL
awesome!
ABCDEFGHIJKL
on a serious note, big thanks to al for helping.
Ill try the linked alias interface method
failed at the first hurdle!
pi@raspberrypi:/etc/network $ sudo nano interfaces
pi@raspberrypi:/etc/network $ sudo ifup -v eth0:0
Reading directory /etc/network/interfaces.d
/etc/network/interfaces:23: option with empty value
ifup: couldn't read interfaces file "/etc/network/interfaces"
i added
{
echo
echo 'auto eth0:0'
echo 'allow-hotplug eth0:0'
echo 'iface eth0:0 inet static'
echo ' address 10.0.0.20'
echo ' netmask 255.255.255.0'
} | sudo tee -a /etc/network/interfaces
to my /etc/network/interfaces
file in this above exact format?
Noooooooooo
Remove that again.
Copy the whole lot to a text editor first and replace network details like IP address and netmask.
After, you copy the whole lot to clipboard, and paste into SSH session + ENTER.
ignore me, just released my noob error...tee
Noooooooooo
Remove that again.
Copy the whole lot to a text editor first and replace network details like IP address and netmask.
After, you copy the whole lot to clipboard, and paste into SSH session + ENTER.
yeah sorry, i was being uber dumb!
After the ifup command, you can check with:
ip addr show
ip addr show
so, i have ran through that mini guide and seem to have a second IP for my pi as seen in ip addr show
and as far as i can make out i have successfully bound lighttpd to the new IP:
pi@raspberrypi:/etc/lighttpd $ sudo netstat -nltup | grep 'Proto\|lighttpd\|dnsmasq\|dhcpcd'
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 192.168.0.32:80 0.0.0.0:* LISTEN 10944/lighttpd
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 2922/dnsmasq
tcp6 0 0 :::53 :::* LISTEN 2922/dnsmasq
udp 0 0 0.0.0.0:53 0.0.0.0:* 2922/dnsmasq
udp 0 0 0.0.0.0:68 0.0.0.0:* 698/dhcpcd
udp6 0 0 :::546 :::* 698/dhcpcd
udp6 0 0 :::53 :::* 2922/dnsmasq
but
adverts are still showing unless i manually set the DNS?
i also commented out the relevant part of /etc/lighttpd/lighttpd.conf
for IPV6
EDIT
I actually get adverts even if i manually set the DNS
i have successfully bound lighttpd to the new IP:
Your not suppose to bind lighttpd to the new IP address or you break the DNS to port 80 redirecting again.
lighttpd should be running on the physical interface IP address eth0.
And the Hue application should be configured to listen to the alias interface IP address.
adverts are still showing unless i manually set the DNS?
Ps. when you activate the DHCP services on Pi-Hole (make sure router DHCP server is disabled first) , the DHCP leases need renewal on the clients.
Either disconnect network and reconnect or reboot the clients.
Valiceemo:i have successfully bound lighttpd to the new IP:
Your not suppose to bind lighttpd to the new IP address or you break the DNS to port 80 redirecting again.
lighttpd should be running on the physical interface IP address eth0.
And the Hue application should be configured to listen to the alias interface IP address. Valiceemo:adverts are still showing unless i manually set the DNS?
deHakkelaar:Ps. when you activate the DHCP services on Pi-Hole (make sure router DHCP server is disabled first) , the DHCP leases need renewal on the clients.
Either disconnect network and reconnect or reboot the clients.
Sh*t
i better get undoing then!
i wanted pi-hole on the second IP as its less effort to change (i think)
as i currently have everything running on the physical IP
any idea how id switch home assistant to run on second IP?
I dont have the software so have no clue.
Try see what comes up if you do below:
sudo grep 'host_ip\|listen_port' -R /etc
no problem, ill ask that community
pi@raspberrypi:/home/homeassistant/.homeassistant $ sudo grep 'host_ip\|listen_port' -R /etc
grep: /etc/systemd/system/multi-user.target.wants/regenerate_ssh_host_keys.service: No such file or directory
Binary file /etc/alternatives/js matches
grep: /etc/alternatives/js.1.gz: No such file or directory
Binary file /etc/alternatives/rsh matches
Binary file /etc/alternatives/node matches
Binary file /etc/alternatives/rlogin matches
which honestly means nothing to me¬
sudo grep 'host|port|listen|bind' -R /home/homeassistant/
ok, so again, thanks to all that have helped me...but im still having some problems with pi-hole.
thanks to the above help settings are saved ok via the web interface.
however, if i do not set the DNS manually on my devices, i get resolve errors and cannot browse the web.
I also see adverts on android devices, irrespective of whether i set the DNS manually
I have disabled DHCP on my router and enabled in pi-hole.
Pi has been rebooted, as have the client devices.
If on a client, does below link work ?
http://pi.hole/admin/
If not, the clients are not using Pi-Hole to resolve via DNS.
Whats the IP address for Pi-Hole ?
Whats the output for below 2 on a Linux client:
cat /etc/resolv.conf
nslookup pi.hole
Or if on a Windows client:
ipconfig /all
nslookup pi.hole
Whats the output for below 2 on a Linux client:
cat /etc/resolv.conf
nslookup pi.holeOr if on a Windows client:
ipconfig /all
nslookup pi.hole
thanks again
ssh'd into my Pi:
pi@raspberrypi:~ $ cat /etc/resolv.conf
# Generated by resolvconf
nameserver 127.0.0.1
pi@raspberrypi:~ $ nslookup pi.hole
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: pi.hole
Address: 192.168.0.33
in my Win10 laptop:
C:\Users\Richard>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : Rich-Laptop
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : local
Default Gateway . . . . . . . . . : fe80::9221:6ff:fe7c:5079%7
192.168.0.1
DHCP Server . . . . . . . . . . . : 192.168.0.32
DHCPv6 IAID . . . . . . . . . . . : 342397987
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1A-34-0E-10-B8-88-E3-CC-D9-7C
DNS Servers . . . . . . . . . . . : 192.168.0.33
NetBIOS over Tcpip. . . . . . . . : Enabled
ive omitted some data that i think may be sensitive?
on my laptop if i navigate to http://pi.hole/admin/ i see the admin page...but only if i set the DNS manually
On the client it displays two different IP addresses while they should be one and the same (as Pi-Hole provides both DHCP and DNS now):
DHCP Server . . . . . . . . . . . : 192.168.0.32
DNS Servers . . . . . . . . . . . : 192.168.0.33
Try running below one and reconfigure the network settings:
pihole
-r
Ps. On the Windows client, you can run below 2 to renew the DHCP lease after you've run above command:
*Might need to run the Windows command line shell as user "Administrator"
ipconfig /release
ipconfig /renew
And check again with:
ipconfig /all
ok i ran pihole -r
and set up as 198.168.0.33 for pihole
i then ran the renew and release commands as admin on Win10 laptop, no good. no access to internet with a DNS resolve error...i have to manually set the DNS in adapter settings
output of ipconfig /all
is:
Default Gateway . . . . . . . . . : fe80::9221:6ff:fe7c:5079%7
192.168.0.1
DHCP Server . . . . . . . . . . . : 192.168.0.32
DHCPv6 IAID . . . . . . . . . . . : 342397987
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-1A-34-0E-10-B8-88-E3-CC-D9-7C
DNS Servers . . . . . . . . . . . : 192.168.0.32
NetBIOS over Tcpip. . . . . . . . : Enabled
why is it taking 192.168.0.32
?
i have set a static IP for the laptop in Pi-hole admin?
fyi, when i set a secondary IP for the Pi, i chose 192.168.0.32 as eth0:0
but added the bind rule for 192.168.0.33 into lighttpd.conf
EDIT
the bind is missing due to re-install...i need to re-add again?
On Pi:
ip link show; echo; ip addr show; echo; ip route show
And try rebooting the Windows machine.
ip link show; echo; ip addr show; echo; ip route show
pi@raspberrypi:~ $ ip link show; echo; ip addr show; echo; ip route show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether b8:27:eb:a5:5c:dd brd ff:ff:ff:ff:ff:ff
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:a5:5c:dd brd ff:ff:ff:ff:ff:ff
inet 192.168.0.32/24 brd 192.168.0.255 scope global eth0:0
valid_lft forever preferred_lft forever
inet 192.168.0.33/24 brd 192.168.0.255 scope global secondary eth0
valid_lft forever preferred_lft forever
inet6 2a02:c7f:9202:fb00:c66f:515d:5db7:d1d0/64 scope global noprefixroute dynamic
valid_lft 1995sec preferred_lft 1995sec
inet6 fd0a:3ac9:fd6f:0:867f:ae2b:8393:def4/64 scope global noprefixroute
valid_lft forever preferred_lft forever
inet6 fe80::ba27:ebff:fea5:5cdd/64 scope link
valid_lft forever preferred_lft forever
default via 192.168.0.1 dev eth0 metric 202
192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.33 metric 202
pi@raspberrypi:~ $ sudo service lighttpd reload
[FAIL] Reloading web server configuration: lighttpd failed!