I've got this configuration fully working on IPv4. Basically, there are 2 failover IPs laying on enp1s0f0 interface aliases, "natted" to 2 internal different Container network.
/etc/network/interface
iptables IPv4 Firewall rules:
How can replicate the same configuration with IPv6?
I make the host partially works (now I can ping6 ipv6.google.com from Proxmox host itself) adding this to /etc/network/interface this config:
But I don't know what IPv6 address assign to vmbr0 and vmbr1, and how to set nat rules...
/etc/network/interface
Code:
auto lo
iface lo inet loopback
auto enp1s0f0
iface enp1s0f0 inet manual
auto enp1s0f0:0
iface enp1s0f0:0 inet static
address 62.211.148.20
netmask 255.255.255.0
gateway 62.211.148.1
auto enp1s0f0:1
iface enp1s0f0:1 inet static
address 62.211.148.21
netmask 255.255.255.0
gateway 62.211.148.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
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
Code:
*filter
:FORWARD ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
####################
COMMIT
*nat
:OUTPUT ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
####################
#-A POSTROUTING -s 192.168.1.0/24 -o vmbr0 -j MASQUERADE
#-A POSTROUTING -s 192.168.1.0/24 -o vmbr0 -j SNAT --to-source 163.172.52.100
-A POSTROUTING -s 192.168.1.0/24 -o enp1s0f0 -j SNAT --to-source 62.211.148.20
-A PREROUTING -p tcp -m tcp -d 62.211.148.20 -i enp1s0f0 --dport 80 -j DNAT --to-destination 192.168.1.100:80
-A PREROUTING -p tcp -m tcp -d 62.211.148.20 -i enp1s0f0 --dport 443 -j DNAT --to-destination 192.168.1.100:443
-A PREROUTING -p tcp -m tcp -d 62.211.148.21 -i enp1s0f0 --dport 80 -j DNAT --to-destination 192.168.2.100:80
-A PREROUTING -p tcp -m tcp -d 62.211.148.21 -i enp1s0f0 --dport 443 -j DNAT --to-destination 192.168.2.100:443
-A PREROUTING -p tcp -m tcp -d 62.211.148.21 -i enp1s0f0 --dport 22200 -j DNAT --to-destination 192.168.2.100:22
####################
COMMIT
*mangle
:PREROUTING ACCEPT [6361:22504845]
:INPUT ACCEPT [6361:22504845]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [4510:394131]
:POSTROUTING ACCEPT [4510:394131]
####################
####################
COMMIT
How can replicate the same configuration with IPv6?
I make the host partially works (now I can ping6 ipv6.google.com from Proxmox host itself) adding this to /etc/network/interface this config:
Code:
iface enp1s0f0 inet6 static
address 2001:bc8:2cc7:101::
netmask 64
iface enp1s0f0 inet6 static
address 2001:bc8:2cc7:102::
netmask 64
But I don't know what IPv6 address assign to vmbr0 and vmbr1, and how to set nat rules...
Last edited: