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

    Alias with PC hostname

    Scheduled Pinned Locked Moved Firewalling
    7 Posts 4 Posters 919 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.
    • D
      darkcorner
      last edited by darkcorner

      I need to create a "Users_PC" alias. I know the hostname of these PCs.
      Today I have to assign a static IP in the DHCP and then enter this IP in the list of IPs of this Alias.
      Alternatively, I have to use the DNS Lookup for each PC, from here create the alias of each single PC and then, finally, insert all these single aliases into the "main alias".

      I was wondering if there wasn't another way to directly enter the hostname in the main alias.
      In DNS Resolver there are the two options DHCP Registration and Static DHCP.
      I thought that already with these hostnames could already be used for aliases, but that's not the case.

      S 1 Reply Last reply Reply Quote 0
      • S
        SteveITS Galactic Empire @darkcorner
        last edited by

        @darkcorner pfSense has to resolve the alias. If you're using a PC name by itself DNS can't look that up.

        If pfSense is providing DHCP, DNS Resolver has a checkbox "DHCP Registration" to register leases with the pfSense domain name. Note that restarts the DNS server at each lease renewal/registration.

        If you happen to have a Windows domain, you should be able to use pcname.domain.lan and then have pfSense DNS Resolver set with a Domain Override to forward queries for domain.lan to the local DNS server. If the Windows DHCP server is set to register IPs in DNS then the pcname.domain.lan should resolve.

        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
        Upvote 👍 helpful posts!

        D 1 Reply Last reply Reply Quote 0
        • D
          darkcorner @SteveITS
          last edited by

          @steveits
          I have enabled both option DHCP Registration and option Static DHCP, but in the DNS Resolver there are no PCs or a devices connected with DHCP or static IP.
          There are only references to external domains.

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

            @darkcorner if you want to put pc names into an alias, and they are not working - first thing to do is make sure that the alias actually gets populated. And is the correct IP.. Look in your alias under diagnostic tables..

            So you see the entry?

            So for example as test I just create a rule, with my i9-win.local.lan PC in at 192.168.9.100, and using my a port alias I had setup..

            alias.jpg

            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

            D 1 Reply Last reply Reply Quote 0
            • D
              darkcorner @johnpoz
              last edited by

              I did the test with my PC, which has a static IP assigned by DHCP.
              In DNS resolver this PC is not there.

              However I understand what you are telling me and it is right. That's how it works for me too.

              Maybe I explained myself wrong.
              When creating a host alias, in the "IP or FQDN" field you can enter other aliases and just type a letter that all aliases starting with that letter appear.
              I was hoping to also find the names of the devices already referenced with DHCP.
              To be able to do this, I must first do the DNS lookup, typing the name of the device.
              Then I have to add an alias. But so I'm going to create a very long list of single aliases, only to find them in the list.

              At this point, having to already write the device name in the DNS Lookup, then I can type it directly in the list.

              Thanks for your help.

              johnpozJ Bob.DigB 2 Replies Last reply Reply Quote 0
              • johnpozJ
                johnpoz LAYER 8 Global Moderator @darkcorner
                last edited by johnpoz

                @darkcorner so you want to put in the specific pc fqdn in your rule via having to create an alias?

                So in my example of i9-win.local.lan you want to just put that in your rule..

                Yeah I don't believe they allow for that it needs to be the IP or network or an alias, that would contain the IPs or Networks, etc.

                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
                • Bob.DigB
                  Bob.Dig LAYER 8 @darkcorner
                  last edited by Bob.Dig

                  @darkcorner I create one alias per hostname and then stack these aliases together as needed.

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