I am trying to resolve a problem for a few days now, but I am still unable to pinpoint the source of the problem.
VPNServer 10.8.0.1
Client 10.8.0.43
if I try to ping the client from the server, I get:
PING 10.8.0.43 (10.8.0.43) 56(84) bytes of data.
From 10.8.0.1 icmp_seq=1 Destination Host Unreachable
From 10.8.0.1 icmp_seq=2 Destination Host Unreachable
From 10.8.0.1 icmp_seq=3 Destination Host Unreachable
From 10.8.0.1 icmp_seq=4 Destination Host Unreachable
From 10.8.0.1 icmp_seq=5 Destination Host Unreachable
From 10.8.0.1 icmp_seq=6 Destination Host Unreachable
From 10.8.0.1 icmp_seq=7 Destination Host Unreachable
From 10.8.0.1 icmp_seq=8 Destination Host Unreachable
From 10.8.0.1 icmp_seq=9 Destination Host Unreachable
From 10.8.0.1 icmp_seq=10 Destination Host Unreachable
And it goes like this for a long time, until I connect to the vpn client pc using the local IP, and ping the server:
PING 10.8.0.1 (10.8.0.1): 56 data bytes
64 bytes from 10.8.0.1: seq=0 ttl=64 time=31.668 ms
64 bytes from 10.8.0.1: seq=1 ttl=64 time=6.897 ms
64 bytes from 10.8.0.1: seq=2 ttl=64 time=6.915 ms
64 bytes from 10.8.0.1: seq=3 ttl=64 time=316.562 ms
64 bytes from 10.8.0.1: seq=4 ttl=64 time=10.402 ms
At that exact moment the server can ping the client too.
Here are my configuration files,
All firewalls are deactivated
server.conf
port 1194
proto udp
dev tap
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh none
server 10.8.0.0 255.255.128.0
ifconfig-pool-persist ipp.txt
client-to-client
keepalive 10 120
tls-crypt ta.key 0
cipher AES-256-GCM
auth SHA256
user nobody
group nogroup
persist-key
persist-tun
status /var/log/openvpn/openvpn-status.log
verb 4
;mute 20
explicit-exit-notify 1
script-security 2
client-connect /var/www/client-connected.sh
client-disconnect /var/www/client-disconnected.sh
client.conf
client
dev tap
proto udp
remote SERVER_IP_ADDRESS 1194
remote SERVER_HOST_NAME 1194
resolv-retry infinite
nobind
user nobody
group nogroup
persist-key
persist-tun
remote-cert-tls server
cipher AES-256-GCM
auth SHA256
verb 3