OPenVPN setup
I am a pretty new to linux but am loving playing with my linode. I would like to setup openvpn so when I am out using random wifi hotspots I can make sure no one is snooping my connection. (Plus I think it will be fun) So my question is can anyone point me to a good guide to get things setup? I have done some looking around and think that I need to setup a TUN device be for the life of my can't figure out how this is done on my linode???
Thanks
Matt
6 Replies
The TUN/TAP device should already be built into the linode kernel, so all you need to do is set up the openvpn daemon.
Im trying to setip OpenVPN on my linode too.
I am using Debian etch but I have a problem with the tun device.
There is no tun device setup.
dmesg | grep TUN
tun: Universal TUN/TAP device driver, 1.6
ifconfig -a | grep tun
tunl0 Link encap:IPIP Tunnel HWaddr
ls -l /dev/tun*
ls: /dev/tun*: No such file or directory
ls -l /dev/net/
ls: /dev/net/: No such file or directory
If I try to create it I get:
openvpn –mktun --dev tun0
Tue Oct 28 15:07:56 2008 Note: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)
Tue Oct 28 15:07:56 2008 Note: Attempting fallback to kernel 2.2 TUN/TAP interface
Tue Oct 28 15:07:56 2008 Cannot open TUN/TAP dev /dev/tun0: No such file or directory (errno=2)
Tue Oct 28 15:07:56 2008 Exiting
My kernel is: 2.6.26-linode13
I have also tried with 2.6.18-something
Still there is no tun/tap device and I cannot create one. Any ideas?
Thanks
I had to manually create the /dev/net/tun device with the command: mknod /dev/net/tun c 10 200
@tlogic:
I had to manually create the /dev/net/tun device with the command: mknod /dev/net/tun c 10 200
This is exactly what worked for me. Thanks tlogic!
NB: I don't think it was specified, but this can be required on the client side. My linode was an openVPN client (on Debian Etch). After adding the device on the client, it was able to connect to an openVPN server (running CentOS 5.2) in another datacenter.
NB#2: put your client settings in /etc/openvpn/client.conf and they will be run at startup.