... I think my head is going to implode.
Is this possible?
I've got the DGTeam firmware installed which has an option to enable OpenVPN. Under android I need to install certificates and all sorts of jazz, which leads me to believe I need to also have these certificates/etc setup on my router.
So... I've downloading/installed/ran the commands to generate the key/crt/etc files on my PC (dont have openssl, dont have ipkg to install it on the router). Copied them across to the router... used the default server.conf file that OpenVPN give you, tweaked the paths for the crt/key/etc files... Managed to install the client1 certificate on my phone, so now all that's left is the configuration of OpenVPN on my router.
When I try to start I get nothing. I've enabled the logs, and the error I get is:
Code:
Mon Apr 11 20:45:33 2011 us=288327 OpenVPN 2.1.1 router
Mon Apr 11 20:45:33 2011 us=568327 Diffie-Hellman initialized with 1024 bit key
Mon Apr 11 20:45:33 2011 us=598327 TLS-Auth MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Mon Apr 11 20:45:33 2011 us=603327 TUN/TAP device tun0 opened
Mon Apr 11 20:45:33 2011 us=603327 TUN/TAP TX queue length set to 100
Mon Apr 11 20:45:33 2011 us=603327 /sbin tun0 10.8.0.1 pointopoint 10.8.0.2 mtu 1500
Mon Apr 11 20:45:33 2011 us=613327 Linux ifconfig failed: could not execute external program
Mon Apr 11 20:45:33 2011 us=613327 Exiting
well the line '/sbin tun0' seems to be a bit of a hint... as it seems to want to run /sbin/ifconfig but fails miserably to do so.
I am wondering if OpenVPN is trying to use 'which' in order to find ifconfig (which isnt installed, I dont have ipkg to install it, and I cant spot a MIPs version online {please point me at a repository if anyone knows!}).
I was tempted to setup a symbolic link from /sbin to /sbin/ifconfig however I am thinking that is a terrible idea, and if OpenVPN wants to run anything else it will screw up.
If I'm overcomplicating matters then please point me in the direction of something simpler... If it's possible to 'skip' the router and use a linux box to act as the OpenVPN server then this would work for me too, I just thought that as the router has OpenVPN:
Code:
# openvpn --version
OpenVPN 2.1.1 router
Originally developed by James Yonan
Copyright (C) 2002-2009 OpenVPN Technologies, Inc. <sales@openvpn.net>
.. it would make sense to use it.
[e!]
Ok, not much progress, but doesnt look like tun0 is going to work, but the router already has a tap0 which I've tried instead, openvpn still bombs out complaining that ifconfig failed, but if I run the command myself it comes back ok:
Code:
# openvpn --config /etc/openvpn.conf.new ; tail -f /tmp/openvpn.log
Mon Apr 11 21:33:07 2011 us=345464 OpenVPN 2.1.1 router
Mon Apr 11 21:33:07 2011 us=620464 Diffie-Hellman initialized with 1024 bit key
Mon Apr 11 21:33:07 2011 us=645464 TLS-Auth MTU parms [ L:1574 D:138 EF:38 EB:0 ET:0 EL:0 ]
Mon Apr 11 21:33:07 2011 us=650464 TUN/TAP device tap0 opened
Mon Apr 11 21:33:07 2011 us=650464 TUN/TAP TX queue length set to 100
Mon Apr 11 21:33:07 2011 us=650464 /sbin tap0 10.8.0.1 netmask 255.255.255.0 mtu 1500 broadcast 10.8.0.255
Mon Apr 11 21:33:07 2011 us=660464 Linux ifconfig failed: could not execute external program
Mon Apr 11 21:33:07 2011 us=660464 Exiting
# /sbin/ifconfig tap0 10.8.0.1 netmask 255.255.255.0 mtu 1500 broadcast 10.8.0.255
I'll keep struggling onwards...
[e!!]
Using the --ipconfig-noexec parameter it's not bombing out, not really working either, will do some more investigating, think I need to run a few ifconfig/route commands before I start.. but I have no idea what they are:
Code:
# openvpn --config /etc/openvpn.conf.new --ifconfig-noexec --daemon; tail -f /tmp/openvpn.log
Mon Apr 11 21:45:07 2011 us=725268 TLS-Auth MTU parms [ L:1574 D:138 EF:38 EB:0 ET:0 EL:0 ]
Mon Apr 11 21:45:07 2011 us=725268 TUN/TAP device tap0 opened
Mon Apr 11 21:45:07 2011 us=725268 TUN/TAP TX queue length set to 100
Mon Apr 11 21:45:07 2011 us=730268 Data Channel MTU parms [ L:1574 D:1450 EF:42 EB:135 ET:32 EL:0 AF:3/1 ]
Mon Apr 11 21:45:07 2011 us=735268 GID set to nobody
Mon Apr 11 21:45:07 2011 us=735268 UID set to nobody
Mon Apr 11 21:45:07 2011 us=735268 Socket Buffers: R=[32767->65534] S=[32767->65534]
Mon Apr 11 21:45:07 2011 us=735268 MULTI: multi_init called, r=256 v=256
Mon Apr 11 21:45:07 2011 us=740268 IFCONFIG POOL: base=10.8.0.2 size=253
Mon Apr 11 21:45:07 2011 us=740268 Initialization Sequence Completed