Hello
We need to add a second and third public IP to a KVM Virtual Machine but we havent found a way to do this as we use OVH .
When we setup the VM we had to do all the networking manually as OVH uses a gateway in a different subnet.
We configured eth0 and can ping 8.8.8.8 but google.com does not work. We know its because of the nameservers but these are not working.
Firstly how do we add additional IPs to the VM and how to we get the nameservers to stick in the resolv.conf as once we reboot the server they are removed. Also we added them ti the interfaces file but it looks like thye do not do much.
I have posted the current /etc/network/interfaces file below. Also we added dditioanl NIC as OVH requires virtual macs assigned to each IP in our to route.
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address XXX.XXX.XXX.220
netmask 255.255.255.255
nameservers 8.8.8.8 8.8.4.4
post-up ip route add xxx.xxx.216.254 dev eth0
post-up ip route add default via xxx.xxx.216.254
post-down ip route del 149.202.216.254 dev eth0
post-down ip route del default via xxx.xxx.216.254
auto eth1
iface eth1 inet static
address xxx.xxx.xxx.212
netmask 255.255.255.255
nameservers 8.8.8.8 8.8.4.4
post-up ip route add xxx.xxx.216.254 dev eth0
post-up ip route add default via xxx.xxx.216.254
post-down ip route del xxx.xxx.216.254 dev eth0
post-down ip route del default via xxx.xxx.216.254
We need to add a second and third public IP to a KVM Virtual Machine but we havent found a way to do this as we use OVH .
When we setup the VM we had to do all the networking manually as OVH uses a gateway in a different subnet.
We configured eth0 and can ping 8.8.8.8 but google.com does not work. We know its because of the nameservers but these are not working.
Firstly how do we add additional IPs to the VM and how to we get the nameservers to stick in the resolv.conf as once we reboot the server they are removed. Also we added them ti the interfaces file but it looks like thye do not do much.
I have posted the current /etc/network/interfaces file below. Also we added dditioanl NIC as OVH requires virtual macs assigned to each IP in our to route.
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address XXX.XXX.XXX.220
netmask 255.255.255.255
nameservers 8.8.8.8 8.8.4.4
post-up ip route add xxx.xxx.216.254 dev eth0
post-up ip route add default via xxx.xxx.216.254
post-down ip route del 149.202.216.254 dev eth0
post-down ip route del default via xxx.xxx.216.254
auto eth1
iface eth1 inet static
address xxx.xxx.xxx.212
netmask 255.255.255.255
nameservers 8.8.8.8 8.8.4.4
post-up ip route add xxx.xxx.216.254 dev eth0
post-up ip route add default via xxx.xxx.216.254
post-down ip route del xxx.xxx.216.254 dev eth0
post-down ip route del default via xxx.xxx.216.254