1

I'm using DD-WRT on my home router and I'm using a Pi-Hole for the DNS server.

The main network is 192.168.1.0/24. The default route is .1.1 and the Pi-Hole is sitting at .1.2 (static).

I've created a guest network of 192.168.2.0/24. I want to block all addresses on the .1.0/24 subnet from .2.0/24 subnet except for the Pi-Hole address (.1.2). How do I do this?

andrew997
  • 11
  • 1

1 Answers1

0

Just to answer my own question... This seems to have done the trick:

iptables -I FORWARD -s 192.168.2.0/24 -d 192.168.1.0/24 -j DROP
iptables -I FORWARD -s 192.168.3.0/24 -d 192.168.1.0/24 -j DROP
iptables -I FORWARD -s 192.168.2.0/24 -d 192.168.1.2 -j ACCEPT
iptables -I FORWARD -s 192.168.3.0/24 -d 192.168.1.2 -j ACCEPT
andrew997
  • 11
  • 1