Superb quality and spec AB-Com PULSe 4K SE. Crazy offer! Only £99! FREE UK DELIVERY! 4K UHD, Enigma 2, Multiboot 4 images & more!...
Superb quality and spec AB-Com PULSe 4K Rev II Twin Satellite tuner only £149! FREE UK DELIVERY! 4K UHD, Enigma 2, SATA HDD facility, Multiboot 4 images & more!...

[VU+ Solo2] OpenVPN config

  • Thread starter Thread starter ferrari312
  • Start date Start date
F

ferrari312

Guest
Hi,

sorry for longish post.

Currently running latest 3.0 build (562) on vusolo2 and trying to get OpenVPN configured but having some problems. From the menu Network/OpenVPN i can see the service is Enabled but stopped, when i tried to start it nothing happens, it remains in stopped state and if i look at log form the menu blue button its empty.

So I decided to uninstall and re-install, same result. I then uninstalled from GUI again and decided to connect to the console.

so at command line i executed

ipkg install openvpn - no errors returned.

I copied the following files to /etc/openvpn ( this directory was empty )

ca.crt
user.crt
user.key

and a number of .ovpn config files with connection to a specific VPN server/port/TCP or UDP.

I ran openvpn from console and this was output

"

root@vusolo2:/etc/openvpn# openvpn ./tcp.ovpn

Tue Jan 15 08:25:49 2013 OpenVPN 2.1.3 mipsel-oe-linux [SSL] [LZO2] [EPOLL] built on Dec 19 2012
..
..
Tue Jan 15 08:25:49 2013 Attempting to establish TCP connection with 46.19.137.114:443 [nonblock]
Tue Jan 15 08:25:50 2013 TCP connection established with 46.19.137.114:443
..
Tue Jan 15 08:25:50 2013 TLS: Initial packet from 46.19.137.114:443, sid=6fadab31 74afc371
Tue Jan 15 08:25:51 2013 VERIFY OK: depth=1, /C=IT/ST=IT/L=Perugia/O=airvpn.org/CN=airvpn.org_CA/[email protected]
Tue Jan 15 08:25:51 2013 VERIFY OK: nsCertType=SERVER
Tue Jan 15 08:25:51 2013 VERIFY OK: depth=0, /C=IT/ST=IT/L=Perugia/O=airvpn.org/CN=server/[email protected]
..
..
Tue Jan 15 08:25:55 2013 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Tue Jan 15 08:25:55 2013 [server] Peer Connection Initiated with 46.19.137.114:443
Tue Jan 15 08:25:57 2013 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Tue Jan 15 08:25:57 2013 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,dhcp-option DNS 10.5.0.1,comp-lzo no,route 10.5.0.1,topology net30,ping 10,ping-restart 60,ifconfig 10.5.1.174 10.5.1.173'
Tue Jan 15 08:25:57 2013 OPTIONS IMPORT: timers and/or timeouts modified
Tue Jan 15 08:25:57 2013 OPTIONS IMPORT: LZO parms modified
..
..
Tue Jan 15 08:25:57 2013 ROUTE default_gateway=192.168.1.1

Tue Jan 15 08:25:57 2013 Note: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)

Tue Jan 15 08:25:57 2013 Note: Attempting fallback to kernel 2.2 TUN/TAP interface

Tue Jan 15 08:25:57 2013 Cannot allocate TUN/TAP dev dynamically

Tue Jan 15 08:25:57 2013 Exiting

"

Doing some googling it appears i dont have a TUN/TAP adapter setup.

Should i expect this adapter to be created by the install of OpenVPN , or is there some other manual steps required to get this adapter up and running , or maybe i am way of the mark.
 
Ok,

so doing a little digging I executed the following

mkdir /dev/net
mknod /dev/net/tun c 10 200

and then

