Sending All DNS Traffic on LAN via PiHole

Ok, understoood.
Your existing setup just blocks unsolicited DNS queries to external DNS, but you want to redirect it to be processed through your Pi-hole instead.

Let me rephrase my cautious recommendation to go without eth1 into something more action-oriented :wink:
Assuming that you have gigabit eth0 and otherwise kept your setup from Pihole plus Guest Wifi on different IP range, try the following eth1-free configuration:

  • unplug your second ethernet dongle (eth1)
  • undo any eth1 related configurations, including any iptables NAT entries
  • make sure that your eth0 interface is still configured to use your localhost DNS and your router by checking these lines in /etc/dhcpcd.conf
   static ip_address=192.168.1.2/24
   static routers=192.168.1.1
   static domain_name_servers=127.0.0.1
  • configure Pi-holes Settings|DHCP to hand out itself (192.168.1.2) as router (don't forget to save)
  • configure iptables to redirect incoming eth0 UDP/TCP traffic with a DNS target port to be handled by your machine's DNS:
   iptables -t nat -A PREROUTING -i eth0 -p udp --dport 53 -j REDIRECT --to-port 53
   iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 53 -j REDIRECT --to-port 53
  • (optional should you consider extending this to your 10.0.0.x guest wlan, also add the following)
   iptables -t nat -A PREROUTING -i wlan0 -p udp --dport 53 -j REDIRECT
   iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 53 -j REDIRECT

Bottom line difference to your solution:
You don't need a second ethernet dongle - save some power :wink: