Different DNS server for each VLAN
-
Hello,
I have the following configuration of a pfSense box:
VLAN1
Gateway: VPN (OpenVPN)VLAN2
Gateway: WANI would need to achieve the following outcome:
- all DNS queries comming through VLAN1 to use DNS server 1 (VPN server)
- all DNS queries comming through VLAN2 to use DNS server 2 (Cloudflare server).
Any ideas on how this can be achieved?
>> Some other settings on this pfSense box:
DNS Forwarder: not enabled
System > General Setup
DNS Servers: Cloudflare, with WAN Gateway
DNS Server Override: OFF
DNS Resolution Behavior: Use local DNS, ignore remote DNS serversDNS Resolver: enabled
Network interfaces: All
Outgoing Network Interfaces:Custom options:
server: forward-zone: name: "." # Cloudflare forward-ssl-upstream: yes forward-addr: 1.1.1.1@853 forward-addr: 1.0.0.1@853 server:include: /var/unbound/pfb_dnsbl.*confServices > DHCP Server
Any DNS entries made here (for VLANs) seem to be ignored, even if the VLANs are not selected in the DNS Resolver under Network interfaces.VPN > OpenVPN > Clients > Edit
Tunnel SettingsPull DNS: Not ticked
pfBlockerNG active
Thanks for reading this.
-
@endpoint-credible
Simply forward DNS request with a NAT port forwarding rule on the respective interfaces. -
@viragomann
What a straight-forward solution! Thanks!
It works as expected now.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy