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

    DNS Forward - Access pfSense machine through domain name instead of internal IP

    Scheduled Pinned Locked Moved DHCP and DNS
    6 Posts 3 Posters 1.4k 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.
    • M
      mateusscheper
      last edited by mateusscheper

      Hi. I need to access my pfsense machine which is 10.1.1.1 through my host.domain.com, but it only gives me my 192.168.1.1 modem.
      I tried to setup DNS Forward but it only works if I invent some new host, like test.domain.com. If I try host.domain.com, it still gives me my external IP (which gives me my 192.168.1.1 modem).
      I'm trying with the second method on this link: https://www.netgate.com/docs/pfsense/nat/accessing-port-forwards-from-local-networks.html

      What am I doing wrong?
      Thank you already.

      1 Reply Last reply Reply Quote 0
      • KOMK
        KOM
        last edited by

        A DNS override under Forwarder/Resolver (depending which you use) should be all you need.

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

          So your pfsense is behind a NAT.. And its wan IP is what 10.1.1.1? Or that is its lan IP? And its wan is 192.168.1.x?

          And where are you exactly on this 10.1.1 network and you want to access the webgui of pfsense? Using some public fqdn? Lets call it host.domain.com? While you on the 10.1.1.x

          Then create a HOST override in either forwarder or the resolver which one your using - resolver is default (unbound) and create a ovrride pointing host domain.com to the lan IP of pfsense your trying to access.

          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

          M 1 Reply Last reply Reply Quote 1
          • M
            mateusscheper @johnpoz
            last edited by

            @johnpoz said in DNS Forward - Access pfSense machine through domain name instead of internal IP:

            So your pfsense is behind a NAT.. And its wan IP is what 10.1.1.1? Or that is its lan IP? And its wan is 192.168.1.x?

            And where are you exactly on this 10.1.1 network and you want to access the webgui of pfsense? Using some public fqdn? Lets call it host.domain.com? While you on the 10.1.1.x

            Then create a HOST override in either forwarder or the resolver which one your using - resolver is default (unbound) and create a ovrride pointing host domain.com to the lan IP of pfsense your trying to access.

            Wan is 192.168.1.2 and LAN is 10.1.1.1.
            I'm one of the 10.1.1.x. I'm trying to access my pfSense machine through host.domain.com, but it only returns 192.168.1.1 modem page.

            In DNS Forwarder, I've set host override to:
            Host: host
            Domain: domain.com
            IP: 10.1.1.1

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

              Well if your client pings host.domain.com and you dont' get back 10.1.1.1 then your not using pfsense as that client dns.

              example - I created host override for www.cnn.com, as you see when I try and ping it comes back with that IP.

              0_1532522899220_hostoverride.png

              Is your web browser using a proxy? If so then its the proxy doing the dns query not your client.

              Did you flush your clients dns cache, did you restart your browser because they also cache dns.

              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 1
              • M
                mateusscheper
                last edited by

                It worked. I just didn't type "ifconfig /flushdns".
                Thank you, Sir.

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