Override pfSense hostname DNS entry

  • This is a minute issue on which I didn't manage to find any information anywhere, from what I see pfSense's hostname automatically points itself to one of the physical local interfaces, without digging through system configuration files.
    I was wondering if there is any way to override this entry and make it resolve to a custom address; for example pfsense.localnet > (VLAN20) instead of it being pointed to the physical interface eg. pfsense.lan >

  • Banned

  • That's the first thing I tried, but it just pushes the IP I set below the one it sets itself.

  • @tantkomo Connect your pfSense lan interface to vlan20. Assign static ip to lan interface. Assign pfsense as hostname and localnet as domain.

  • @gjaltemba You mean I should assign the LAN interface to be the parent of the VLAN20 interface or bridge them together?

  • LAYER 8 Global Moderator

    The name set in pfsense will point to the lan IP.. If you create vlans then just create host overrides that point to those.

    So for example.. here are couple of vlans I have setup and how the IPs of pfsense resolve them

    C:\>dig sg4860.wlan.local.lan +short
    C:\>dig -x +short

    The name setup in system for my local pfsense is sg4860.local.lan which yeah very imaginative name ;)

    C:\>dig sg4860.local.lan +short

    So for any hosts you put in your different vlans create host overrides for them say host.vlan.domain.tld which can be anything you want them to be..

    The use of unbound to resolve your local stuff for a few domains or subdomains is fine if handful of devices, etc... But once your network grows you prob going to want a true authoritative ns for you local domains.. Which is not what unbound really meant to do.. Bind would be better choice for authoritative name services.

  • @tantkomo It depends on what you are trying to achieve.

    Will pfsense.localnet have one or two ip ( or/and

  • @gjaltemba It only has the VLAN interface assigned, the parent interface is unassigned, which is my problem, the default hostname points to it

  • LAYER 8 Global Moderator

    Points to what if its not assigned?

    LAN would be assigned to your vlan then and that is what it would respond with for IP..


    ; EDNS: version: 0, flags:; udp: 4096
    ;pfsense.localdomain.           IN      A
    pfsense.localdomain.    3600    IN      A

    Yes the system name is going to point to the ip assigned to the LAN interface...

    If your not wanting to use the untagged network of the physical interface of LAN and want vlan 20 to be your lan - then setup the lan interface to use vlan 20 as like my above pic and set the name of pfsense to whatever it is you want. Now that name will return the IP of vlan 20. In other words LAN...