Hello,
I only have a single IPv4 address and an entire IPv6 subnet on the host.
IPv4 is already forwarded to the individual VMs via NAT.
I would like to assign each VM an additional IPv6 (without NAT).
IPv4: Forwarding via NAT
IPv6: directly to the VM
How do I proceed?
(Currently vmbr1 is assigned to the VMs as network (for IPv4 NAT))
Here are my
I only have a single IPv4 address and an entire IPv6 subnet on the host.
IPv4 is already forwarded to the individual VMs via NAT.
I would like to assign each VM an additional IPv6 (without NAT).
IPv4: Forwarding via NAT
IPv6: directly to the VM
How do I proceed?
(Currently vmbr1 is assigned to the VMs as network (for IPv4 NAT))
Here are my
/etc/network/interfaces
(currently only for IPv4):
Code:
# public IPv4
auto lo
iface lo inet loopback
auto eno1
iface eno1 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
bridge-ports eno1
bridge-stp off
bridge-fd 0
# VM BR
auto vmbr1
iface vmbr1 inet static
address 10.0.0.1
netmask 24
bridge-ports none
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.0.0.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.0.0.0/24' -o vmbr0 -j MASQUERADE
#VM Port forwarding
# VM1
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 80 -j DNAT --to 10.0.0.15:80
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 80 -j DNAT --to 10.0.0.15:80
# VM2
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 8080 -j DNAT --to 10.0.0.10:80
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 8080 -j DNAT --to 10.0.0.10:80