Tuesday, July 22, 2014

Adding multiple Network Devices to an OpenVZ CT on Proxmox

In order to configure more than one Network Device on an OpenVZ CT, we found this needed to be done in the /etc/network/interfaces file.

We created a DHCP reservation for eth0 and assigned a static IP to eth1.

auto lo
iface lo inet loopback

auto eth0 eth1
iface eth0 inet dhcp

iface eth1 inet static
address 192.168.x.x
netmask 255.255.255.x
network 192.168.x.x

This allowed connections to communicate between the two separate networks.

Some neat tricks I learned doing this one:

View user command history on an ubuntu server (in this case 12.04)
vi ~/.bash_history

Quick restart command for all networking (without being kicked out of ssh)
service networking restart