Looking to install on a dual NIC router/firewall

I am looking to run my own services like DHCP and DNS on a Linux box so I can present all of my traffic from my machines to the ISP provided router for easier port forwarding and such, basically my own private IP range.

I have tried installing on Zentyal with mixed results, it always seems to detect the 'WAN' IP, not my LAN IP, even though configured to use that interface. I would prefer to have a webui to configure the machine, or I have the ability to install Webmin on it

Does anyone have any knowledge of running Pi hole in such a way? What distro, and how is/was it set up?

I've made a reddit post with similar intent if you wish to read more on what I am trying to acheive, https://www.reddit.com/r/pihole/comments/9bdxh5/pi_hole_on_zentyal/

Hey, @RamSet, thanks for putting this in the right place :smile:

1 Like

I'm not quite understanding what exactly you need.

Let's see if I got this correct:

You have 1 ISP provided modem (Bridged or router mode ?)
You want all your devices to work with an internal IP range (192.168, 10.10.. etc)
You want to manage you own DHCP and DNS settings and not rely on the limited ISP one
You want to port forward from the ISP modem/router into your network
You absolutely need it on Zentyal ?

1 Like

I'll write my reply in numbered fashion

  1. It's acting as it should do in any ordinary, non technical household, so serving DHCP and DNS
  2. What I would consider WAN is 192.168.0., what I would like is the 172.0.0. range
  3. Yes
  4. Yes
  5. No, as long as I have some form of web interface.

I have managed to get Zentyal to perform all of its duties, acting as my own DHCP (I have a Chromecast) and I imagine it just passes DNS requests onto the router.

Ok. This makes sense a little bit.

Here's the logic on how you would have to proceed from here:

  • Switch the class of IPs in the ISP router from 192.168 to 172.16 ( 172.16.0.0 to 172.31.255.255) under the Router's DHCP server settings.

  • Install a low resource OS on your device that will host the Pi-hole installation (Maybe XUbuntu ?).

  • Install Pi-hole on your (XUbuntu) device.

  • Once installed, go to http://pi.hole/admin and enable DHCP from within the admin interface (this is the place you will administer the whole network from, leases, IPs, DNS related settings).

  • Disable DHCP server from within the ISP router.

  • Set your WAN DNS settings to point to the IP of the Pi-hole device (only) because of this:
    Why should Pi-hole be my only DNS server?

  • Set any port forwarding rules in your ISP router to point to your desired LAN devices.

So what this does it actually using Pi-hole's ability to be (not only a DNS level ad blocker but also) a DHCP server.

So you have two things in one: a self hosted DHCP server (on which you can set up ANY DHCP related parameter) and a blocker that self propagates to all your clients (via the self hosted DHCP server).

Your ISP router will be used to port forward and be a transition device between your LAN to your ISP.

An added bonus is that since you will be using Pi-hole as the DHCP server, you will be able to enjoy the analytics for each device that connects to the network (like sites visited, blocked, hours of activity etc.).

Have fun !

I fear that I may have led you astray here.

I wish to keep the ISP router as is, serving it's 192.168.0.* to the rest of the house, all services left enabled.

The 172.0.0.* range is just for my devices. I wish to present all of my traffic to the ISP router as coming from one source. I cannot guarantee that this machine will stay on.

I am currently attempting another scenario, using the DHCP and DNS of Pi hole, using Zentyal as everything else to connect the two networks together.

Ah. I missed that from the tile :slight_smile:
See if this sets you on the right path:

http://coderazzi.net/linux/dual_nic_linux.htm

Once you have both NICs configured, set Pi-hole to listen to the 172 interface and maybe as the 172 DHCP server too ...

1 Like

Thank you for this, I'll refer to in once I have set up Zentyal. Looks like a resource that will come in handy for the tinkering I am doing :smiley:

1 Like

I'm still having issues, I changed the IP in setupVars.conf to the LAN IP (172.), as an attempt to get it to serve DHCP on that IP range, instead of the 192 range, as served by the router I wish to leave as is. I can also no longer access the web interface on the 172. IP. Not sure where else to look to make changes in the configuration.

As an aside, I cannot be the only person trying to run this on a router, with two interfaces and to IP addresses, surely?

Edit, I have no idea why parts of this are italic.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.