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

How do you simplify LAN addresses?

NAT
dns resolver nat rules
4
4
571
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 Jan 8, 2023, 12:08 PM

    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 J 2 Replies Last reply Jan 8, 2023, 5:38 PM Reply Quote 0
    • L
      lcbbcl
      last edited by Jan 8, 2023, 12:30 PM

      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 Jan 8, 2023, 5:38 PM

        @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
        • J
          johnpoz LAYER 8 Global Moderator @Sokonomi
          last edited by johnpoz Jan 8, 2023, 5:49 PM Jan 8, 2023, 5:46 PM

          @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
          2 out of 4
          • First post
            2/4
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.