Hi, everybody.
I have a problem with my new OpenVPN server, on last saturday, I had configured and tested and worked. But today, I change the Server IP of my VPN and the clients not connect any more. Already researched in various forums but could not solve.
On the client does not up the interface (tun), but on the server yes, but does not connect.
My server configuration:
proto udp
port 51001
dev tun
script-security 2
ifconfig 172.32.1.1 172.32.1.2
push "route 192.168.1.0 255.255.255.0"
comp-lzo
keepalive 10 120
float
max-clients 1
persist-key
persist-tun
log-append /var/log/openvpn.log
verb 3
tls-server
dh /etc/openvpn/keys/dh1024.pem
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
tls-auth /etc/openvpn/keys/chave.key
status /var/log/openvpn.stats
My client configuration:
client
dev tun
proto udp
remote x.x.x.x
port 51001
pull
comp-lzo
keepalive 10 120
float
tls-client
persist-tun
persist-key
dh /etc/openvpn/keys/dh1024.pem
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/client1.crt
key /etc/openvpn/keys/client1.key
tls-auth /etc/openvpn/keys/chave.key
route-method exe
route-delay 2
script-security 2
remote-cert-tls server
ifconfig 172.32.1.2 172.32.1.1
log /etc/openvpn/client1.log
The server's log:
Tue Jan 1 22:32:43 2002 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Tue Jan 1 22:32:43 2002 Re-using SSL/TLS context
Tue Jan 1 22:32:43 2002 LZO compression initialized
Tue Jan 1 22:32:43 2002 Control Channel MTU parms [ L:1542 D:166 EF:66 EB:0 ET:0 EL:0 ]
Tue Jan 1 22:32:43 2002 Socket Buffers: R=[229376->131072] S=[229376->131072]
Tue Jan 1 22:32:43 2002 Preserving previous TUN/TAP instance: tun0
Tue Jan 1 22:32:43 2002 Data Channel MTU parms [ L:1542 D:1450 EF:42 EB:135 ET:0 EL:0 AF:3/1 ]
Tue Jan 1 22:32:43 2002 Local Options hash (VER=V4): '7b726282'
Tue Jan 1 22:32:43 2002 Expected Remote Options hash (VER=V4): 'ebe38598'
Tue Jan 1 22:32:43 2002 UDPv4 link local (bound): [undef]
Tue Jan 1 22:32:43 2002 UDPv4 link remote: [undef]
Tue Jan 1 22:32:43 2002 TLS Error: Unroutable control packet received from [AF_INET]y.y.y.y:51001 (si=3 op=P_CONTROL_V1)
Tue Jan 1 22:32:44 2002 TLS Error: Unroutable control packet received from [AF_INET]y.y.y.y:51001 (si=3 op=P_CONTROL_V1)
Tue Jan 1 22:32:45 2002 TLS Error: Unroutable control packet received from [AF_INET]y.y.y.y:51001 (si=3 op=P_CONTROL_V1)
Tue Jan 1 22:32:46 2002 TLS Error: Unroutable control packet received from [AF_INET]y.y.y.y:51001 (si=3 op=P_CONTROL_V1)
The client's log:
Mon Mar 16 11:58:20 2015 OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [MH] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Dec 1 2014
Mon Mar 16 11:58:20 2015 WARNING: using --pull/--client and --ifconfig together is probably not what you want
Mon Mar 16 11:58:20 2015 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Mon Mar 16 11:58:20 2015 Control Channel Authentication: using '/etc/openvpn/keys/chave.key' as a OpenVPN static key file
Mon Mar 16 11:58:20 2015 LZO compression initialized
Mon Mar 16 11:58:20 2015 UDPv4 link local (bound): [undef]
Mon Mar 16 11:58:20 2015 UDPv4 link remote: [AF_INET]x.x.x.x:51001
Mon Mar 16 11:58:20 2015 read UDPv4 [ECONNREFUSED]: Connection refused (code=111)
On both firewall have the following rule:
/sbin/iptables -A INPUT -p udp --dport 51001 -j ACCEPT
/sbin/iptables -A FORWARD -p udp --dport 51001 -j ACCEPT
/sbin/iptables -A OUTPUT -p udp --dport 51001 -j ACCEPT
/sbin/iptables -A INPUT -p udp --sport 51001 -j ACCEPT
/sbin/iptables -A FORWARD -p udp --sport 51001 -j ACCEPT
/sbin/iptables -A OUTPUT -p udp --sport 51001 -j ACCEPT
What am I doing wrong?
Obs.: the x.x.x.x is server ip and y.y.y.y is client ip