Navigation

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

    [SOLVED] reference computers on network by name instead of IP

    General pfSense Questions
    6
    14
    8475
    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.
    • P
      p2ranger last edited by

      I'm sure there must be something I'm missing, but I can not figure out how to reference computers on my network by name instead of by IP. Is there a tutorial somewhere I can follow because I haven't found one yet. I've tried going to firewall -> aliases, adding an IP Alias where I have the name of my computer and its static IP address. I've also tried using a DHCP reservation with the static IP and the name I want it to have. Neither of which allows me to access my server by name instead of by IP. The only way I can figure out how to do it now is by changing my hosts file. With my old router, I was able to do it by setting the names up in the router.

      Thanks for any help

      Jason

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

        DNS Forwarder or DNS Resolver Host overrides.

        Chattanooga, Tennessee, USA
        The pfSense Book is free of charge!
        DO NOT set a source 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
        • K
          kejianshi last edited by

          You can also assign static DHCP entries and have DNS resolver register those.

          I do this on my home network.  SOOOOOOOOO many ways to skin 1 cat right?

          1 Reply Last reply Reply Quote 0
          • N
            Nullity last edited by

            I use the DNS Forwarder option;
            "Register DHCP leases in DNS Forwarder" - "If this option is set, then machines that specify their hostname when requesting a DHCP lease will be registered in the DNS forwarder, so that their name can be resolved."

            Easy peasy. (If your have clients with sane hostnames…)

            I think the Resolver has a similar option.

            Please correct any obvious misinformation in my posts.
            -Not a professional; an arrogant ignoramous.

            1 Reply Last reply Reply Quote 0
            • K
              kejianshi last edited by

              It does.  Thats what I was referring to.

              I also recommend making the IPs static lease.

              That way if you ever have issue with names you can easily use IPs also.

              1 Reply Last reply Reply Quote 0
              • N
                Nullity last edited by

                @kejianshi:

                It does.  Thats what I was referring to.

                I also recommend making the IPs static lease.

                That way if you ever have issue with names you can easily use IPs also.

                Sounds like a good idea.

                Just yesterday I did experience a strange side-effect with Mac OS X… the Mac client actually switched it's hostname to the hostname specified by pfSense's DHCP static lease. None of my other Unix-based operating systems have ever done that, thankfully.

                Please correct any obvious misinformation in my posts.
                -Not a professional; an arrogant ignoramous.

                1 Reply Last reply Reply Quote 0
                • D
                  doktornotor Banned last edited by

                  @Nullity:

                  the Mac client actually switched it's hostname to the hostname specified by pfSense's DHCP static lease. None of my other Unix-based operating systems have ever done that, thankfully.

                  Huh, why exactly you'd have non-matching hostnames like this? To confuse the enemy?

                  1 Reply Last reply Reply Quote 0
                  • N
                    Nullity last edited by

                    @doktornotor:

                    @Nullity:

                    the Mac client actually switched it's hostname to the hostname specified by pfSense's DHCP static lease. None of my other Unix-based operating systems have ever done that, thankfully.

                    Huh, why exactly you'd have non-matching hostnames like this? To confuse the enemy?

                    The default Android hostname is "android-755477589854367" and I think you need to be rooted to change it at the client.

                    I cannot think of anything funny to say… octothorpe.

                    Please correct any obvious misinformation in my posts.
                    -Not a professional; an arrogant ignoramous.

                    1 Reply Last reply Reply Quote 0
                    • D
                      doktornotor Banned last edited by

                      Android is a lost cause regarding DHCP. IIRC it does not use the DHCP-supplied DNS servers either, used to be hardcoded to 8.8.8.8 and 8.8.4.4

                      1 Reply Last reply Reply Quote 0
                      • K
                        kejianshi last edited by

                        @doktornotor:

                        @Nullity:

                        the Mac client actually switched it's hostname to the hostname specified by pfSense's DHCP static lease. None of my other Unix-based operating systems have ever done that, thankfully.

                        Huh, why exactly you'd have non-matching hostnames like this? To confuse the enemy?

                        It worked - I'm confused.

                        1 Reply Last reply Reply Quote 0
                        • P
                          p2ranger last edited by

                          Thanks for your help

                          I was able to get it to work.

                          I went to Services->DNS Reslovler. Enable was already marked and I marked DHCP Registration and Static DHCP.

                          I then made sure under Services->DHCP server there was a listing for the computer that has the static IP that I want under DHCP Static Mappings.

                          Is there a way to get this to work without having a static IP? For example a laptop that I want to be able  to access by name when on my network but when it connects some place else it can still take what ever IP it receives at another network?

                          Thanks

                          Jason

                          1 Reply Last reply Reply Quote 0
                          • K
                            kejianshi last edited by

                            DHCP static mapping are this way already.  It doesn't mess with the way a laptop get DHCP IPs on this and that network.  Only the way pfsense assigns their ip.

                            1 Reply Last reply Reply Quote 0
                            • W
                              Waggles last edited by

                              @doktornotor:

                              @Nullity:

                              the Mac client actually switched it's hostname to the hostname specified by pfSense's DHCP static lease. None of my other Unix-based operating systems have ever done that, thankfully.

                              Huh, why exactly you'd have non-matching hostnames like this? To confuse the enemy?

                              Besides Android, some devices have screwed up host names.  The host name populated in the initial static lease for my HP1810-8Gv2 switch looked like nothing in the setup pages on its web server.  Therefore, it became known as "switch" in DNS forwarder and now all is good with the world.

                              1 Reply Last reply Reply Quote 0
                              • P
                                p2ranger last edited by

                                @kejianshi:

                                DHCP static mapping are this way already.  It doesn't mess with the way a laptop get DHCP IPs on this and that network.  Only the way pfsense assigns their ip.

                                Ah yes, thank you. I didn't think about that but should have.

                                Jason

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post