How to completely disable IPV6 on the hypervisor (proxmox 4)

Ovidiu

Renowned Member
Apr 27, 2014
326
12
83
I am finding all sorts of errors like:

Nov 21 11:54:23 james named[7967]: error (network unreachable) resolving 'ns34416.ip-94-23-250.eu/AAAA/IN': 2001:41d0:1:1990::1#53

That line is me trying to setup a nfs storage.

The problem is this was working yesterday and then stopped. I don't much care why, I don't ned IPV6 so the quickest solution I see is to completely disable it.

I did inside bind:
nano /etc/bind/named.conf.options
replaced listen-on-v6 { any; };
with listen-on-v6 { none; };

still no luck.


on the proxmox GUI I removed the IPV6 from my vmbr0, restarted and there is no mentioning of IPV6 in my /etc/network/interfaces
 
Alternatively, can someone help update the wiki for proper IPV6 support?
I found this but its missing some parts: https://pve.proxmox.com/wiki/OVH

- It only says the hosts come preconfigured but I changed mine so I am curious what is a working host configuration for IPV6.
- It explains that for containers we need post-up and pre-down routes, do we also need those for the host?
- In the proxmox GUI for the host you can add IPV6 IP, Prefix length and Gateway. Yet that doesn't yield in a working IPV6 host so I assume I need post-up / pre-down routes?
- The example I linked above doesn't show a gateway entry for IPV6 so should I not enter the gateway in the proxmox GUI?
 
making some progress but despite all these efforts it seems I am only getting a Scope:Link instead of a Global.

ifconfig | grep inet6
inet6 addr: ::1/128 Scope:Host
inet6 addr: fe80::14cf:faff:feb9:9429/64 Scope:Link
inet6 addr: fe80::fc67:e0ff:fef9:ed09/64 Scope:Link
inet6 addr: fe80::222:15ff:feab:1aca/64 Scope:Link
inet6 addr: fe80::3cce:c3ff:feeb:487e/64 Scope:Link

So I basically don't see my IPV6 even though its in my interfaces:

/etc/network/interfaces

iface vmbr0 inet6 static
address 2001:41d0:2:7XXX::1
netmask 64
gateway 2001:41d0:2:7FF:FF:FF:FF:FF
post-up /sbin/ip -f inet6 route add 2001:41d0:2:7FF:FF:FF:FF:FF dev vmbr0
post-up /sbin/ip -f inet6 route add default via 2001:41d0:2:7FF:FF:FF:FF:FF
pre-down /sbin/ip -f inet6 route del default via 2001:41d0:2:7FF:FF:FF:FF:FF
pre-down /sbin/ip -f inet6 route del 2001:41d0:2:7FF:FF:FF:FF:FF dev vmbr0

Found this inside my /etc/sysctl.conf (not added by me, seems standard with OVH)
# Disable IPv6 autoconf
net.ipv6.conf.all.autoconf = 0
net.ipv6.conf.default.autoconf = 0
net.ipv6.conf.vmbr0.autoconf = 0
net.ipv6.conf.all.accept_ra = 0
net.ipv6.conf.default.accept_ra = 0
net.ipv6.conf.vmbr0.accept_ra = 0
net.ipv6.conf.vmbr0.accept_ra = 0
net.ipv6.conf.vmbr0.autoconf = 0
 
Last edited:
OVH comes preconfigured with the post-up/pre-down routes added, note that you also have restart the network for the routes to take effect or add them in manually afterwards.
For the original question, to disable it completely the 'net.ipv6.conf.*.disable_ipv6=1` variables are the ones you want. net.ipv6.conf.all.disable_ipv6=1 etc.

As for a working setup: For one, you should remove the `gateway` line from vmbr0 - the post-up lines do that for you and if you have both the network service will error and refuse to work.
(The main network gui doesn't deal with routes the way the container gui does. (Too much magic for a host configuration) So you have to make sure they're there correctly.)
One more thing to note is you wrote `address 2001:41d0:2:7XXX::1` - specifically the `7XXX` part caught my eye as your route uses `7FF`, is there perhaps one digit missing?
If it's `7XYZ` the gateway starts with `7XFF`, uness you only have 3 digits in that group, then 7FF is fine.
 
Thanks for the reply.
I would have changed the title of my thread but I don't think I can. THanks for pointing out how to disable IPV6 as to my initial request.

I noticed the typo with 7XXX myself and have corrected that.

So according to your advice, I have deleted the "gateway" IP from within the GUI, restarted, added the post-up/down routes and yet no luck.

/etc/network/interfaces contains
iface vmbr0 inet6 static
address 2001:41d0:2:7d4f::1
netmask 64
post-up /sbin/ip -f inet6 route add 2001:41d0:2:7dFF:FF:FF:FF:FF dev vmbr0
post-up /sbin/ip -f inet6 route add default via 2001:41d0:2:7dFF:FF:FF:FF:FF
pre-down /sbin/ip -f inet6 route del default via 2001:41d0:2:7dFF:FF:FF:FF:FF
pre-down /sbin/ip -f inet6 route del 2001:41d0:2:7dFF:FF:FF:FF:FF dev vmbr0

ifconfig yields
vmbr0 Link encap:Ethernet HWaddr 00:22:15:ab:1a:ca

