Cannot connect to server

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
alanchen8197
OpenVpn Newbie
Posts: 4
Joined: Thu Aug 18, 2011 5:28 pm

Cannot connect to server

Post by alanchen8197 » Thu Aug 18, 2011 5:41 pm

Hi, I have already setup OpenVPN server at my home computer, and I can connect client computer to my server from a public wifi, but I cannot connect client from my office. I think it must be the firewall used at my office..........but I want to make sure.....so is there anyone that is willing to help me take a look at my log and tell me if it is the firewall?

I am running my server on TCP port 88 and I have already forward the port to my server.
Here is my log:

C:\Program Files\OpenVPN\config>openvpn client.ovpn
Mon Aug 15 17:10:32 2011 OpenVPN 2.2.1 Win32-MSVC++ [SSL] [LZO2] built on Jul 1
2011
Mon Aug 15 17:10:32 2011 NOTE: OpenVPN 2.1 requires '--script-security 2' or hig
her to call user-defined scripts or executables
Mon Aug 15 17:10:33 2011 LZO compression initialized
Mon Aug 15 17:10:33 2011 Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:
0 EL:0 ]
Mon Aug 15 17:10:33 2011 Socket Buffers: R=[8192->8192] S=[8192->8192]
Mon Aug 15 17:10:33 2011 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:
0 EL:0 AF:3/1 ]
Mon Aug 15 17:10:33 2011 Local Options hash (VER=V4): '69109d17'
Mon Aug 15 17:10:33 2011 Expected Remote Options hash (VER=V4): 'c0103fa8'
Mon Aug 15 17:10:33 2011 Attempting to establish TCP connection with 108.23.18.1
48:88
Mon Aug 15 17:10:33 2011 TCP connection established with XXX.XX.XX.XXX:88
Mon Aug 15 17:10:33 2011 TCPv4_CLIENT link local: [undef]
Mon Aug 15 17:10:33 2011 TCPv4_CLIENT link remote: XXX.XX.XX.XXX:88
Mon Aug 15 17:10:33 2011 Connection reset, restarting [-1]
Mon Aug 15 17:10:33 2011 TCP/UDP: Closing socket
Mon Aug 15 17:10:33 2011 SIGUSR1[soft,connection-reset] received, process restar
ting
Mon Aug 15 17:10:33 2011 Restart pause, 5 second(s)

and it just repeat itself over and over again.....
Any help?

Thanks
-Alan

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Cannot connect to server

Post by janjust » Thu Aug 18, 2011 9:42 pm

check the log file on the other end - could be something else, and without client+server log files and client+server config files it is impossible to tell.

alanchen8197
OpenVpn Newbie
Posts: 4
Joined: Thu Aug 18, 2011 5:28 pm

Re: Cannot connect to server

Post by alanchen8197 » Fri Aug 19, 2011 3:20 am

Thanks for your reply.