root@vusolo2:/etc/openvpn# openvpn tcp.ovpn
Tue Jan 15 21:44:44 2013 OpenVPN 2.1.3 mipsel-oe-linux [SSL] [LZO2] [EPOLL] built on Dec 19 2012
Tue Jan 15 21:44:44 2013 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Tue Jan 15 21:44:44 2013 LZO compression initialized
Tue Jan 15 21:44:44 2013 Control Channel MTU parms [ L:1560 D:140 EF:40 EB:0 ET:0 EL:0 ]
Tue Jan 15 21:44:44 2013 Socket Buffers: R=[87380->131072] S=[16384->131072]
Tue Jan 15 21:44:44 2013 Data Channel MTU parms [ L:1560 D:1450 EF:60 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Jan 15 21:44:44 2013 Local Options hash (VER=V4): '958c5492'
Tue Jan 15 21:44:44 2013 Expected Remote Options hash (VER=V4): '79ef4284'
Tue Jan 15 21:44:44 2013 Attempting to establish TCP connection with 46.19.137.114:443 [nonblock]
Tue Jan 15 21:44:45 2013 TCP connection established with 46.19.137.114:443
Tue Jan 15 21:44:45 2013 TCPv4_CLIENT link local: [undef]
Tue Jan 15 21:44:45 2013 TCPv4_CLIENT link remote: 46.19.137.114:443
Tue Jan 15 21:44:45 2013 TLS: Initial packet from 46.19.137.114:443, sid=e2191179 a5d779ae
Tue Jan 15 21:44:47 2013 VERIFY OK: depth=1, /C=IT/ST=IT/L=Perugia/O=airvpn.org/CN=airvpn.org_CA/[email protected]
.
.
Tue Jan 15 21:44:53 2013 /sbin/ifconfig tun0 10.5.1.174 pointopoint 10.5.1.173 mtu 1500
Tue Jan 15 21:44:53 2013 /sbin/route add -net 46.19.137.114 netmask 255.255.255.255 gw 192.168.1.1
Tue Jan 15 21:44:53 2013 /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw 10.5.1.173
Tue Jan 15 21:44:53 2013 /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw 10.5.1.173
Tue Jan 15 21:44:53 2013 /sbin/route add -net 10.5.0.1 netmask 255.255.255.255 gw 10.5.1.173
Tue Jan 15 21:44:53 2013 Initialization Sequence Completed


So... i think i have got the it connecting , but how do i get this configured so that it runs as a server/deamon and it doesnt terminate when i close the telnet session ? and of course i would like it to connec to the VPN automatically when the box is restarted.

Any linux gurus that can help ?

Happy to document my findings and put them in a sticky if i get a working solution.
 
Ok i got this working and starting up automatically on reboot from another post in here.

Could anyone tell when i hit the "View Log" in the OpenVPN dialog where is it looking for the log file ?

If anyone wants more detail i can update post with full steps.
 
Ok i got this working and starting up automatically on reboot from another post in here.

Could anyone tell when i hit the "View Log" in the OpenVPN dialog where is it looking for the log file ?

If anyone wants more detail i can update post with full steps.
I would be interested in seeing the steps..... Or pm me - thanks
 
No problem will give it a go tonight or tomorrow - cant do it just now.
 
So,

Initially thought OpenVPN was not installed. From Menu/Setup/../Network/OpenVPN showed "Enabled" but "Not Running" and when I clicked green it did not change and nothing was displayed in the log file.

I logged in via ssh and uninstalled OpenVPN and then re-installed to see what was going on - no errors.

I executed "openvpn" from the command line and hey presto i got output back from openvpn.

So next step was to get the config files for your OpenVPN connection.

MY provider ( AirVPN ) have a nice web interface that create the config files for you.

I was supplied with

ca.crt
user.crt
user.key
​

and a number of .ovpn files which are the ..config files to configure openVPN connection.

i copied all files to /etc/openvpn

and then from the command line i executed

openvpn ./italy.ovpn
​

but during the openvpn connection process i was getting error

Tue Jan 15 08:25:57 2013 Note: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory (errno=2)

After some research it was clear the device /dev/net/tun needed to be created - i guess the question is why this isn't installed when you install OpenVPN , there maybe a good reason for this.

i found the following statements and ran

mkdir /dev/net
mknod /dev/net/tun c 10 200
​

I then re-ran

openvpn ./italy.ovpn​

and got connected.

i stopped everything.

i renamed italy.ovpn to client.conf*

and then then from the command line executed

/etc/init.d/openvpn start
​
*

... need to work out how to log some info to log file but apart from that it looks to be working ok for me.

*Thanks to underworld "Openvpn HideMyAss instructions - HowTo" on these steps.
 
Last edited by a moderator:
Ok i got this working and starting up automatically on reboot from another post in here.

Could anyone tell when i hit the "View Log" in the OpenVPN dialog where is it looking for the log file ?

If anyone wants more detail i can update post with full steps.

I cant find the post where ther detail of how to set it automatica have to manully setup every time boot box, do you have a link or could you post the details please
 
Vu+ Solo2 with AirVpn (OpenVpn) configuration

1. Download your .conf file from AirVPN
2. Telnet onto your Solo2
3. Type in "opkg install openvpn"
4. FTP to your Solo2 and navigate to the /etc/openvpn directory
* You can't see this directory by default, just enter it as a path
5. Copy your .conf file onto the Solo 2
6. Rename your .conf file to "client.conf"
7. Type in mkdir /dev/net
8. Type in mknod /dev/net/tun c 10 200
9. From Telnet, type in /etc/init.d/openvpn start

Most of these instructions are from ferrari312, I have just amended
them a little for my particular configuration.

Each time I reboot, the OpenVPN autostart is enabled and current
status shows as running

Doobs.
 

OpenViX Feeds Status

Back
Top