Skip to content

Instantly share code, notes, and snippets.

@jmnwong
Last active August 29, 2015 13:56
Show Gist options
  • Save jmnwong/8980852 to your computer and use it in GitHub Desktop.
Save jmnwong/8980852 to your computer and use it in GitHub Desktop.
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