Debian Vserver cheat Sheet

This is just to keep a trace for myself on how to create a Vserver with Internet connectivity.

Create the network interface
Edit /etc/network/interfaces and add:

auto dummy0
iface dummy0 inet static

Restart the network

/etc/init.d/networking restart

Turns the NAT on

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

eth0 here is the network interface you use for your network access.

Create the VM

sudo vserver build build -n cyrus2.3 -m debootstrap --netdev dummy0 --interface -- -d lenny

Enter the VM

sudo vserver cyrus2.3 start
sudo vserver cyrus2.3 enter

One thought on “Debian Vserver cheat Sheet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s