Hi
I've got the following setup:
Openvpn server runs on CentOS at home.
Openvpn client runs on Virtualbox CentOS (guest), Windows (host), Network: Bridged Adapter at work.
ifconfig on CentOS at home:
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.8.0.1 P-t-P:10.8.0.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
wlan0 Link encap:Ethernet HWaddr 8C:A9:82:5C:3A:56
inet addr:192.168.1.88 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::8ea9:82ff:fe5c:3a56/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:100478 errors:0 dropped:0 overruns:0 frame:0
TX packets:26744 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:26365936 (25.1 MiB) TX bytes:6631003 (6.3 MiB)
ifconfig on VM CentOS at work:
eth1 Link encap:Ethernet HWaddr 08:00:27:2C:58:D8
inet addr:192.168.0.68 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe2c:58d8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:116107 errors:0 dropped:0 overruns:0 frame:0
TX packets:18015 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:26892315 (25.6 MiB) TX bytes:2579376 (2.4 MiB)
Openvpn server seems to be started and running:
openvpn server.conf
Mon Feb 24 10:00:18 2014 OpenVPN 2.2.2 x86_64-unknown-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] built on Apr 5 2012
Mon Feb 24 10:00:18 2014 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.
Mon Feb 24 10:00:18 2014 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Mon Feb 24 10:00:18 2014 Diffie-Hellman initialized with 1024 bit key
Mon Feb 24 10:00:18 2014 TLS-Auth MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Mon Feb 24 10:00:18 2014 Socket Buffers: R=[124928->131072] S=[124928->131072]
Mon Feb 24 10:00:18 2014 ROUTE default_gateway=192.168.1.254
Mon Feb 24 10:00:18 2014 TUN/TAP device tun0 opened
Mon Feb 24 10:00:18 2014 TUN/TAP TX queue length set to 100
Mon Feb 24 10:00:18 2014 /sbin/ip link set dev tun0 up mtu 1500
Mon Feb 24 10:00:18 2014 /sbin/ip addr add dev tun0 local 10.8.0.1 peer 10.8.0.2
Mon Feb 24 10:00:18 2014 /sbin/ip route add 10.8.0.0/24 via 10.8.0.2
Mon Feb 24 10:00:18 2014 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Mon Feb 24 10:00:18 2014 GID set to nobody
Mon Feb 24 10:00:18 2014 UID set to nobody
Mon Feb 24 10:00:18 2014 UDPv4 link local (bound): [undef]:1194
Mon Feb 24 10:00:18 2014 UDPv4 link remote: [undef]
Mon Feb 24 10:00:18 2014 MULTI: multi_init called, r=256 v=256
Mon Feb 24 10:00:18 2014 IFCONFIG POOL: base=10.8.0.4 size=62
Mon Feb 24 10:00:18 2014 IFCONFIG POOL LIST
Mon Feb 24 10:00:18 2014 Initialization Sequence Completed
iptables:
iptables -L | grep open
ACCEPT udp -- anywhere anywhere state NEW udp dpt:openvpn
ACCEPT udp -- anywhere anywhere state NEW udp dpt:openvpn
However, I've got this error message when try to run openvpn client:
openvpn client.conf
Mon Feb 24 16:50:40 2014 OpenVPN 2.2.2 x86_64-unknown-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] built on Apr 5 2012
Mon Feb 24 16:50:40 2014 NOTE: OpenVPN 2.1 requires '--script-security 2' or higher to call user-defined scripts or executables
Mon Feb 24 16:50:40 2014 LZO compression initialized
Mon Feb 24 16:50:40 2014 Control Channel MTU parms [ L:1542 D:138 EF:38 EB:0 ET:0 EL:0 ]
Mon Feb 24 16:50:40 2014 Socket Buffers: R=[124928->131072] S=[124928->131072]
Mon Feb 24 16:50:40 2014 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Mon Feb 24 16:50:40 2014 Local Options hash (VER=V4): '41690919'
Mon Feb 24 16:50:40 2014 Expected Remote Options hash (VER=V4): '530fdded'
Mon Feb 24 16:50:40 2014 NOTE: UID/GID downgrade will be delayed because of --client, --pull, or --up-delay
Mon Feb 24 16:50:40 2014 UDPv4 link local: [undef]
Mon Feb 24 16:50:40 2014 UDPv4 link remote: 10.0.8.1:1194
Mon Feb 24 16:51:40 2014 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Mon Feb 24 16:51:40 2014 TLS Error: TLS handshake failed
Mon Feb 24 16:51:40 2014 TCP/UDP: Closing socket
Mon Feb 24 16:51:40 2014 SIGUSR1[soft,tls-error] received, process restarting
Mon Feb 24 16:51:40 2014 Restart pause, 2 second(s)
Can someone please help? I'm not so good with networking. Will post the server.conf and client.conf in a separate post below.
Thanks.