How to add 20 static IPs to resolver?

  • I have many test machines and VMs on my local network. I'd like to add them to the DNS entries on pfSense, but have two issues:

    1. I don't use FQDN, I just use hostnames. If I try to use the override feature, it pukes because of this.

    2. Even if I did have FQDN's, I'd rather not enter them one-by-one in the GUI. Is there a text file somewhere I can add them to all at once?


  • Rebel Alliance Developer Netgate

    1. That's what your "search domain" is for. Match the domain on the overrides to whatever your local systems use for their own search domains and then use those short names. It's the only valid way for that to work.

    2. Not really, you could edit them into config.xml if you really want. Add a couple and see what the format looks like, then make the remaining entries.

  • LAYER 8 Global Moderator

    "1) I don't use FQDN, I just use hostnames"

    While jimp answer is correct for short hand only wanting to put in a shortname and letting the system add the suffix for you.  It is pure bad practice to not use a FQDN.. Does does not work via host name, but a fqdn.  So you can get lazy and let the system add the domain part for you.  You should always use fqdn when doing any sort of dns query and not rely on a suffix search to do it for you.

    Vs adding them via xml - you can always just load a file in unbound that has your entries in there for you.  In the custom/advanced box..

    include: /etc/unbound_ad_servers
    include: /etc/unbound_mystuff

    Here are 2 files that I load into unbound that have stuff in them, one is ad_servers I redirect and another is my stuff I load.

    Another option which is normally the case with stuff you want to put in dns for your hosts is just setup a dhcp reservation for them, ie a static and register your static in the resolver.  Then all you have to do is create the static host entries and you kill 2 birds with 1 stone.

Log in to reply