How can I set up a Proxmox 6.2 on OVH? I got 2 failovers IPs I want to set with IPv4 and IPv6 in a routing configuration to 1 LXC Container.
Any hints?
Any hints?
Last edited:
/etc/network/interfaces
auto lo
iface lo inet loopback
auto eno1
iface eno1 inet static
address 51.XXX.53.186/24
gateway 51.XXX.53.254
iface eno1 inet6 static
address 2001:41d1:XXXX:17ba::/64
gateway 2001:41d1:XXXX:17FF:FF:FF:FF:FF
auto eno1:0
iface eno1:0 inet static
address 51.XXX.245.61
netmask 255.255.255.255
auto eno1:1
iface eno1:1 inet static
address 51.XXX.245.70
netmask 255.255.255.255
auto vmbr0
iface vmbr0 inet static
address 192.168.1.1
netmask 255.255.255.0
bridge-ports none
bridge-stp off
bridge-fd 0
auto vmbr1
iface vmbr1 inet static
address 192.168.2.1
netmask 255.255.255.0
bridge-ports none
bridge-stp off
bridge-fd 0
iface eno2 inet manual
iface enp0s20f0u8u3c2 inet manual
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up /sbin/ip -f inet6 route add 2001:41d1:XXXX:17FF:FF:FF:FF:FF dev eno1
post-up /sbin/ip -f inet6 route add default via 2001:41d1:XXXX:17FF:FF:FF:FF:FF
pre-down /sbin/ip -f inet6 route del 2001:41d1:XXXX:17FF:FF:FF:FF:FF dev eno1
pre-down /sbin/ip -f inet6 route del default via 2001:41d1:XXXX:17FF:FF:FF:FF:FF
/etc/sysctl.conf
net.ipv4.conf.all.rp_filter=1
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.conf.default.forwarding=1
net.ipv4.conf.default.proxy_arp=0
net.ipv4.ip_forward=1
kernel.sysrq=1
net.ipv4.conf.default.send_redirects=1
net.ipv4.conf.all.send_redirects=0
net.ipv6.conf.eno1.autoconf=0
net.ipv6.conf.eno1.accept_ra=0
net.ipv6.conf.all.accept_redirects=0
net.ipv6.conf.all.router_solicitations=1
net.ipv6.conf.default.forwarding=1
net.ipv6.conf.all.forwarding=1
net.ipv6.conf.default.proxy_ndp=1
net.ipv6.conf.all.proxy_ndp=1
/etc/sysctl.conf
net.ipv6.conf.eno1.autoconf=0
net.ipv6.conf.eno1.accept_ra=0
net.ipv6.conf.all.accept_redirects=0
net.ipv6.conf.all.router_solicitations=1
net.ipv6.conf.default.forwarding=1
net.ipv6.conf.all.forwarding=1
net.ipv6.conf.default.proxy_ndp=1
net.ipv6.conf.all.proxy_ndp=1
/etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.2.100
netmask 255.255.255.0
gateway 192.168.2.1
iface eth0 inet6 static
address 2001:41d1:XXXX:17ba::2:100
netmask 64
# --- BEGIN PVE ---
post-up ip route add 2001:41d1:XXXX:17FF:FF:FF:FF:FF dev eth0
post-up ip route add default via 2001:41d1:XXXX:17FF:FF:FF:FF:FF dev eth0
pre-down ip route del default via 2001:41d1:XXXX:17FF:FF:FF:FF:FF dev eth0
pre-down ip route del 2001:41d1:XXXX:17FF:FF:FF:FF:FF dev eth0
# --- END PVE ---
traceroute6 ipv6.google.com
). I have to run that every time I reboot, and I have to run it in the Proxmox host itself and in every LXC Container (I didn't try on VMs). I cannot really understand why. Does anyone have an explanation?/etc/network/interfaces
auto lo
iface lo inet loopback
iface lo inet6 loopback
auto vmbr0
iface vmbr0 inet static
address 51.XXX.53.186
netmask 255.255.255.0
gateway 51.XXX.53.254
bridge_ports eno1
bridge_stp off
bridge_fd 0
pointopoint 51.XXX.53.254
iface vmbr0 inet6 static
address 2001:XXXX:403:17ba::1
netmask 64
post-up sysctl -p
post-up /sbin/ip -f inet6 route add 2001:XXXX:XXXX:17FF:FF:FF:FF:FF dev vmbr0
post-up /sbin/ip -f inet6 route add default via 2001:XXXX:XXXX:17FF:FF:FF:FF:FF
pre-down /sbin/ip -f inet6 route del 2001:XXXX:XXXX:17FF:FF:FF:FF:FF dev vmbr0
pre-down /sbin/ip -f inet6 route del default via 2001:XXXX:XXXX:17FF:FF:FF:FF:FF
post-up ip -6 neigh replace 2001:XXXX:XXXX:17FF:FF:FF:FF:FF dev vmbr0 lladdr 00:05:73:a0:00:01
post-up ip -6 neigh replace 2001:XXXX:XXXX:17ba::4 dev vmbr0 lladdr 26:0A:E7:42:BA:3E
iface enp0s20f0u8u3c2 inet manual
iface eno2 inet manual
/etc/sysctl.conf
### IPv4
net.ipv4.conf.all.rp_filter=1
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.conf.default.forwarding=1
net.ipv4.conf.default.proxy_arp=0
net.ipv4.ip_forward=1
kernel.sysrq=1
net.ipv4.conf.default.send_redirects=1
net.ipv4.conf.all.send_redirects=0
### IPv6
net.ipv6.conf.all.autoconf=0
net.ipv6.conf.all.accept_ra=0
net.ipv6.conf.all.forwarding=1
net.ipv6.conf.default.forwarding=1
net.ipv6.conf.default.proxy_ndp=1
net.ipv6.conf.all.proxy_ndp=1
/etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet6 static
address 2001:XXXX:XXXX:17ba::4
netmask 64
gateway 2001:XXXX:XXXX:17ba::1
/etc/sysctl.conf
net.ipv6.conf.all.autoconf=0
net.ipv6.conf.all.accept_ra=0
net.ipv6.conf.all.proxy_ndp=1
net.ipv6.conf.default.proxy_ndp=1
root@srv001:~# ping6 ipv6.google.com
PING ipv6.google.com(par10s38-in-x0e.1e100.net (2a00:1450:4007:805::200e)) 56 data bytes
^C
--- ipv6.google.com ping statistics ---
8 packets transmitted, 0 received, 100% packet loss, time 183ms
root@srv001:~# traceroute6 ipv6.google.com
traceroute to ipv6.google.com (2a00:1450:4007:805::200e), 30 hops max, 80 byte packets
1 * * *
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 google.as15169.fr.eu (2001:41d0::832) 6.442 ms 6.450 ms 6.430 ms
8 2001:4860:0:1015::1 (2001:4860:0:1015::1) 6.449 ms 6.447 ms 6.468 ms
9 2001:4860:0:1018::1 (2001:4860:0:1018::1) 7.244 ms 2001:4860:0:1::bd5 (2001:4860:0:1::bd5) 7.720 ms *
10 par10s38-in-x0e.1e100.net (2a00:1450:4007:805::200e) 6.367 ms 6.367 ms 6.359 ms
root@srv001:~# ping6 ipv6.google.com
PING ipv6.google.com(par10s38-in-x0e.1e100.net (2a00:1450:4007:805::200e)) 56 data bytes
64 bytes from par10s38-in-x0e.1e100.net (2a00:1450:4007:805::200e): icmp_seq=1 ttl=54 time=6.39 ms
64 bytes from par10s38-in-x0e.1e100.net (2a00:1450:4007:805::200e): icmp_seq=2 ttl=54 time=6.57 ms
^C
--- ipv6.google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 2ms
rtt min/avg/max/mdev = 6.390/6.479/6.569/0.120 ms
/etc/network/interfaces
# loopback
auto lo
iface lo inet loopback
iface lo inet6 loopback
# Interface #1 (Main IPv4)
auto eno1
iface eno1 inet static
address 51.XX.53.186/24
gateway 51.XX.53.254
# Interface #1 (Main IPv6)
iface eno1 inet6 static
address 2001:41d0:XXXX:17ba::1
netmask 128
post-up /sbin/ip -f inet6 route add 2001:41d0:XXXX:17FF:FF:FF:FF:FF dev eno1
post-up /sbin/ip -f inet6 route add default via 2001:41d0:XXXX:17FF:FF:FF:FF:FF
pre-down /sbin/ip -f inet6 route del 2001:41d0:XXXX:17FF:FF:FF:FF:FF dev eno1
pre-down /sbin/ip -f inet6 route del default via 2001:41d0:XXXX:17FF:FF:FF:FF:FF
# IPv4 Failover #1
auto eno1:0
iface eno1:0 inet static
address 51.XXX.245.61
netmask 255.255.255.255
# IPv4 Failover #2
auto eno1:1
iface eno1:1 inet static
address 51.XXX.245.70
netmask 255.255.255.255
# IPv4 Bridge #1
auto vmbr0
iface vmbr0 inet static
address 192.168.1.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
# IPv6 Bridge #1
iface vmbr0 inet6 static
address 2001:41d0:XXXX:17ba::2
netmask 64
post-up /sbin/ip -f inet6 route add 2001:41d0:XXXX:17ba::/64 dev vmbr0
pre-down /sbin/ip -f inet6 route del 2001:41d0:XXXX:17ba::/64 dev vmbr0
# IPv4 Bridge #2
auto vmbr1
iface vmbr1 inet static
address 192.168.2.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
iface vmbr1 inet6 static
address 2001:41d0:XXXX:17ba::2:1
netmask 64
post-up /sbin/ip -f inet6 route add 2001:41d0:XXXX:17ba::/64 dev vmbr1
pre-down /sbin/ip -f inet6 route del 2001:41d0:XXXX:17ba::/64 dev vmbr1
# Interface #2
iface eno2 inet manual
# Interface #3
iface enp0s20f0u8u3c2 inet manual
post-up sysctl -p
post-up iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eno1 -j SNAT --to-source 51.XXX.245.61
post-up iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -o eno1 -j SNAT --to-source 51.XXX.245.70
/etc/sysctl.conf
### IPv4
net.ipv4.conf.all.rp_filter=1
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.conf.default.forwarding=1
net.ipv4.conf.default.proxy_arp=0
net.ipv4.ip_forward=1
kernel.sysrq=1
net.ipv4.conf.default.send_redirects=1
net.ipv4.conf.all.send_redirects=0
### IPv6
net.ipv6.conf.all.autoconf=0
net.ipv6.conf.all.accept_ra=0
net.ipv6.conf.vmbr0.forwarding=1
net.ipv6.conf.vmbr1.forwarding=1
/etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet6 static
address 2001:41d0:XXXX:17ba::100
netmask 64
gateway 2001:41d0:XXXX:17ba::2
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
/etc/sysctl.conf
net.ipv6.conf.all.autoconf=0
net.ipv6.conf.all.accept_ra=0
IPV6 working?Ladies and gentlemen, I made it working I'll post the solution as soon as I can.
apt-get install npd6
/etc/npd6.conf
...
prefix=2001:41d0:XXXX:17ba:
interface = vmbr0
...
/etc/sysctl.conf
vm.max_map_count=262144
fs.protected_hardlinks=1
fs.protected_symlinks=1
### IPv4
net.ipv4.conf.all.rp_filter=1
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.conf.default.forwarding=1
net.ipv4.conf.default.proxy_arp=0
net.ipv4.ip_forward=1
kernel.sysrq=1
net.ipv4.conf.default.send_redirects=1
net.ipv4.conf.all.send_redirects=0
### IPv6
net.ipv6.conf.eno1.autoconf=0
net.ipv6.conf.vmbr0.autoconf=0
net.ipv6.conf.eno1.accept_ra=0
net.ipv6.conf.vmbr0.accept_ra=0
net.ipv6.conf.all.accept_redirects=0
net.ipv6.conf.all.router_solicitations=1
net.ipv6.conf.all.forwarding=1
net.ipv6.conf.default.forwarding=1
net.ipv6.conf.all.proxy_ndp=1
net.ipv6.conf.default.proxy_ndp=1
net.ipv6.bindv6only=1
/etc/network/interfaces
auto lo
iface lo inet loopback
iface lo inet6 loopback
auto eno1
iface eno1 inet manual
auto vmbr0
# Main IPv4 Bridge
iface vmbr0 inet static
address 51.XXX.53.186
netmask 255.255.255.0
gateway 51.XXX.53.254
bridge_ports eno1
bridge_stp off
bridge_fd 0
# Failover IP #1
up ip addr add 51.XXX.245.61/32 dev vmbr0
down ip addr del 51.XXX.245.61/32 dev vmbr0
# Failover IP #2
up ip addr add 51.XXX.245.70/32 dev vmbr0
down ip addr del 51.XXX.245.70/32 dev vmbr0
# Internal network #1
up ip addr add 192.168.1.1/24 dev vmbr0
down ip addr del 192.168.1.1/24 dev vmbr0
# Internal network #2
up ip addr add 192.168.2.1/24 dev vmbr0
down ip addr del 192.168.2.1/24 dev vmbr0
# Main IPv6 address
iface vmbr0 inet6 static
address 2001:41d0:XXXX:17ba::ffff
netmask 128
# IPv6 Gateway
post-up sleep 5; /sbin/ip -6 route add 2001:41d0:XXXX:17FF:FF:FF:FF:FF dev vmbr0
post-up sleep 5; /sbin/ip -6 route add default via 2001:41d0:XXXX:17FF:FF:FF:FF:FF
pre-down /sbin/ip -6 route del default via 2001:41d0:XXXX:17FF:FF:FF:FF:FF
pre-down /sbin/ip -6 route del 2001:41d0:XXXX:17FF:FF:FF:FF:FF dev vmbr0
# Adding IPv6 Gateway to the neighbors
post-up /sbin/ip -f inet6 neigh add proxy 2001:41d0:XXXX:17FF:FF:FF:FF:FF dev vmbr0
# Enabling NPD and Forwarding
post-up echo 1 > /proc/sys/net/ipv6/conf/all/proxy_ndp
post-up echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
post-up echo 1 > /proc/sys/net/ipv6/conf/default/forwarding
/etc/resolv.conf
search myserver.com
nameserver 2001:4860:4860::8888
nameserver 8.8.8.8
-A POSTROUTING -s 192.168.1.0/24 -o eno1 -j SNAT --to-source 51.XXX.245.61
-A POSTROUTING -s 192.168.2.0/24 -o eno1 -j SNAT --to-source 51.XXX.245.70
# Some rule to a Container with IP 192.168.1.100
-A PREROUTING -p tcp -m tcp -d 51.XXX.245.61 -i vmbr0 --dport 80 -j DNAT --to-destination 192.168.1.100:80
# Some rule to a Container with IP 192.168.2.100
-A PREROUTING -p tcp -m tcp -d 51.XXX.245.70 -i vmbr0 --dport 80 -j DNAT --to-destination 192.168.2.100:80
root@srv001:~/# ping google.com
PING google.com(fra16s12-in-x0e.1e100.net (2a00:1450:4001:818::200e)) 56 data bytes
64 bytes from fra16s12-in-x0e.1e100.net (2a00:1450:4001:818::200e): icmp_seq=1 ttl=51 time=4.50 ms
64 bytes from fra16s12-in-x0e.1e100.net (2a00:1450:4001:818::200e): icmp_seq=2 ttl=51 time=4.58 ms
64 bytes from fra16s12-in-x0e.1e100.net (2a00:1450:4001:818::200e): icmp_seq=3 ttl=51 time=3.57 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 4ms
rtt min/avg/max/mdev = 3.571/4.215/4.578/0.456 ms
root@srv001:~/# ping6 ipv6.google.com
PING ipv6.google.com(fra15s17-in-x0e.1e100.net (2a00:1450:4001:81c::200e)) 56 data bytes
64 bytes from fra15s17-in-x0e.1e100.net (2a00:1450:4001:81c::200e): icmp_seq=1 ttl=51 time=4.34 ms
64 bytes from fra15s17-in-x0e.1e100.net (2a00:1450:4001:81c::200e): icmp_seq=2 ttl=51 time=4.33 ms
64 bytes from fra15s17-in-x0e.1e100.net (2a00:1450:4001:81c::200e): icmp_seq=3 ttl=51 time=4.26 ms
^C
--- ipv6.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 4ms
rtt min/avg/max/mdev = 4.263/4.313/4.343/0.064 ms
/etc/network/interfaces
auto lo
iface lo inet loopback
iface lo inet6 loopback
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
iface eth0 inet6 static
address 2001:41d0:XXXX:17ba::1:100
netmask 64
# --- BEGIN PVE ---
post-up ip route add 2001:41d0:XXXX:17FF:FF:FF:FF:FF dev eth0
post-up ip route add default via 2001:41d0:XXXX:17FF:FF:FF:FF:FF dev eth0
pre-down ip route del default via 2001:41d0:XXXX:17FF:FF:FF:FF:FF dev eth0
pre-down ip route del 2001:41d0:XXXX:17FF:FF:FF:FF:FF dev eth0
# --- END PVE ---
nginx ⌁ root /etc/nginx ping google.com
PING google.com(fra16s12-in-x0e.1e100.net (2a00:1450:4001:818::200e)) 56 data bytes
64 bytes from fra16s12-in-x0e.1e100.net (2a00:1450:4001:818::200e): icmp_seq=1 ttl=51 time=3.32 ms
64 bytes from fra16s12-in-x0e.1e100.net (2a00:1450:4001:818::200e): icmp_seq=2 ttl=51 time=3.49 ms
64 bytes from fra16s12-in-x0e.1e100.net (2a00:1450:4001:818::200e): icmp_seq=3 ttl=51 time=3.41 ms
^C
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 5ms
rtt min/avg/max/mdev = 3.321/3.405/3.487/0.095 ms
nginx ⌁ root /etc/nginx ping6 ipv6.google.com
PING ipv6.google.com(fra15s17-in-x0e.1e100.net (2a00:1450:4001:81c::200e)) 56 data bytes
64 bytes from fra15s17-in-x0e.1e100.net (2a00:1450:4001:81c::200e): icmp_seq=1 ttl=51 time=3.19 ms
64 bytes from fra15s17-in-x0e.1e100.net (2a00:1450:4001:81c::200e): icmp_seq=2 ttl=51 time=2.88 ms
64 bytes from fra15s17-in-x0e.1e100.net (2a00:1450:4001:81c::200e): icmp_seq=3 ttl=51 time=3.20 ms
^C
--- ipv6.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 6ms
rtt min/avg/max/mdev = 2.876/3.087/3.200/0.156 ms
@kamzata your "solution" described before do not works
check it with attention and tell me where did you failed.
Host ping is ok but not the container...
Container:
# ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
From 192.168.1.1: icmp_seq=2 Redirect Host(New nexthop: 37.187.xxx.254)
From 192.168.1.1: icmp_seq=3 Redirect Host(New nexthop: 37.187.xxx.254)
From 192.168.1.1: icmp_seq=4 Redirect Host(New nexthop: 37.187.xxx.254)
From 192.168.1.1: icmp_seq=5 Redirect Host(New nexthop: 37.187.xxx.254)
From 192.168.1.1: icmp_seq=6 Redirect Host(New nexthop: 37.187.xxx.254)
From 192.168.1.1: icmp_seq=7 Redirect Host(New nexthop: 37.187.xxx.254)
^C
--- 1.1.1.1 ping statistics ---
7 packets transmitted, 0 received, 100% packet loss, time 155ms
So why you give a "solution" if it is not a complete solution?Hey man, I could fix it for you with a paid support.
So why you give a "solution" if it is not a solution?
then answer the pvt messages..