I'm having problems to connect to my openvpn server from WAN side.
When I make the connection through a ssh tunnel(to test the vpn itself) the vpn comes up like it has to do, but when i change the remote option to my wan ip address I can't get a connection.
I tried both tcp and udp, but both protocols fail.
I searched through the archives and googled a lot, but every time i get errors which I can't explain according to all the examples and tutorials.
client version OpenVPN 2.1_rc9 (tried also the 2.09 stable version)
server version: 2.1_rc7-2
this is running on a asus wl500gP router with oleg firmware in 'home gateway' mode
wan interface is vlan1 with br0 as internal lan and tun0 as vpn tunnel
my server config file:
Code:
port 1194
proto tcp
dev tun
ca /opt/etc/easy-rsa/keys/ca.crt
cert /opt/etc/easy-rsa/keys/server.crt
dh /opt/etc/easy-rsa/keys/dh1024.pem
server 172.16.0.0 255.255.255.0
push "route 10.0.0.0 255.255.255.0"
keepalive 10 120
comp-lzo
persist-key
persist-tun
status /opt/var/log/openvpn-status.log
log-append /opt/var/log/openvpn.log
verb 9
management localhost 7505
I added the following rules to iptables:
Code:
iptables -I INPUT -p tcp --dport 1194 -j ACCEPT
iptables -t nat -I PREROUTING -i $1 -p tcp --dport 1194 -j DNAT --to-destination $4:1194
iptables -I INPUT -i tun+ -j ACCEPT
iptables -I FORWARD -i tun+ -j ACCEPT
iptables -I FORWARD -o tun+ -j ACCEPT
I get this error in the client:
Code:
Mon Aug 18 17:40:05 2008 OpenVPN 2.1_rc9 i686-pc-mingw32 [SSL] [LZO2] [PKCS11] built on Jul 31 2008
Mon Aug 18 17:40:05 2008 LZO compression initialized
Mon Aug 18 17:40:05 2008 Attempting to establish TCP connection with MY_IP:1194
Mon Aug 18 17:40:05 2008 TCP connection established with MY_IP:1194
Mon Aug 18 17:40:05 2008 TCPv4_CLIENT link local: [undef]
Mon Aug 18 17:40:05 2008 TCPv4_CLIENT link remote: MY_IP:1194
Mon Aug 18 17:40:05 2008 Connection reset, restarting [0]
Mon Aug 18 17:40:05 2008 SIGUSR1[soft,connection-reset] received, process restarting
Thanks in advance