127.0.0.1 localhost.localdomain localhost
109.xx.xx.xxx pve-rs1.mydomain.net pve-rs1 pvelocalhost
# 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
root@pve-rs1:~# cat /etc/network/interfaces
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage part of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!
auto lo
iface lo inet loopback
allow-vmbr0 eth0
iface eth0 inet manual
ovs_type OVSPort
ovs_bridge vmbr0
pre-up /sbin/ethtool -s eth0 autoneg off speed 100 duplex full
allow-vmbr2 eth1
iface eth1 inet manual
ovs_type OVSPort
ovs_bridge vmbr2
pre-up /sbin/ethtool -s eth1 autoneg off speed 100 duplex full
auto vmbr0
iface vmbr0 inet static
address 109.xxx.xxx.xxx
netmask 255.255.xxx.xxx
gateway 109.xxxx.xxx.xxx
ovs_type OVSBridge
ovs_ports eth0
iface vmbr0 inet6 static
address 2001:1b40:xxxx:xxx::2
netmask 64
gateway 2001:1b40:xxxx:xxxx::1
auto vmbr1
iface vmbr1 inet manual
ovs_type OVSBridge
#Internal
auto vmbr2
iface vmbr2 inet manual
ovs_type OVSBridge
ovs_ports eth1
#RSport2
sub get_host_address_family {
my ($hostname, $socktype) = @_;
my @res = getaddrinfo_all($hostname, socktype => $socktype);
return $res[0]->{family};
}
It does bind to the wildcard address, but it uses the first address' family.
So only if your hostname resolves to an ipv6 address first it'll use ipv6. Given that we don't set bindv6only we could probably always use ipv6 if it's somewhere in the array used in the above function.
root@pve:~# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
::ffff:10.0.0.53 pve.dev.example.org pve pvelocalhost
# 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
root@pve:~# netstat -anlpt | grep 8006
tcp6 0 0 :::8006 :::* LISTEN 11181/pveproxy
root@pve:~#
root@pve:~# curl -vk "https://127.0.0.1:8006" 2>&1 | grep "OK"
< HTTP/1.1 200 OK
root@pve:~# curl -vk "https://[::1]:8006" 2>&1 | grep "OK"
< HTTP/1.1 200 OK