Hello everyone,
I have installed OpenVPN 2.4.8 in Centos 8. Everything works fine until I manage to connect openvpn server from my laptop.
However, when I try to access one of my server using SSH, seem like it freeze, no response from the server. Also when I try to access one my webserver, it tooks forever to get the HTTP content.
/etc/openvpn/server/server.conf
port 1194
proto udp
dev tun
ca /etc/openvpn/server/ca.crt
cert /etc/openvpn/server/openvpn-server.crt
key /etc/openvpn/server/openvpn-server.key
dh /etc/openvpn/server/dh.pem
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 1.1.1.1"
duplicate-cn
cipher AES-256-CBC
tls-version-min 1.2
tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA256
auth SHA512
auth-nocache
keepalive 20 60
persist-key
persist-tun
compress lz4
daemon
user nobody
group nobody
log-append /var/log/openvpn.log
verb 3
/etc/openvpn/client/client.ovpn
client
dev tun
proto udp
remote x.x.x.x 1194
ca ca.crt
cert client.crt
key client.key
cipher AES-256-CBC
auth SHA512
auth-nocache
tls-version-min 1.2
tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256:TLS-DHE-RSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-CBC-SHA256
resolv-retry infinite
compress lz4
nobind
persist-key
persist-tun
mute-replay-warnings
comp-lzo yes
verb 3
I try to access webserver from laptop
C:\Users\admin>curl -vvv http://10.25.131.161:8125
* Rebuilt URL to: http://10.25.131.161:8125/
* Trying 10.25.131.161...
* TCP_NODELAY set
* Connected to 10.25.131.161 (10.25.131.161) port 8125 (#0)
> GET / HTTP/1.1
> Host: 10.25.131.161:8125
> User-Agent: curl/7.55.1
> Accept: */*
>
tcpdump from openvpn server
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on tun0, link-type RAW (Raw IP), capture size 262144 bytes
21:28:25.771536 ip: 10.8.0.6.51340 > 10.25.131.161.8125: Flags [S], seq 972979405, win 64240, options [mss 1360,nop,wscale 8,nop,nop,sackOK], length 0
21:28:25.772040 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [S.], seq 558191905, ack 972979406, win 29200, options [mss 1460,nop,nop,sackOK,nop,wscale 7], length 0
21:28:25.783427 ip: 10.8.0.6.51340 > 10.25.131.161.8125: Flags [.], ack 1, win 1025, length 0
21:28:25.787543 ip: 10.8.0.6.51340 > 10.25.131.161.8125: Flags [P.], seq 1:83, ack 1, win 1025, length 82
21:28:25.787936 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], ack 83, win 229, length 0
21:28:25.981027 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], seq 1:1361, ack 83, win 229, length 1360
21:28:25.981060 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], seq 1361:2721, ack 83, win 229, length 1360
21:28:25.981062 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], seq 2721:4081, ack 83, win 229, length 1360
21:28:25.981064 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], seq 4081:5441, ack 83, win 229, length 1360
21:28:25.981067 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], seq 5441:6801, ack 83, win 229, length 1360
21:28:25.981069 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], seq 6801:8161, ack 83, win 229, length 1360
21:28:25.981072 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], seq 8161:9521, ack 83, win 229, length 1360
21:28:25.981073 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], seq 9521:10881, ack 83, win 229, length 1360
21:28:26.012239 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], seq 13601:14961, ack 83, win 229, length 1360
21:28:26.228201 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], seq 1:1361, ack 83, win 229, length 1360
21:28:26.661166 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], seq 1:1361, ack 83, win 229, length 1360
21:28:27.527254 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], seq 1:1361, ack 83, win 229, length 1360
21:28:29.259249 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], seq 1:1361, ack 83, win 229, length 1360
21:28:32.723289 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], seq 1:1361, ack 83, win 229, length 1360
21:28:39.659157 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], seq 1:1361, ack 83, win 229, length 1360
21:28:53.515009 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], seq 1:1361, ack 83, win 229, length 1360
21:29:21.226966 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], seq 1:1361, ack 83, win 229, length 1360
21:29:25.798850 ip: 10.8.0.6.51340 > 10.25.131.161.8125: Flags [.], seq 82:83, ack 1, win 1025, length 1
21:29:25.799236 ip: 10.25.131.161.8125 > 10.8.0.6.51340: Flags [.], ack 83, win 229, options [nop,nop,sack 1 {82:83}], length 0
I can ping the server from my laptop
C:\Users\admin>ping 10.25.131.161
Pinging 10.25.131.161 with 32 bytes of data:
Reply from 10.25.131.161: bytes=32 time=12ms TTL=62
Reply from 10.25.131.161: bytes=32 time=14ms TTL=62
Reply from 10.25.131.161: bytes=32 time=11ms TTL=62
Reply from 10.25.131.161: bytes=32 time=11ms TTL=62
Ping statistics for 10.25.131.161:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 11ms, Maximum = 14ms, Average = 12ms
I really appreciate for your help.