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



  • 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


  • LAYER 8 Netgate

    DNS Forwarder or DNS Resolver Host overrides.



  • 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?



  • 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.



  • 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.



  • @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.


  • Banned

    @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?



  • @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.


  • Banned

    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



  • @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.



  • 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



  • 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.



  • @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.



  • @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


Log in to reply