Here is my server log:
Thu Aug 18 17:35:48 2011 MULTI: multi_create_instance called
Thu Aug 18 17:35:48 2011 Re-using SSL/TLS context
Thu Aug 18 17:35:48 2011 LZO compression initialized
Thu Aug 18 17:35:48 2011 Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:
0 EL:0 ]
Thu Aug 18 17:35:48 2011 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:
0 EL:0 AF:3/1 ]
Thu Aug 18 17:35:48 2011 Local Options hash (VER=V4): 'c0103fa8'
Thu Aug 18 17:35:48 2011 Expected Remote Options hash (VER=V4): '69109d17'
Thu Aug 18 17:35:48 2011 TCP connection established with XXX.XXX.XXX.XX:52222
Thu Aug 18 17:35:48 2011 TCPv4_SERVER link local: [undef]
Thu Aug 18 17:35:48 2011 TCPv4_SERVER link remote: XXX.XXX.XXX.XX:52222
Thu Aug 18 17:35:48 2011 XXX.XXX.XXX.XX:52222 TLS: Initial packet from XXX.XXX.XXX.XX:52222, sid=988700c0 f70bd714
Thu Aug 18 17:35:48 2011 XXX.XXX.XXX.XX:52222 Connection reset, restarting [-1]
Thu Aug 18 17:35:48 2011 XXX.XXX.XXX.XX:52222 SIGUSR1[soft,connection-reset] rec
eived, client-instance restarting
Thu Aug 18 17:35:48 2011 TCP/UDP: Closing socket
Thu Aug 18 17:35:53 2011 MULTI: multi_create_instance called
Thu Aug 18 17:35:53 2011 Re-using SSL/TLS context
Thu Aug 18 17:35:53 2011 LZO compression initialized
Thu Aug 18 17:35:53 2011 Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:
0 EL:0 ]
Thu Aug 18 17:35:53 2011 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:
0 EL:0 AF:3/1 ]
Thu Aug 18 17:35:53 2011 Local Options hash (VER=V4): 'c0103fa8'
Thu Aug 18 17:35:53 2011 Expected Remote Options hash (VER=V4): '69109d17'
Thu Aug 18 17:35:53 2011 TCP connection established with XXX.XXX.XXX.XX:52223
Thu Aug 18 17:35:53 2011 TCPv4_SERVER link local: [undef]
Thu Aug 18 17:35:53 2011 TCPv4_SERVER link remote: XXX.XXX.XXX.XX:52223
Thu Aug 18 17:35:53 2011 XXX.XXX.XXX.XX:52223 TLS: Initial packet from XXX.XXX.XXX.XX:52223, sid=4038ca6b a8c08278
Thu Aug 18 17:35:53 2011 XXX.XXX.XXX.XX:52223 Connection reset, restarting [-1]
Thu Aug 18 17:35:53 2011 XXX.XXX.XXX.XX:52223 SIGUSR1[soft,connection-reset] rec
eived, client-instance restarting
Thu Aug 18 17:35:53 2011 TCP/UDP: Closing socket
Thu Aug 18 17:36:02 2011 MULTI: multi_create_instance called
Thu Aug 18 17:36:02 2011 Re-using SSL/TLS context
Thu Aug 18 17:36:02 2011 LZO compression initialized
Thu Aug 18 17:36:02 2011 Control Channel MTU parms [ L:1544 D:140 EF:40 EB:0 ET:
0 EL:0 ]
Thu Aug 18 17:36:02 2011 Data Channel MTU parms [ L:1544 D:1450 EF:44 EB:135 ET:
0 EL:0 AF:3/1 ]
Thu Aug 18 17:36:02 2011 Local Options hash (VER=V4): 'c0103fa8'
Thu Aug 18 17:36:02 2011 Expected Remote Options hash (VER=V4): '69109d17'
Thu Aug 18 17:36:02 2011 TCP connection established with XXX.XXX.XXX.XX:52224
Thu Aug 18 17:36:02 2011 TCPv4_SERVER link local: [undef]
Thu Aug 18 17:36:02 2011 TCPv4_SERVER link remote: XXX.XXX.XXX.XX:52224
Thu Aug 18 17:36:02 2011 XXX.XXX.XXX.XX:52224 TLS: Initial packet from XXX.XXX.XXX.XX:52224, sid=694d1796 9d2911a8
Thu Aug 18 17:36:02 2011 XXX.XXX.XXX.XX:52224 Connection reset, restarting [-1]
Thu Aug 18 17:36:02 2011 XXX.XXX.XXX.XX:52224 SIGUSR1[soft,connection-reset] rec
eived, client-instance restarting
Thu Aug 18 17:36:02 2011 TCP/UDP: Closing socket

alanchen8197
OpenVpn Newbie
Posts: 4
Joined: Thu Aug 18, 2011 5:28 pm

Re: Cannot connect to server

Post by alanchen8197 » Fri Aug 19, 2011 3:30 am

And here is my server and client config:

Server:
port 88
proto tcp
dev tun
ca C:\\Program\ Files\\OpenVPN\\easy-rsa\\keys\\ca.crt
cert C:\\Program\ Files\\OpenVPN\\easy-rsa\\keys\\server.crt
key C:\\Program\ Files\\OpenVPN\\easy-rsa\\keys\\server.key
dh C:\\Program\ Files\\OpenVPN\\easy-rsa\\keys\\dh1024.pem
server 172.16.15.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3


Client:
client
dev tun
proto tcp
remote XX.XXX.XX.XX 80
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
ns-cert-type server
comp-lzo
verb 3

I have taken out all the comments in the config file as it will make my post too long.
Thanks again.
-Alan

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Cannot connect to server

Post by janjust » Fri Aug 19, 2011 6:32 am

your setup looks normal enough, except for the fact that the server is listening on port 88 but the client is connecting to port 80.

it seems that the connection is reset both at the server and client end - this suggests that a firewall is dropping the connection. I'd try tunneling via an HTTP or SOCKS proxy.

alanchen8197
OpenVpn Newbie
Posts: 4
Joined: Thu Aug 18, 2011 5:28 pm

Re: Cannot connect to server

Post by alanchen8197 » Fri Aug 19, 2011 7:37 am

Thanks for your reply.

The reason why I am not doing tunneling is because I am also trying to connect my ipod touch through the OpenVPN connection, since OpenVPN is allowed on the iOS, but there is no tunneling app for iOS, that is why I have been sticking with OpenVPN.

Thanks again
-Alan

Post Reply