Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Test OpenVPN in LXC + build TUN
## Run all these commands in container
sudo apt-get install curl wget openvpn uml-utilities
# creates a tun device in the container
sudo mkdir /dev/net
sudo mknod /dev/net/tun c 10 200
sudo chmod 666 /dev/net/tun
# downloads a set of free vpn configs
wget http://www.vpnbook.com/free-openvpn-account/VPNBook.com-OpenVPN-US1.zip
unzip VPNBook.com-OpenVPN-US1.zip
# connect to vpn with a given config file, wait to load
# login credentials here: http://www.vpnbook.com/freevpn
sudo openvpn --config vpnbook-us1-tcp80.ovpn
# test that we have new IP (this should be different from your host)
curl ifconfig.me
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment