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 > 192.168.20.1 (VLAN20) instead of it being pointed to the physical interface eg. pfsense.lan > 192.168.1.1?
Grimson Banned last edited by
That's the first thing I tried, but it just pushes the IP I set below the one it sets itself.
gjaltemba last edited by
@tantkomo Connect your pfSense lan interface to vlan20. Assign static ip 192.168.20.1 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?
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 192.168.2.253 C:\>dig -x 192.168.3.253 +short sg4860.dmz.local.lan.
The name setup in system for my local pfsense is sg4860.local.lan which yeah very imaginative name ;)
C:\>dig sg4860.local.lan +short 192.168.9.253
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.
gjaltemba last edited by
@tantkomo It depends on what you are trying to achieve.
Will pfsense.localnet have one or two ip (192.168.1.1 or/and 192.168.20.1)?
@gjaltemba It only has the VLAN interface assigned, the parent interface is unassigned, which is my problem, the default hostname points to it
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..
;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;pfsense.localdomain. IN A ;; ANSWER SECTION: pfsense.localdomain. 3600 IN A 192.168.3.45
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...