Page 1 of 1

Ubuntu 11.10 TUN help

Posted: Thu Dec 29, 2011 12:32 am
by TampaAF
I am new to openvpn. I have a Windows 7 OS laptop and a Ubuntu 11.10 machine I would like to use as the vpn server. After some searching most of the howto's are for bridging. Listed below is my server.conf. I might be missing a step but I do not have a tun0 under ifconfig and vpn fails to start.

Code: Select all

port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 10.8.0.0 255.255.255.0"
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
client-to-client
keepalive 10 60
comp-lzo
ping-timer-rem
persist-tun
persist-key
user nobody
group nogroup
log-append /var/log/openvpn
verb 3

Code: Select all

Wed Dec 28 08:42:12 2011 OpenVPN 2.2.0 i686-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Jul  4 2011
Wed Dec 28 08:42:12 2011 NOTE: your local LAN uses the extremely common subnet address 192.168.0.x or 192.168.1.x.  Be aware that this might create routing conflicts if you connect to the VPN server from public locations such as internet cafes that use the same subnet.
Wed Dec 28 08:42:12 2011 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Wed Dec 28 08:42:12 2011 Cannot open dh1024.pem for DH parameters: error:02001002:system library:fopen:No such file or directory: error:2006D080:BIO routines:BIO_new_file:no such file
Wed Dec 28 08:42:12 2011 Exiting

Re: Ubuntu 11.10 TUN help

Posted: Thu Dec 29, 2011 6:29 am
by Mimiko
Cannot open dh1024.pem for DH parameters: error:02001002:system library:fopen:No such file or directory: error:2006D080:BIO routines:BIO_new_file:no such file
States very clearly. In your config you have to specify absolute path to any file you are using.

Re: Ubuntu 11.10 TUN help

Posted: Thu Dec 29, 2011 11:20 am
by maikcat
or you didnt build dh file at all...

-or-

you changed key length and you didnt correct the config file.

Michael.

Re: Ubuntu 11.10 TUN help

Posted: Fri Dec 30, 2011 7:16 pm
by TampaAF
Well I am a noob. Didn't migrate the certs/keys out of the keys folder.

Re: Ubuntu 11.10 TUN help

Posted: Thu Jan 05, 2012 9:34 am
by ajackson
I had a tun/tap interface configured under 11.04 to run some qemu/kvm sessions. Everything worked just fine until the online upgrade to 11.10 happened. After the upgrade the system can boot up and pretend to have no connections (nothing works - browser, mail etc). But the ping to the external IPs work well (google dns, for instance). "can boot up" means that there's another strange thing - sometimes networking is ok after booting the system up (with no changes in the configuration)!

Re: Ubuntu 11.10 TUN help

Posted: Sat Jan 07, 2012 9:15 am
by Mimiko
Check system logs for other services that starts up and may interfere with the iptable rules, and routing table.