I'm trying to access my containers using their hostnames but I can't get it to work, I can only access them using their IP address. I've checked DNS and DHCP settings but don't see anything out of place: see below.
Also, I noticed in pfSense, which runs my DHCP server, the containers are listed in the DHCP leases but only show an IP address rather than a hostname like the other hosts in the DHCP leases list.
I've checked the settings in proxmox and I think I have them all set correctly but I still have this issue.
The container hostname
/etc/resolv.conf
In pfSense, I have the DNS resolver set with both the following options on which should pick up the hostnames of the containers when they request an IP:
Register DHCP static mappings in the DNS Resolver
Register DHCP leases in the DNS Resolver
The DHCP server on pfSense also has the "Domain Name" option set to local.lan
I can access proxmox using its hostname. But I think that's only because I've mapped it to a static IP in pfSense
The proxmox ve node hosts.
Any help getting this sorted would really be appreciated.
Also, I noticed in pfSense, which runs my DHCP server, the containers are listed in the DHCP leases but only show an IP address rather than a hostname like the other hosts in the DHCP leases list.
I've checked the settings in proxmox and I think I have them all set correctly but I still have this issue.
The container hostname
Bash:
root@docker ~# hostname -f
docker.local.lan
Code:
GNU nano 5.4 /etc/hosts
127.0.0.1 localhost
127.0.1.1 core
#Required for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
# --- BEGIN PVE ---
127.0.1.1 docker.local.lan docker
# --- END PVE ---
/etc/resolv.conf
Code:
# --- BEGIN PVE ---
search local.lan
nameserver 192.168.1.2
# --- END PVE ---
In pfSense, I have the DNS resolver set with both the following options on which should pick up the hostnames of the containers when they request an IP:
Register DHCP static mappings in the DNS Resolver
Register DHCP leases in the DNS Resolver
The DHCP server on pfSense also has the "Domain Name" option set to local.lan
I can access proxmox using its hostname. But I think that's only because I've mapped it to a static IP in pfSense
The proxmox ve node hosts.
Code:
127.0.0.1 localhost.localdomain localhost
192.168.1.219 proxmoxve.local.lan proxmoxve
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Any help getting this sorted would really be appreciated.