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

    DNS Resolver Split outgoing interface

    Scheduled Pinned Locked Moved DHCP and DNS
    23 Posts 4 Posters 2.2k Views
    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.
    • E
      erasedhammer @johnpoz
      last edited by

      @johnpoz
      Heres the gateway list:
      gateway.png

      I don't have any internet static routes though, so everything gets sent to that default gateway.

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

        But lets see the routing table.. Pfsense shouldn't use the lan IP when it wants to talk to 172.20.0.1

        It shouldn't be able to.. Makes no sense to use that IP when trying to talk to something that is not on that network.

        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 24.11 | Lab VMs 2.8, 24.11

        E 1 Reply Last reply Reply Quote 0
        • E
          erasedhammer @johnpoz
          last edited by

          @johnpoz

          I don't see anything saying to use one of the lan interfaces to go to the internet

          routetable.png

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

            Maybe @Derelict has some idea.. I am drawing a blank to how/why it could/would do that..

            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 24.11 | Lab VMs 2.8, 24.11

            1 Reply Last reply Reply Quote 0
            • V
              viniciusmerlim
              last edited by

              Have you set the gateway for your server interface? I think you will need to create static routes and set these dns policies in DNS resolver. You will also need to allow this traffic in the rules and put the SERVERS gateway in advanced configuration of these rules for users to use this weird configuration.

              What a tricky scenario.

              E 1 Reply Last reply Reply Quote 0
              • E
                erasedhammer @viniciusmerlim
                last edited by

                @viniciusmerlim

                What do you mean by gateway for the server interface? It is a gateway in itself.
                And by static routes, do you mean static routes inside the dns resolver itself? I am unfamiliar with how to do that.

                Is it a weird configuration? Domain overrides can be used for more than my weird domain controller setup.
                I think if the domain override could work without selecting additional outgoing interfaces, I wouldn't be seeing this behavior.

                DerelictD 1 Reply Last reply Reply Quote 0
                • DerelictD
                  Derelict LAYER 8 Netgate @erasedhammer
                  last edited by

                  @erasedhammer What have you selected as the outgoing interfaces in DNS Resolver/unbound?

                  No, you cannot source a connection for a specific domain from a specific source address. This is something dnsmasq (DNS Forwarder) could do but unbound cannot, unfortunately.

                  Chattanooga, Tennessee, USA
                  A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                  DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                  Do Not Chat For Help! NO_WAN_EGRESS(TM)

                  E 1 Reply Last reply Reply Quote 0
                  • E
                    erasedhammer @Derelict
                    last edited by

                    @derelict

                    splitdns-resolveroutgoing.png

                    DerelictD 1 Reply Last reply Reply Quote 0
                    • DerelictD
                      Derelict LAYER 8 Netgate @erasedhammer
                      last edited by

                      @erasedhammer So it is doing exactly what you told it to do? Source queries from both addresses?

                      Chattanooga, Tennessee, USA
                      A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                      DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                      Do Not Chat For Help! NO_WAN_EGRESS(TM)

                      E 1 Reply Last reply Reply Quote 0
                      • E
                        erasedhammer @Derelict
                        last edited by

                        @derelict

                        Correct, but the domain override and telling it to use an internal DNS server does not work without selecting the servers interface as outgoing.
                        I guess that is the root of my question, why can't the domain override work without the interface being selected in the outgoing interfaces list.

                        DerelictD 1 Reply Last reply Reply Quote 0
                        • DerelictD
                          Derelict LAYER 8 Netgate @erasedhammer
                          last edited by

                          @erasedhammer Because unbound doesn't have that functionality.

                          Chattanooga, Tennessee, USA
                          A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                          DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                          Do Not Chat For Help! NO_WAN_EGRESS(TM)

                          1 Reply Last reply Reply Quote 0
                          • DerelictD
                            Derelict LAYER 8 Netgate
                            last edited by

                            @erasedhammer If you set the outgoing interface to All, what happens?

                            That should move the source address selection back to FreeBSD which should select the "closest" interface to the destination address.

                            Chattanooga, Tennessee, USA
                            A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                            DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                            Do Not Chat For Help! NO_WAN_EGRESS(TM)

                            E 1 Reply Last reply Reply Quote 1
                            • E
                              erasedhammer @Derelict
                              last edited by

                              @derelict

                              Seems to be working. Domain override is working and Im not seeing any other interfaces going to the internet.

                              I guess I overthought the implementation, thanks!

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