Pihole as DNS server for Peplink B1 5G roter with multiple VLANS

Hi , I am a new peplink B1 5G router user . I am a new bee in the networking too .

I am trying to do the below

In the router I have 4 VLANS as below
VLAN10 : Main
VLAN20 : Security
VLAN30: IoT
VLAN40 : Guest

I want to use a pihole (raspberry pi in VLAN30 ) as DNS server for all my VLANs.

I tried a lot and I still didn’t able to make it work .

  1. I have Inter-VLAN routing enabled across all VLANs
  2. I have the DNS Servers ( in the DHCP config ) is pointing to the Pi static IP
  3. I have outbound Firewall rules set for UDP+TCP from VLAN30 to reach any Destination on port 53
  4. I have Default outbound is allowed from any to Any
  5. I have inbound rule set to Block for any UDP+TCP to reach raspberry pi IP on port 53
  6. Default Inbound rule for any to any is Denied
  7. I have internal Network firewall to allow All UDP+TCP to reach pihole on port 53
    8.Default Internal Network firewall rule is Denied for any to any
  8. in the pihole under DNS Setting , Its marked as “Permit all origins”

I am still getting no internet connection in the VLANs

Hi, @Kumar_Sam

About your questions… my answer.

1: Okay
2: Using NSLOOKUP/DIG, it is resolving names/domains?
3: By default… It is allowed from any / to any.
4: okay
5: Internal Network Firewall Rules? blocking?!?!
6: okay… inbound firewall rules.
7: please… change your rules to allow… Maybe you are doing a wrong setup.
8: okay

1 Like

First question is are you having DNS issues, or transit issues. A ping to a numeric IP will tell you if you have transit or not. (ping 8.8.8.8 is a handy one.)

if it is a DNS issue, I’d be thinking of doing packet captures to see if the packets are getting to the pi hole, and back, or getting lost somewhere else.

I’m also wondering why you need the pi hole, the B1 DNS capabilities are pretty good.

Here’s how I would set this up:

  1. on Network/WAN/WAN Connection Settings, set DNS Servers to the IP of your PiHole.
  2. On Network/LAN/Network Settings/DNS Proxy Settings:
  • Enable: yes
  • DNS Caching: yes
  • Include Google Public DNS Servers: ??? If you want DNS to keep working if your PiHole crashes, then turn this on. Otherwise, keep it off.
  1. Disable inter-VLAN routing

This is a much simpler approach:

  • the Peplink becomes the DNS Proxy, intercepting and referring all DNS request to the PiHole
  • no firewall rules are needed.

However, this means that all VLANs (including your Main one) use the PiHole. If you wanted to have different DNS for different VLANs, this wouldn’t work.

Can you clarify what you want?

1 Like

Thanks . I had fixed it by updating the firewall rules for Internal Firewall access .

1 Like

Yes - Internal Network Firewall rules were blocking it .

Can i please check what are the pros and cons of " Enabling Inter-VLAN routing " for all VLANs ?

  1. Does it expose VLANs with compromised security ?
  2. When is the particular occasion we need it ?
  3. Does firewall prevent any gaps coming from #1 ?

Hi, @Kumar_Sam
Please…
Can you draw your topology?
and describe what a kind of data traaffic you will need between vlans?
This way… We (Forum) can check what kind of rules you will need.

Hi…

Thank you very much for your draw…

Have you setup this?


to redirect all DNS request to your pi-hole.