IPV6 forwarding problem

chupnik

Member
Jun 2, 2013
10
0
21
St. Petersburg, Russia
After several attempts, decided to ask a question in the forum.
Intuition tells me that this is due PVE specific scripts:confused:

I can't set up IPV6 forwarding is not one of those ways?
1.
Code:
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
2.
Code:
sysctl -w net.ipv6.conf.all.forwarding=1
3.
Code:
echo "net.ipv6.conf.all.forwarding=1" > /etc/sysctl.conf

After reboot host machine i get this:
Code:
cat /proc/sys/net/ipv6/conf/all/forwarding
0

IPV6 forwarding working if i set up it manuall through
Code:
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
But it works only before reboot.
 
3.
Code:
echo "net.ipv6.conf.all.forwarding=1" > /etc/sysctl.conf
In case that this is not a typo: remember that using ">" will overwrite the whole file and put that one line as the only one into it, which clearly isnt what youd want
 
Yes, it's my typo. My sysctl.conf file already has a net.ipv6.conf.all.forwarding=1
But it turns off after reboot.
I also tried to add it to post-up in eth0 section, but without success.
 
hes describing something you dont really need. what you do need however is accept_ra to be 0. heres how the complete sysctl.conf of one of my ipv6-enabled nodes looks like:
Code:
net.ipv6.conf.all.proxy_ndp=1
net.ipv6.conf.default.autoconf=0
net.ipv6.conf.default.accept_ra=0
net.ipv6.conf.default.accept_ra_defrtr=0
net.ipv6.conf.default.accept_ra_rtr_pref=0
net.ipv6.conf.default.accept_ra_pinfo=0
net.ipv6.conf.default.accept_source_route=0
net.ipv6.conf.default.accept_redirects=0
net.ipv6.conf.default.forwarding=1
net.ipv6.conf.all.autoconf=0
net.ipv6.conf.all.accept_ra=0
net.ipv6.conf.all.accept_ra_defrtr=0
net.ipv6.conf.all.accept_ra_rtr_pref=0
net.ipv6.conf.all.accept_ra_pinfo=0
net.ipv6.conf.all.accept_source_route=0
net.ipv6.conf.all.accept_redirects=0
net.ipv6.conf.all.forwarding=1
 
Well the above works for me and I'm at a loss of ideas why it wouldn't do the same for you (unless theres something like NetworkManager on your server, which would mess up pretty much everything).
 
This line
Code:
up sysctl -p # <------ ADDED THIS LINE TO FIX IPv6 CONNECTIVITY ISSUES

in inet6 section of /etc/network/interfaces fix this problem.

All ipv6 related settings from /etc/sysctl.conf works after reboot!

For example
Code:
iface eth0 inet6 static
address    YOUR:IPV6:IS:HERE
netmask    64
up ip -6 route add default via fe80::1 dev eth0
up sysctl -p # <------ ADDED THIS LINE TO FIX IPv6 CONNECTIVITY ISSUES
 
Last edited:
Reason is that the ipv6 module is not loaded by default in the 2.6.32 kernel (3.10 loads this automatically).


you need to add the ipv6 module in /etc/modules
___
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.
ipv6
__

then all ipv6 setting in /etc/sysctl.conf works
 
Reason is that the ipv6 module is not loaded by default in the 2.6.32 kernel (3.10 loads this automatically).

But I managed to enable IPV6 forwarding in /etc/sysctl.conf using this code in /etc/network/interfaces:
Code:
iface eth0 inet6 static
  address xxxx:xxxx:xxxx:xxxx::2
  netmask 128
  gateway xxxx:xxxx:xxxx:xxxx::1
  up sysctl -p
The last line makes all the magic;)
 

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!