Proxmox VE and Management on IPv6

I try to run IPv6 all the things, these days. It makes connectivity from the outside world (when needed) much easier; once DNS is set up, who needs to connect via IP address anyway?

I knew connectivity worked because I could ssh to the IPv6 address, but pveproxy was being a pain (as usual). Turns out, it looks at /etc/hosts for the hostname on startup, to figure out where to bind to.

The second line in the hosts file (full file below) was proxmox. Adding ::1 to the start of it and restarting pveproxy fixed the issue (systemctl restart pveproxy). It now binds to port 8006 on all protocols instead of just IPv4.

How to tell it’s only on v4:

State  Recv-Q  Send-Q      Local Address:Port    Peer Address:Port
LISTEN 0       128*            users:(("pveproxy worker",pid=16766,fd=6),("pveproxy worker",pid=16765,fd=6),("pveproxy worker",pid=16764,fd=6),("pveproxy",pid=1941,fd=6))

How it looks now:

State    Recv-Q    Send-Q     Local Address:Port   Peer Address:Port
LISTEN   0         128        *:8006               *:*                users:(("pveproxy worker",pid=10647,fd=6),("pveproxy worker",pid=10644,fd=6),("pveproxy worker",pid=10643,fd=6),("pveproxy",pid=10642,fd=6))

My hosts file now looks like this: localhost.localdomain localhost
::1 proxmox 
# 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


#proxmox #linux #howto #ipv6