Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Resolver Domain Override and Policy Routing DNS Requests

    Scheduled Pinned Locked Moved DHCP and DNS
    4 Posts 2 Posters 172 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      sandor-krisztian.andre
      last edited by sandor-krisztian.andre

      Hi Everyone,

      I need to route DNS requests about a specific domain to a specific WAN.

      Now, usually I would create a domain override on the resolver and a FW rule for UDP 53 to the IP of the DNS server in question with the desired WAN interface set in advanced config.

      The issue is that the resolver runs on the FW itself and my FW rule on the LAN interface does not match the packets to the DNS server.

      How can I configure pfsense to route packets from itself to a specific interface if they are destined to a specific IP address?

      Br,
      Kris

      1 Reply Last reply Reply Quote 0
      • johnpozJ Offline
        johnpoz LAYER 8 Global Moderator
        last edited by

        If you create a static route you can pick which gateway to use - pfsense own traffic should use that route, for its own traffic.

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 25.07.1 | Lab VMs 2.8.1, 25.07.1

        1 Reply Last reply Reply Quote 1
        • S Offline
          sandor-krisztian.andre
          last edited by sandor-krisztian.andre

          Hmm. Can I use static routes to route traffic to a subnet behind one of my WAN interfaces from one of my subnets too, or they only apply to traffic originating on the FW?

          1 Reply Last reply Reply Quote 0
          • johnpozJ Offline
            johnpoz LAYER 8 Global Moderator
            last edited by johnpoz

            If pfsense is set to use default routing - ie you didn't set a gateway via policy routing on rule, and there is a route for a specific destination network to use a specific gateway, then yes it would use that.. More explicit routes are always used over a default route.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 25.07.1 | Lab VMs 2.8.1, 25.07.1

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.