OpenVPN on 4.0.2CD


From Knoppix Documentation Wiki
Revision as of 23:46, 1 December 2005 by Rwcitek (Talk | contribs)

Jump to: navigation, search

The goal is to create a simple VPN between two machines on a network. The VPN software will be OpenVPN under Knoppix 4.0.2CD using a persistent disk image (PDI).


Setup

Create and boot with a persistent disk image. 500 MB should be plenty big.

Installing

Following notes from http://openvpn.net/howto.html#install

apt-get update
ls -la /dev/net/tun
apt-get -y install openvpn carpaltunnel
# Answer "yes" when the installer asks about creating the tun device.
# Answer "no" when asked about stopping VPN service (there is none)
ls -la /dev/net/tun

Configuring

Following example from http://openvpn.net/man.html#lbAV

lsmod| grep tun
modprobe tun
lsmod| grep tun

Run and test with two machines

This is on two machines connected to a router with a DHCP server that serves up IP addresses in the 192.168.0.xxx range.

Setup 1: simple tunnel without security

On first machine 192.168.0.200:

sudo openvpn --remote 192.168.0.201 --dev tun1 --ifconfig 10.4.0.1 10.4.0.2 --verb 9 >& vpn.log &

On second machine 192.168.0.201:

sudo openvpn --remote 192.168.0.200 --dev tun1 --ifconfig 10.4.0.2 10.4.0.1 --verb 9 >& vpn.log &

Test with a ping from first machine to second:

ping -R -c 4 10.4.0.2

Test with a ping from second machine to first:

ping -R -c 4 10.4.0.1

Setup 2: tunnel with static-key security

On first machine 192.168.0.200:

openvpn --genkey --secret key