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

    How do you simplify LAN addresses?

    Scheduled Pinned Locked Moved NAT
    dns resolvernat rules
    4 Posts 4 Posters 576 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.
    • S
      Sokonomi
      last edited by

      I am trying to accomplish something that should be simple basics, but for the life of me I cannot get it working.

      What I want, is for http://192.168.10.41:8989 to be accessible via something short like http://sonarr (LAN only).

      That means I need pfSense to resolve a domain, while also redirecting a port.
      I've tried fiddling with the DNS resolver and NAT rules,
      even to a point where I accidentally locked myself out of the pfSense webGUI,
      but I just cannot figure out the magic formula to make this work.

      The best way would be to make the server listen on port 80,
      but it running on freeBSD brings its own set of headaches..

      Is there a way pfSense can handle this without resorting to running a separate proxy server?

      V johnpozJ 2 Replies Last reply Reply Quote 0
      • L
        lcbbcl
        last edited by

        The way i did is using split dns and haproxy using pfsense.
        Split DNS
        Haproxy
        Maybe others can give you better ideas.

        1 Reply Last reply Reply Quote 0
        • V
          viragomann @Sokonomi
          last edited by

          @sokonomi
          DNS can only resolve IP addresses, but it has no information about the port the server is running on.

          So your only options on pfSense are either

          • NAT port forwarding + masquerading or
          • HAproxy (with additional package)
          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator @Sokonomi
            last edited by johnpoz

            @sokonomi so your running sonarr - pretty sure you can change that default 8989 port. Are you running it as docker, you can also set the docker port to be something different and leave sonarr as 8989.

            As to accessing via just sonarr via some url link, you can set your box to use a search suffix so that just using host would auto do a dns query for whatever your search suffixes are, ie sonarr.yourdomain.tld

            I never get why this is of concern to so many - so what if the url is http://something.domaint.tld:port - once you create the bookmark, what does it matter just click the bookmark.

            Unless you were wanting to hand this off to users, and you feel the users are too stupid to understand putting the :port on the end of the url, or you concerned that port would not be available outbound from where they are at, etc.

            But if you provide more details of what your trying to accomplish we can go over all the different ways to skin that specific cat.

            but anything via just host name is going to be bad practice - you should always use fqdn when accessing resources.

            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.7.2, 24.11

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