inet6 addr: fe80::222:15ff:feab:1aca/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2744 errors:0 dropped:0 overruns:0 frame:0
TX packets:1756 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:718481 (701.6 KiB) TX bytes:505248 (493.4 KiB)

Yet if i manually execute these 2 lines
/sbin/ip -f inet6 route add 2001:41d0:2:7dFF:FF:FF:FF:FF dev vmbr0
/sbin/ip -f inet6 route add default via 2001:41d0:2:7dFF:FF:FF:FF:FF

things kinda start happening:
root@james:~# ping6 2001:41d0:2:7dFF:FF:FF:FF:FF
PING 2001:41d0:2:7dFF:FF:FF:FF:FF(2001:41d0:2:7dff:ff:ff:ff:ff) 56 data bytes
64 bytes from 2001:41d0:2:7dff:ff:ff:ff:ff: icmp_seq=1 ttl=64 time=7.43 ms
64 bytes from 2001:41d0:2:7dff:ff:ff:ff:ff: icmp_seq=2 ttl=64 time=0.443 ms

root@james:~# ping6 ipv6.google.com
PING ipv6.google.com(par10s22-in-x0e.1e100.net) 56 data bytes
From par10s22-in-x0e.1e100.net icmp_seq=1 Destination unreachable: Beyond scope of source address
From par10s22-in-x0e.1e100.net icmp_seq=2 Destination unreachable: Beyond scope of source address
From par10s22-in-x0e.1e100.net icmp_seq=3 Destination unreachable: Beyond scope of source address
 
This ifconfig output doesn't show the 2001::* address, so the interface wasn't properly brought up. What does `ifup vmbr0` show, or, If your connection to the server console doesn't depend on vmbr0, try `ifdown vmbr0` and then `ifup vmbr0`. The ifdown command might complain that it's not configured.
 
Exactly! the 2001:::: address is missing. Just don't know why. Have rebooted several times as I heard that is needed instead of just restarting the network.

ifup vmbr0


Waiting for vmbr0 to get ready (MAXWAIT is 2 seconds).
RTNETLINK answers: File exists
Failed to bring up vmbr0.

I can't do an ifdown/ifup unfortunately as that would cut my connection.
Just in case it helps, I've got a server from soyoustart that's a subsidiary of OVH. I got 1 IPV4 + 16IPV4 + a /64 IPV6 address block which I'm trying to use here. So I just picked the first available one from my block: 2001:41d0:2:7XXX::1 and am trying ot assign it to my host.
 
Last edited:
But this should actually work after a reboot, the inet6 section in your /etc/network/interfaces file definitely looks right to me and so do the sysctl values.
'File exists' happens when there's already a route present. Make sure that the sysctl variables are set like you pasted in the third post and delete the ipv6 addresses and default routes. (`ip -6 addr flush dev vmbr0 && ip -6 route del default`, also `ip -6 route del 2001:41d0:2:7dFF:FF:FF:FF:FF dev vmbr0`) Then try ifup vmbr0 again.
If that doesn't help, try adding the actual ip address manually before then also adding the routes like you did in an earlier post.
 
ok, so I made sure:

- the sysctl value are as posted above
- the network interfaces looks as posted above
- removed the routes as you showed me above
Tried again:
ifup vmbr0


Waiting for vmbr0 to get ready (MAXWAIT is 2 seconds).
RTNETLINK answers: File exists
Failed to bring up vmbr0.

route -6
Kernel IPv6 routing table
Destination Next Hop Flag Met Ref Use If
::1/128 :: U 256 0 0 lo
fe80::/64 :: U 256 0 0 vmbr1
fe80::/64 :: U 256 0 0 tap101i0
fe80::/64 :: U 256 0 0 veth100i0
fe80::/64 :: U 256 0 0 veth102i0
::/0 :: !n -1 1 25583 lo
::1/128 :: Un 0 7 47 lo
fe80::3c7d:3ff:fe28:73bf/128 :: Un 0 1 0 lo
fe80::d8c3:bbff:fe42:5153/128 :: Un 0 1 0 lo
fe80::fc22:b3ff:fed6:c2c5/128 :: Un 0 1 0 lo
fe80::fce8:58ff:fe32:ca63/128 :: Un 0 1 0 lo
ff00::/8 :: U 256 0 0 vmbr1
ff00::/8 :: U 256 6 13050 vmbr0
ff00::/8 :: U 256 0 0 tap101i0
ff00::/8 :: U 256 0 0 veth100i0
ff00::/8 :: U 256 0 0 veth102i0
::/0 :: !n -1 1 25583 lo

and an ifconfig only shows me the IPV4 address for vmbr0.

not sure what you mean there:
delete the ipv6 addresses
and here
If that doesn't help, try adding the actual ip address manually before

all I did was execute the commands you gave:
ip -6 addr flush dev vmbr0 && ip -6 route del default
ip -6 route del 2001:41d0:2:7dFF:FF:FF:FF:FF dev vmbr0
 
Well, I don't see it. The config looks right, so a normal boot should bring it up unless some boot services are broken or other weird stuff going on. And at the very least configuring the network manually should work.
Did you ever get to a point where both the address and gateway were actually configured and showed up in `ip addr show` and `ip route show`? If not, try it the manual way.
If you do get to a point where address and route are configured and you still don't get any ipv6 connection, then you could ask the soyoustart/OVH support for help. Since they tend to block machines with broken routing setups I can't rule that out as a possible cause either.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!