Hello community,
Im new here and i would like to request your help.
I will explain my issu:
I have a hosted physicial server with one main ipv4 adress (212.45.89.5/24) and i have bought 2 public ip fail overs(45.98.68.78 and 45.98.68.79)
I would like to have 3 differents public ips on the net and on each ips, have a local network.
I have configured as i think. and it kinda works. In fact, local network going on my main ip, it works, but when i use the ip fail over, nothing. I can ping from my computer the ip fail over.
Here are the configurations:
Host /etc/network/interfaces:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 212.45.89.5
netmask 255.255.255.0
gateway 212.45.89.1
auto eth0:1
iface eth0:1 inet static
address 45.98.68.78
netmask 255.255.255.255
auto eth0:2
iface eth0:2 inet static
address 45.98.68.79
netmask 255.255.255.255
auto vmbr0
#private sub network
iface vmbr0 inet static
address 10.10.0.254
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.10.0.0/24' -o eth0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.0.0/24' -o eth0 -j MASQUERADE
auto vmbr1
#private sub network
iface vmbr1 inet static
address 10.10.10.254
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.10.10.0/24' -o eth0:1 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eth0:1 -j MASQUERADE
auto vmbr2
#private sub network
iface vmbr2 inet static
address 10.10.20.254
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.10.20.0/24' -o eth0:2 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.20.0/24' -o eth0:2 -j MASQUERADE
For the VM network :
For me, to go on internet with the first fail over : 45.98.68.78, we have to connect our network to bridge vmbr1. (vmbr2 for 45.98.68.79 and vmbr0 for 212.45.89.5)
We configure the vm ifconfig eth0 with 10.10.10.1 netmask 255.255.255.0 gw 10.10.10.254
And still not working. Am i right? have i missed a point?
Thanks for your help.
Im new here and i would like to request your help.
I will explain my issu:
I have a hosted physicial server with one main ipv4 adress (212.45.89.5/24) and i have bought 2 public ip fail overs(45.98.68.78 and 45.98.68.79)
I would like to have 3 differents public ips on the net and on each ips, have a local network.
I have configured as i think. and it kinda works. In fact, local network going on my main ip, it works, but when i use the ip fail over, nothing. I can ping from my computer the ip fail over.
Here are the configurations:
Host /etc/network/interfaces:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 212.45.89.5
netmask 255.255.255.0
gateway 212.45.89.1
auto eth0:1
iface eth0:1 inet static
address 45.98.68.78
netmask 255.255.255.255
auto eth0:2
iface eth0:2 inet static
address 45.98.68.79
netmask 255.255.255.255
auto vmbr0
#private sub network
iface vmbr0 inet static
address 10.10.0.254
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.10.0.0/24' -o eth0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.0.0/24' -o eth0 -j MASQUERADE
auto vmbr1
#private sub network
iface vmbr1 inet static
address 10.10.10.254
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.10.10.0/24' -o eth0:1 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eth0:1 -j MASQUERADE
auto vmbr2
#private sub network
iface vmbr2 inet static
address 10.10.20.254
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.10.20.0/24' -o eth0:2 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.20.0/24' -o eth0:2 -j MASQUERADE
For the VM network :
For me, to go on internet with the first fail over : 45.98.68.78, we have to connect our network to bridge vmbr1. (vmbr2 for 45.98.68.79 and vmbr0 for 212.45.89.5)
We configure the vm ifconfig eth0 with 10.10.10.1 netmask 255.255.255.0 gw 10.10.10.254
And still not working. Am i right? have i missed a point?
Thanks for your help.