[SOLVED] Guest Network with dnsmasq + PI-Hole

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
Antimatter
DD-WRT Novice


Joined: 29 Sep 2014
Posts: 18

PostPosted: Mon Jun 13, 2022 12:32    Post subject: [SOLVED] Guest Network with dnsmasq + PI-Hole Reply with quote
There may be better ways to do this but the Guest network information seems to be a bit obsolete in the Wikis.
I had set this up a few years ago and it had been working up until late and it may be tied to the upgrade to firmware version r48646 which I am currently running in an R7000.
My hardware setup is using a Pihole for DNS and DHCP so DHCP is turn off on the R7000.

My configuration is I have a Virtual interface setup for the Guest network, Unbridged with Net Isolation and Forced DNS Redirection with an optional DNS target IP (for the Guest Network DNS).

Under Setup/Basic setup Use DNSMasq is checked.
Under Services DNSMasq is enabled.
I use these commands for Additional DNSMasq Options:
dhcp-range=wl0.1,10.0.10.1,10.0.10.10,255.255.255.0,1440m
dhcp-option=wl0.1,3,10.0.0.1
dhcp-option=wl0.1,6,10.0.0.1
interface=br0,wl0.1

When a guest try's to connect the guest gets a correct IP address so that is being assigned but has no internet access which is the fundamental issue.

As I said before this method used to work but does not now.

Any help appreciated and if there is a better way to do that would be great.
Thank you.
Sponsor
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2968
Location: Germany

PostPosted: Mon Jun 13, 2022 12:38    Post subject: Reply with quote
no idea if you like it but

how to configure guest networks / VAP's:
(do not configure an optional DNS target and forced DNS redirection)


https://wiki.dd-wrt.com/wiki/index.php/Guest_WiFi_%2B_abuse_control_for_beginners

how to set up a Pi-Hole with isolated guests network look at example 2 (in your case do not configure a second fallback DNS)

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=331414
Antimatter
DD-WRT Novice


Joined: 29 Sep 2014
Posts: 18

PostPosted: Mon Jun 13, 2022 12:59    Post subject: Reply with quote
The issue I found with the wiki link method listed (Guest Wi-Fi Abuse Control for Beginners) is if you Disable in Setup/Basic setup the DHCP server in DD-WRT then if you add another Multiple DHCP server from the Setup/Networking section it does not work so that method fails. That is why I had to use the DNSMasq method at the time.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12877
Location: Netherlands

PostPosted: Mon Jun 13, 2022 13:34    Post subject: Reply with quote
I never tried it but even when DHCP is off you should be able to setup a DHCPD server if DNSMasq is enabled.
At least when using the router as a WAP that is possible.

Of course the VAP should be unbridged.

See my attached notes how I do it (but I do not have the DHCP off at setup page)

Or is this router setup as a WAP (Wireless Access Point with WAN disabled etc. ?)



DDWRT Virtual Access Point Public.doc
 Description:

Download
 Filename:  DDWRT Virtual Access Point Public.doc
 Filesize:  503 KB
 Downloaded:  62 Time(s)


_________________
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
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2968
Location: Germany

PostPosted: Mon Jun 13, 2022 14:53    Post subject: Reply with quote
Antimatter wrote:
The issue I found with the wiki link method listed (Guest Wi-Fi Abuse Control for Beginners) is if you Disable in Setup/Basic setup the DHCP server in DD-WRT then if you add another Multiple DHCP server from the Setup/Networking section it does not work so that method fails. That is why I had to use the DNSMasq method at the time.


no one told you to disable the dnsmasq dhcp server on the router.

In fact the router and the Pi-Hole use dnsmasq as DNS forwarder and DHCP server.

So there is no advantage at all if you disable DHCP on the router because the Pi-Hole uses the same DHCP server anyway.

And I sent you two links how to configure it and how it works without problems.

I have it myself running as shown in the two links with isolated Guest VAP's and they work without problems.

Smile

but i'm sure you can find another solution that works.
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Mon Jun 13, 2022 15:53    Post subject: Reply with quote
That page I used to setup unbridged VAPS both AP/NET Isolated with Internet access and I can confirm it works, since heck I followed it and its working here.

Check my post about it here with screenshots

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1260059#1260059

I dont use Pi-Hole but that shouldnt matter.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2968
Location: Germany

PostPosted: Mon Jun 13, 2022 15:56    Post subject: Reply with quote
Well as mentioned the optional DNS target can't work with a Pi-Hole and isolated VAPs.
Because the VAP's are isolated against regular LAN devices.

Without an optional DNS target, dnsmasq acts as a proxy between the networks.
Antimatter
DD-WRT Novice


Joined: 29 Sep 2014
Posts: 18

PostPosted: Mon Jun 13, 2022 17:36    Post subject: Reply with quote
Thank you all for your suggestions.
Much appreciated.

I used the method 2 from ho1Aetoo as it was focused on use with the Pi-Hole and it did indeed work.
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Mon Jun 13, 2022 17:59    Post subject: Reply with quote
Marked as solved, in any case wast the setup ho1Aetoo originally suggested.
_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware 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 can attach files in this forum
You can download files in this forum