I have 1 single IP, i want all VM's to use NAT
This is my
This is what I have setup in the VM, since I wasn't sure what to put since DHCP doesn't work there.
I have also tried "Routed Configuration" and "Default Configuration using a Bridge" from Network Configuration . Those didn't work for me either.
This is my
/etc/network/interfaces
Code:
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto enp130s0f1
iface enp130s0f1 inet static
address 170.39.***.***/23
gateway 170.39.***.1
dns-nameservers 1.1.1.1
dns-search ****.com
# dns-* options are implemented by the resolvconf package, if installed
auto lo
iface lo inet loopback
auto eno1
#real IP address
iface eno1 inet static
address 198.51.100.5/24
gateway 198.51.100.1
auto vmbr0
#private sub network
iface vmbr0 inet static
address 10.10.10.1/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.10.10.0/24' -o eno1 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eno1 -j MASQUERADE
post-up iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1
This is what I have setup in the VM, since I wasn't sure what to put since DHCP doesn't work there.
I have also tried "Routed Configuration" and "Default Configuration using a Bridge" from Network Configuration . Those didn't work for me either.