Hey everyone, I am working on a school project and I am a little stuck. I spent all day yesterday searching for tutorials and could not find anything that worked.
My setup is:
I have two internal networks, 10.0.01/24 and 10.0.1.1/24
10.0.0.1 shares the same IP as the interface xxx.xxx.xxx.xxx (and works)
10.0.1.1 should have another IP yyy.yyy.yyy.yyy
I have gone through probably 100 configurations at this point, using different IPtables rules.
I can easily get yyy.yyy.yyy.yyy pingable and use it on the host, it is on another subnet.
Here is my config:
My setup is:
I have two internal networks, 10.0.01/24 and 10.0.1.1/24
10.0.0.1 shares the same IP as the interface xxx.xxx.xxx.xxx (and works)
10.0.1.1 should have another IP yyy.yyy.yyy.yyy
I have gone through probably 100 configurations at this point, using different IPtables rules.
I can easily get yyy.yyy.yyy.yyy pingable and use it on the host, it is on another subnet.
Here is my config:
Code:
auto lo
iface lo inet loopback
iface eno1 inet manual
iface eno2 inet manual
iface eno3 inet manual
iface eno4 inet manual
auto vmbr0
iface vmbr0 inet static
address 199.83.xxx.xxx
netmask 255.255.255.0
gateway 199.83.xxx.1
bridge_ports eno1
bridge_stp off
bridge_fd 0
auto vmbr1
iface vmbr1 inet static
address 208.68.yyy.yyy
netmask 255.255.255.0
bridge_ports eno2
bridge_stp off
bridge_fd 0
auto vmbr172
iface vmbr172 inet static
address 10.0.0.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
post-up iptables -t nat -A POSTROUTING -s '10.0.0.1/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.0.0.1/24' -o vmbr0 -j MASQUERADE
auto vmbr63
iface vmbr63 inet static
address 10.0.1.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up iptables -t nat -A POSTROUTING -s '10.0.1.1/24' -o vmbr1 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.0.1.1/24' -o vmbr1 -j MASQUERADE