I followed the instructions in this thread, and it appears to be working! Everything compiled fine, and appears to run without any problem. The TLS negotiation, and connection seems to go ok, though it fails at the end. I now have to figure out all of the firewall rules to add manually, the firmware developers had automatic firewall rules so I never had to worry about it before.
These are the two rules I have added so far:
iptables -t nat -I PREROUTING -p udp --dport 1194 -j ACCEPT
iptables -I INPUT -p udp --dport 1194 -j ACCEPT
Here is a log from the router:
Aug 9 12:16:53 router daemon.notice openvpn[2463]: MULTI: multi_create_instance called
Aug 9 12:16:53 router daemon.notice openvpn[2463]: 100.100.100.100:443 Re-using SSL/TLS context
Aug 9 12:16:53 router daemon.notice openvpn[2463]: 100.100.100.100:443 LZO compression initialized
Aug 9 12:16:53 router daemon.notice openvpn[2463]: 100.100.100.100:443 Control Channel MTU parms [ L:1602 D:174 EF:74 EB:0 ET:0 EL:0 ]
Aug 9 12:16:53 router daemon.notice openvpn[2463]: 100.100.100.100:443 Data Channel MTU parms [ L:1602 D:1450 EF:70 EB:135 ET:32 EL:0 AF:3/1 ]
Aug 9 12:16:53 router daemon.notice openvpn[2463]: 100.100.100.100:443 Fragmentation MTU parms [ L:1602 D:1500 EF:69 EB:135 ET:33 EL:0 AF:3/1 ]
Aug 9 12:16:53 router daemon.notice openvpn[2463]: 100.100.100.100:443 TLS: Initial packet from 100.100.100.100:443, sid=514619e3 ac081e07
Aug 9 12:16:54 router daemon.notice openvpn[2463]: 100.100.100.100:443 VERIFY OK: depth=1, /C=CA/ST=CA/L=CA/O=none/CN=VPN-CA/emailAddress=***@host.domain
Aug 9 12:16:54 router daemon.notice openvpn[2463]: 100.100.100.100:443 VERIFY OK: depth=0, /C=CA/ST=CA/O=none/CN=client/emailAddress=***@host.domain
Aug 9 12:16:55 router daemon.notice openvpn[2463]: 100.100.100.100:443 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Aug 9 12:16:55 router daemon.notice openvpn[2463]: 100.100.100.100:443 Data Channel Encrypt: Using 224 bit message hash 'SHA224' for HMAC authentication
Aug 9 12:16:55 router daemon.notice openvpn[2463]: 100.100.100.100:443 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Aug 9 12:16:55 router daemon.notice openvpn[2463]: 100.100.100.100:443 Data Channel Decrypt: Using 224 bit message hash 'SHA224' for HMAC authentication
Aug 9 12:16:55 router daemon.notice openvpn[2463]: 100.100.100.100:443 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Aug 9 12:16:55 router daemon.notice openvpn[2463]: 100.100.100.100:443 [client] Peer Connection Initiated with 100.100.100.100:443
Aug 9 12:16:55 router daemon.err openvpn[2463]: client/100.100.100.100:443 MULTI: no dynamic or static remote --ifconfig address is available for client/100.100.100.100:443
Aug 9 12:16:56 router daemon.notice openvpn[2463]: client/100.100.100.100:443 PUSH: Received control message: 'PUSH_REQUEST'
Aug 9 12:16:56 router daemon.notice openvpn[2463]: client/100.100.100.100:443 SENT CONTROL [client]: 'PUSH_REPLY,route-gateway dhcp,ping 10,ping-restart 120' (status=1)
Aug 9 12:16:59 router daemon.notice openvpn[2463]: client/100.100.100.100:443 MULTI: Learn: 00:ff:97:5d:66:63 -> client/100.100.100.100:443
I assume this is the line where the problem is:
Aug 9 12:16:55 router daemon.err openvpn[2463]: client/100.100.100.100:443 MULTI: no dynamic or static remote --ifconfig address is available for client/100.100.100.100:443
The client OpenVPN log shows these two lines over and over again, until it fails:
Route: Waiting for TUN/TAP interface to come up....
TEST ROUTES: 0/0 succeeded len=0 ret=0 a=0 u/d=down
Route: Waiting for TUN/TAP interface to come up....
TEST ROUTES: 0/0 succeeded len=0 ret=0 a=0 u/d=down
Route: Waiting for TUN/TAP interface to come up....
TEST ROUTES: 0/0 succeeded len=0 ret=0 a=0 u/d=down
I assume there is something prevented from coming through the tunnel, does anyone have any ideas?
Thank you
RE::::
untar the source
cd <untared source code location>
./configure --enable-small
sed -i -e '/^LIBS/s/LIBS = /LIBS = -static /' Makefile
export CFLAGS="-Os"
export CXXFLAGS="$CFLAGS"
make
cp openvpn <wherever you want you're staticly compiled binary>
(I made the assumption that you want the code as small as possible for some
embedded use, usually the only reason to static compile.)
Just bear in mind that you'll have to keep an eye out for security updates
on : OpenVPN + OpenSSL + LZO2 + pThread
and if ANY of the above have a security issue you'll have to recompile and
re-distribute.
--
Be Yourself @ mail.com!
Choose