Alias with PC hostname
-
I need to create a "Users_PC" alias. I know the hostname of these PCs.
Today I have to assign a static IP in the DHCP and then enter this IP in the list of IPs of this Alias.
Alternatively, I have to use the DNS Lookup for each PC, from here create the alias of each single PC and then, finally, insert all these single aliases into the "main alias".I was wondering if there wasn't another way to directly enter the hostname in the main alias.
In DNS Resolver there are the two options DHCP Registration and Static DHCP.
I thought that already with these hostnames could already be used for aliases, but that's not the case. -
@darkcorner pfSense has to resolve the alias. If you're using a PC name by itself DNS can't look that up.
If pfSense is providing DHCP, DNS Resolver has a checkbox "DHCP Registration" to register leases with the pfSense domain name. Note that restarts the DNS server at each lease renewal/registration.
If you happen to have a Windows domain, you should be able to use pcname.domain.lan and then have pfSense DNS Resolver set with a Domain Override to forward queries for domain.lan to the local DNS server. If the Windows DHCP server is set to register IPs in DNS then the pcname.domain.lan should resolve.
-
@steveits
I have enabled both option DHCP Registration and option Static DHCP, but in the DNS Resolver there are no PCs or a devices connected with DHCP or static IP.
There are only references to external domains. -
@darkcorner if you want to put pc names into an alias, and they are not working - first thing to do is make sure that the alias actually gets populated. And is the correct IP.. Look in your alias under diagnostic tables..
So you see the entry?
So for example as test I just create a rule, with my i9-win.local.lan PC in at 192.168.9.100, and using my a port alias I had setup..
-
I did the test with my PC, which has a static IP assigned by DHCP.
In DNS resolver this PC is not there.However I understand what you are telling me and it is right. That's how it works for me too.
Maybe I explained myself wrong.
When creating a host alias, in the "IP or FQDN" field you can enter other aliases and just type a letter that all aliases starting with that letter appear.
I was hoping to also find the names of the devices already referenced with DHCP.
To be able to do this, I must first do the DNS lookup, typing the name of the device.
Then I have to add an alias. But so I'm going to create a very long list of single aliases, only to find them in the list.At this point, having to already write the device name in the DNS Lookup, then I can type it directly in the list.
Thanks for your help.
-
@darkcorner so you want to put in the specific pc fqdn in your rule via having to create an alias?
So in my example of i9-win.local.lan you want to just put that in your rule..
Yeah I don't believe they allow for that it needs to be the IP or network or an alias, that would contain the IPs or Networks, etc.
-
@darkcorner I create one alias per hostname and then stack these aliases together as needed.