Allow Isolated Guest network to access Pi-Hole?

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
bl@d3runn3r
DD-WRT User


Joined: 10 Jan 2010
Posts: 210

PostPosted: Fri May 03, 2019 8:21    Post subject: Allow Isolated Guest network to access Pi-Hole? Reply with quote
It's probably an easy task but for some reason it can't get it to work.

I created a isolated Guest network using this Wiki page
https://wiki.dd-wrt.com/wiki/index.php/Guest_Network

I did not use the new DNSMasq method (yet) because it would mean more work for me but will be done later if needed.

So i have this isolated Guest network on br1 with subnet 20.0.0.1 /24

And my private network 192.168.1.0/24 (br0)

I was reading some guides and iptable documents and i thought it should look something like this but it doesn't seem to work and have no idea how to easy troubleshoot this.

# Allow Guest Network to access Pi-Hole
iptables -I FORWARD -i br1 -o br0 -d 192.168.1.130 -p udp --dport 53 -m state --state NEW -j ACCEPT
iptables -I FORWARD -i br1 -o br0 -d 192.168.1.130 -p tcp --dport 53 -m state --state NEW -j ACCEPT

Any ideas?
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12877
Location: Netherlands

PostPosted: Fri May 03, 2019 9:20    Post subject: Reply with quote
For that we have to see all your rules:
telnet to your router and do:
iptables -vnL FORWARD

You can leave out the
Code:
-o br0
and the
Code:
-m state --state NEW
although these should not be the problem

Furthermore you can not use 20.0.0.1 as subnet that is not a private subnet

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6865
Location: Romerike, Norway

PostPosted: Sat May 04, 2019 8:20    Post subject: Reply with quote
iptables -I FORWARD -i br1 -o br0 -d 192.168.1.130 -p udp --dport 53 -m state --state NEW -j ACCEPT

This rule does not work because there is no state on UDP. It's a connectionless protocol.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6865
Location: Romerike, Norway

PostPosted: Sat May 04, 2019 12:16    Post subject: Reply with quote
Do you get the same results between br1 and br0?
bl@d3runn3r
DD-WRT User


Joined: 10 Jan 2010
Posts: 210

PostPosted: Sat May 04, 2019 13:40    Post subject: Reply with quote
Thanks for all the answers, will do some test when home later today.
bl@d3runn3r
DD-WRT User


Joined: 10 Jan 2010
Posts: 210

PostPosted: Tue May 07, 2019 12:50    Post subject: Reply with quote
eibgrad wrote:
The following should suffice.

Code:
iptables -I FORWARD -i br1 -d 192.168.1.130 -p udp --dport 53 -j ACCEPT
iptables -I FORWARD -i br1 -d 192.168.1.130 -p tcp --dport 53 -j ACCEPT


Are you sure the pi-hole knows how to route back to the Guest network? When the pi-hole is on the same network as the client, that's not an issue. The pi-hole and client are bridged; no routing required. But in order for the pi-hole to work w/ the guest network, that requires routing. And that's only going to work if the pi-hole is using the same default gateway as the rest of the network.


Thanks eibgrad for this post it worked.
Also thanks for your explanantion.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum