Originally Posted by
directhex
Can you paste your client & server config files? I have this configured on a work VPN.
Client is below but basic... Server is - well 6000 miles away and inaccessible
Code:
remote [stripped].dyndns.org 443
client
dev tap
proto tcp
ca "C:\\Program Files (x86)\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files (x86)\\OpenVPN\\config\\client1.crt"
key "C:\\Program Files (x86)\\OpenVPN\\config\\client1.key"
comp-lzo
verb 3
log "C:\\openvpn-log.log"
I have a feeling that it might be a paths issue with the openvpn-startup script as I half recall seeing a 'unknown command' or similar message before I got booted off...
I'm going to see if I can get someone in my house to ssh into the box and pull the config file and/or try to fix the openvpn-startup script, but will be blind instructions over IM...
Cheers,
Mark
[e!] Server config:
Code:
port 443 #1194
dev tap0
#dev-node tap-bridge
#server 10.123.0.0 255.255.255.0
server-bridge 192.168.0.9 255.255.255.0 192.168.0.123 192.168.0.254
ca "/home/mark/.openvpn/ca.crt"
cert "/home/mark/.openvpn/server.crt"
key "/home/mark/.openvpn/server.key"
dh "/home/mark/.openvpn/dh1024.pem"
proto tcp
comp-lzo
verb 3
log "/home/mark/.openvpn/openvpn.log"
[e!!] Turns out brctl wasnt installed, so have apt-get installed that, needed to setup the paths in the openvpn-startup script too... fingers crossed.
[e!!!] Nope... that didnt fix it. What am I doing wrong...
Server log doesnt give much help:
Code:
Thu Jan 1 01:00:15 1970 OpenVPN 2.1.3 arm-unknown-linux-gnueabi [SSL] [LZO2] [EPOLL] [PKCS11] [MH] [PF_INET6] [eurephia] built on Oct 22 2010
Thu Jan 1 01:00:15 1970 NOTE: when bridging your LAN adapter with the TAP adapter, note that the new bridge adapter will often take on its own IP address that is different from what the LAN adapter was previously set to
Thu Jan 1 01:00:15 1970 WARNING: --keepalive option is missing from server config
Thu Jan 1 01:00:15 1970 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Thu Jan 1 01:00:15 1970 Diffie-Hellman initialized with 1024 bit key
Thu Jan 1 01:00:15 1970 /usr/bin/openssl-vulnkey -q -b 1024 -m <modulus omitted>
Thu Jan 1 01:00:16 1970 TLS-Auth MTU parms [ L:1576 D:140 EF:40 EB:0 ET:0 EL:0 ]
Thu Jan 1 01:00:16 1970 Socket Buffers: R=[87380->131072] S=[16384->131072]
Thu Jan 1 01:00:16 1970 TUN/TAP device tap0 opened
Thu Jan 1 01:00:16 1970 TUN/TAP TX queue length set to 100
Thu Jan 1 01:00:16 1970 Data Channel MTU parms [ L:1576 D:1450 EF:44 EB:135 ET:32 EL:0 AF:3/1 ]
Thu Jan 1 01:00:16 1970 Listening for incoming TCP connection on [undef]
Thu Jan 1 01:00:16 1970 TCPv4_SERVER link local (bound): [undef]
Thu Jan 1 01:00:16 1970 TCPv4_SERVER link remote: [undef]
Thu Jan 1 01:00:16 1970 MULTI: multi_init called, r=256 v=256
Thu Jan 1 01:00:16 1970 IFCONFIG POOL: base=192.168.0.123 size=132
Thu Jan 1 01:00:16 1970 MULTI: TCP INIT maxclients=1024 maxevents=1028
Thu Jan 1 01:00:16 1970 Initialization Sequence Completed
Mon Nov 28 20:24:24 2011 MULTI: multi_create_instance called
Mon Nov 28 20:24:24 2011 Re-using SSL/TLS context
Mon Nov 28 20:24:24 2011 LZO compression initialized
Mon Nov 28 20:24:24 2011 Control Channel MTU parms [ L:1576 D:140 EF:40 EB:0 ET:0 EL:0 ]
Mon Nov 28 20:24:24 2011 Data Channel MTU parms [ L:1576 D:1450 EF:44 EB:135 ET:32 EL:0 AF:3/1 ]
Mon Nov 28 20:24:24 2011 Local Options hash (VER=V4): '3e6d1056'
Mon Nov 28 20:24:24 2011 Expected Remote Options hash (VER=V4): '31fdf004'
Mon Nov 28 20:24:24 2011 TCP connection established with [AF_INET][STRIPPED]:57843
Mon Nov 28 20:24:24 2011 TCPv4_SERVER link local: [undef]
Mon Nov 28 20:24:24 2011 TCPv4_SERVER link remote: [AF_INET][STRIPPED]:57843
Mon Nov 28 20:24:24 2011 [STRIPPED]:57843 TLS: Initial packet from [AF_INET][STRIPPED]:57843, sid=8a42e7e5 6c433839
Mon Nov 28 20:24:31 2011 [STRIPPED]:57843 VERIFY OK: depth=1, [STRIPPED]
Mon Nov 28 20:24:31 2011 [STRIPPED]:57843 VERIFY OK: depth=0, [STRIPPED]
Mon Nov 28 20:24:34 2011 [STRIPPED]:57843 Data Channel Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Mon Nov 28 20:24:34 2011 [STRIPPED]:57843 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Nov 28 20:24:34 2011 [STRIPPED]:57843 Data Channel Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Mon Nov 28 20:24:34 2011 [STRIPPED]:57843 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Mon Nov 28 20:24:34 2011 [STRIPPED]:57843 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Mon Nov 28 20:24:34 2011 [STRIPPED]:57843 [client1] Peer Connection Initiated with [AF_INET][STRIPPED]:57843
Mon Nov 28 20:24:36 2011 client1/[STRIPPED]:57843 PUSH: Received control message: 'PUSH_REQUEST'
Mon Nov 28 20:24:36 2011 client1/[STRIPPED]:57843 SENT CONTROL [client1]: 'PUSH_REPLY,route-gateway 192.168.0.9,ifconfig 192.168.0.123 255.255.255.0' (status=1)
Mon Nov 28 20:24:37 2011 client1/[STRIPPED]:57843 MULTI: Learn: 00:ff:44:83:79:e6 -> client1/[STRIPPED]:57843
OK... so if I run:
Code:
# /etc/openvpn/openvpn-shutdown; /etc/openvpn/openvpn-startup; /etc/init.d/openvpn start
I get:
Code:
Stopping virtual private network daemon: tap0.
br0: ERROR while getting interface flags: No such device
bridge br0 doesn't exist; can't delete it
Mon Nov 28 20:41:11 2011 TUN/TAP device tap0 opened
Mon Nov 28 20:41:12 2011 Persist state set to: OFF
Mon Nov 28 20:41:12 2011 TUN/TAP device tap0 opened
Mon Nov 28 20:41:12 2011 Persist state set to: ON
Starting virtual private network daemon: tap0.
and ifconfig gives me:
Code:
br0 Link encap:Ethernet HWaddr b6:68:32:e1:4b:f1
inet addr:192.168.0.9 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::b468:32ff:fee1:4bf1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:37 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4934 (4.8 KiB) TX bytes:1878 (1.8 KiB)
eth0 Link encap:Ethernet HWaddr c0:3f:0e:xx:xx:xx
inet6 addr: fe80::c23f:eff:fe28:db3/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:1785 errors:0 dropped:0 overruns:0 frame:0
TX packets:1682 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:342012 (333.9 KiB) TX bytes:123598 (120.7 KiB)
Interrupt:11
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:124 errors:0 dropped:0 overruns:0 frame:0
TX packets:124 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11056 (10.7 KiB) TX bytes:11056 (10.7 KiB)
tap0 Link encap:Ethernet HWaddr b6:68:32:e1:4b:f1
inet6 addr: fe80::b468:32ff:fee1:4bf1/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:22 errors:0 dropped:3 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:4388 (4.2 KiB)
Which looks alright(ish) - though notice all the errors - but I cant actually connect, the client vpn connection just times out.
A reboot of the server means I can connect to the vpn but ifconfig gives me:
Code:
eth0 Link encap:Ethernet HWaddr c0:3f:0e:xx:xx:xx
inet addr:192.168.0.9 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::c23f:eff:fe28:db3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:409 errors:0 dropped:0 overruns:0 frame:0
TX packets:478 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:76640 (74.8 KiB) TX bytes:51008 (49.8 KiB)
Interrupt:11
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:112 errors:0 dropped:0 overruns:0 frame:0
TX packets:112 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9580 (9.3 KiB) TX bytes:9580 (9.3 KiB)
so no tap0 and no br0, but no errors... although I cant do anything from the client maching except ping itself (192.168.0.123).
I am stumped.