I have recently added a Linksys router equipped with DD-WRT v24-sp2 (04/07/12) mega (svn r18946M VINT Eko) to my network as my gateway router to the Internet (via a Comcast cable modem). On the LAN side of my network, I have an Apple Time Machine that serves as both my network switch and wireless access point. Currently, I have the Linksys router set up as the DHCP server and the Time Capsule set in a bridge mode, though I intend to change the network configuration to a static route between the Linksys and the Time Capsule, and move the DHCP server to the Time Capsule.
My overall goal is to be able to remotely connect to my network (via VPN) as to access the contents of the Time Capsule storage and the devices connected wirelessly to the Time Capsule.
A rundown of my network as it stands now:
- Linksys: 10.0.1.1 (10.0.1.0/255.255.248.0)
- Time Capsule: 10.0.1.94
Wireless Network 1: 10.0.1.10 - 10.0.1.254
Wireless Network 2 (Not in Use right now): 172.16.42.10- 172.16.42.10
Additionally, I have planned on a VPN subnet of 10.0.2.0/255.255.255.0.
After much tweaking of my OpenVPN config files on both client and server OpenVPN software, I am unable to connect to my VPN. The following log is generated by my client (Viscosity) when I attempt to connect to the OpenVPN server.
———————
Jan 25 23:37:04: Viscosity Mac 1.4.7 (1159)
Jan 25 23:37:04: Viscosity OpenVPN Engine Started
Jan 25 23:37:04: Running on Mac OS X 10.9.1
Jan 25 23:37:04: ---------
Jan 25 23:37:04: Checking reachability status of connection...
Jan 25 23:37:04: Connection is reachable. Starting connection attempt.
Jan 25 23:37:07: OpenVPN 2.3.2 i386-apple-darwin [SSL (OpenSSL)] [LZO] [PKCS11] [MH] [IPv6] built on Jun 7 2013
Jan 25 23:37:06: WARNING: No server certificate verification method has been enabled. See
http://openvpn.net/howto.html#mitm for more info.
Jan 25 23:37:23: WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Jan 25 23:37:23: UDPv4 link local: [undef]
Jan 25 23:37:23: UDPv4 link remote: [AF_INET]
www.xxx.yyy.zzz:1194
Jan 25 23:38:23: TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Jan 25 23:38:23: TLS Error: TLS handshake failed
Jan 25 23:38:23: SIGUSR1[soft,tls-error] received, process restarting
—————
(Never mind the server certificate verification method or password caching warnings… I know they are issues and I will fix them once I can get baseline VPN connectivity working.)
Diving a bit deeper, I took a Wireshark capture of the communication between the client and the OpenVPN server. After a successful DNS lookup, the first packet that the client sends to the server contains a P_CONTROL_HARD_RESET_CLIENT_V2 command sent to port 1194 on the server. The server then response with a ICMP Destination Unreachable (Port Unreachable) response.
I have the SPI firewall enabled on the router, but haven’t explicitly configured it to block anything. I have the following commands run by my router to set up the firewall for OpenVPN connections.
——————
iptables -I INPUT 1 -p udp --dport 1194 -j ACCEPT
iptables -I FORWARD 1 --source 10.0.1.0/24 -j ACCEPT
iptables -I FORWARD -i br0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o br0 -j ACCEPT
———————
My client config:
———————
#viscosity startonopen false
#viscosity dhcp true
#viscosity dnssupport true
#viscosity name qwerty
key key.key
cert cert.crt
ca ca.crt
remote qwerty.com 1194 udp
persist-key
tls-client
pull
redirect-gateway def1
dev tun
persist-tun
comp-lzo no
nobind
cipher aes-256-cbc
auth sha512
———————
My server config:
———————
dh /tmp/openvpn/dh.pem
ca /tmp/openvpn/ca.crt
cert /tmp/openvpn/cert.pem
key /tmp/openvpn/key.pem
keepalive 10 120
verb 4
mute 5
log-append /var/log/openvpn
writepid /var/log/openvpnd.pid
management 127.0.0.1 5002
management-log-cache 50
mtu-disc yes
topology subnet
client-config-dir /tmp/openvpn/ccd
script-security 2
port 1194
proto udp
cipher aes-256-cbc
auth sha512
tls-server
ifconfig-pool-persist /tmp/openvpn/ip-pool 86400
client-to-client
push "redirect-gateway def1"
fast-io
tun-mtu 1500
server 10.0.2.0 255.255.255.0
dev tun0
———————
What do I have wrong? How can I get my VPN up and running? Thanks in advance for any assistance!