Good morning,
I already did that. If I ping from the client to the server, the packets reach the server but not the direct linked PC. The server does not send the reply.
tcpdump ping request from the VPN client to the VPN server.
$tcpdump -i tun0:
07:47:42.980176 IP 10.8.0.2 > 169.254.1.10: ICMP echo request, id 1, seq 6793, length 40
However, if I ping the server's 169.254.1.5 address, the client receives the ping reply, but I'm not able to see specific packets using tcpdump in any of the three interfaces on the server. I only see this type of generic messages:
09:32:44.179580 IP 10.8.0.2 > vpnserver: ICMP echo request, id 1, seq 9393, length 40
09:32:44.179601 IP vpnserver > 10.8.0.2: ICMP echo reply, id 1, seq 9393, length 40
A server side clean log:
OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Jul 19 2021
library versions: OpenSSL 1.1.1f 31 Mar 2020, LZO 2.10
Diffie-Hellman initialized with 2048 bit key
Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
TUN/TAP device tun0 opened
TUN/TAP TX queue length set to 100
/sbin/ip link set dev tun0 up mtu 1500
/sbin/ip addr add dev tun0 10.8.0.1/24 broadcast 10.8.0.255
Could not determine IPv4/IPv6 protocol. Using AF_INET
Socket Buffers: R=[212992->212992] S=[212992->212992]
UDPv4 link local (bound): [AF_INET]192.168.3.222:1194
UDPv4 link remote: [AF_UNSPEC]
GID set to nogroup
UID set to nobody
MULTI: multi_init called, r=256 v=256
IFCONFIG POOL: base=10.8.0.2 size=252, ipv6=0
ifconfig_pool_read(), in='new,10.8.0.2', TODO: IPv6
succeeded -> ifconfig_pool_set()
IFCONFIG POOL LIST
new,10.8.0.2
Initialization Sequence Completed
192.168.3.22:59854 TLS: Initial packet from [AF_INET]192.168.3.22:59854 (via [AF_INET]192.168.3.222%enp2s0), sid=56eded65 a41139bc
192.168.3.22:59854 VERIFY OK: depth=1, CN=ChangeMe
192.168.3.22:59854 VERIFY OK: depth=0, CN=new
192.168.3.22:59854 peer info: IV_VER=3.git::d3f8b18b
192.168.3.22:59854 peer info: IV_PLAT=win
192.168.3.22:59854 peer info: IV_NCP=2
192.168.3.22:59854 peer info: IV_TCPNL=1
192.168.3.22:59854 peer info: IV_PROTO=30
192.168.3.22:59854 peer info: IV_CIPHERS=AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305:AES-256-CBC
192.168.3.22:59854 peer info: IV_AUTO_SESS=1
192.168.3.22:59854 peer info: IV_GUI_VER=OCWindows_3.3.4-2600
192.168.3.22:59854 peer info: IV_SSO=webauth,openurl,crtext
192.168.3.22:59854 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, 2048 bit RSA
192.168.3.22:59854 [new] Peer Connection Initiated with [AF_INET]192.168.3.22:59854 (via [AF_INET]192.168.3.222%enp2s0)
new/192.168.3.22:59854 MULTI_sva: pool returned IPv4=10.8.0.2, IPv6=(Not enabled)
new/192.168.3.22:59854 MULTI: Learn: 10.8.0.2 -> new/192.168.3.22:59854
new/192.168.3.22:59854 MULTI: primary virtual IP for new/192.168.3.22:59854: 10.8.0.2
new/192.168.3.22:59854 PUSH: Received control message: 'PUSH_REQUEST'
new/192.168.3.22:59854 SENT CONTROL [new]: 'PUSH_REPLY,redirect-gateway def1 bypass-dhcp,route 169.254.1.0 255.255.255.0,dhcp-option DNS 10.8.0.1,route-gateway 10.8.0.1,topology subnet,ping 10,ping-restart 120,ifconfig 10.8.0.2 255.255.255.0,peer-id 0,cipher AES-256-GCM' (status=1)
new/192.168.3.22:59854 Data Channel: using negotiated cipher 'AES-256-GCM'
new/192.168.3.22:59854 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
new/192.168.3.22:59854 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
new/192.168.3.22:59854 IP packet with unknown IP version=0 seen
Any ideas?
Thanks for the help
Edit:
Confirmed that the "vpnserver" of the "generic message" I mentioned is the 169.254.1.5 address. I confirmed it routing directly the 169.254.1.5 and 169.254.1.10 addresses in the server config file:
route 169.254.1.10 255.255.255.255
route 169.254.1.5 255.255.255.255
The routing table remains like this:
10.8.0.0 0.0.0.0 255.255.255.0 U 0 0 0 tun0
169.254.1.0 0.0.0.0 255.255.255.0 U 0 0 0 enp3s0
vpnserver 10.8.0.2 255.255.255.255 UGH 0 0 0 tun0
169.254.1.10 10.8.0.2 255.255.255.255 UGH 0 0 0 tun0
192.168.0.0 0.0.0.0 255.255.252.0 U 0 0 0 enp2s0
I know this is wrong. Just wanted to try.