Like the title already said im trying to ping the LAN IP of the VPN Server via the tun interface of the vpn Client.
For information i've got three networks.
192.168.99.0/24 (Client network)
192.168.180.0/24 (Server network)
10.8.0.0/24 (VPN Network)
Openvpn Server IP
192.168.180.4
Router IP
Serverside: 192.168.180.3
Clientside:192.168.99.3
Openvpnclient IP
192.168.99.100
I use those extra rules to "mark" the traffic and send it but something is missing and i cant figure out what.
ip rule add fwmark 2 table 3
ip route add default via 10.8.0.1 table 3
ip route flush cache
iptables -t mangle -A OUTPUT -p icmp -j MARK --set-mark 2
iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
ip route show table 3(client)
default via 10.8.0.1 dev tun0
ip route show (client)
10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.2
169.254.0.0/16 dev enp0s8 scope link metric 1000
192.168.99.0/24 dev enp0s8 proto kernel scope link src 192.168.99.100
192.168.180.0/24 via 192.168.99.3 dev enp0s8
client.conf
client
dev tun
proto tcp
sndbuf 0
rcvbuf 0
remote 192.168.180.4 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
comp-lzo
setenv opt block-outside-dns
key-direction 1
verb 3
redirect-gateway def1
server.conf
port 1194
proto tcp
dev tun
sndbuf 0
rcvbuf 0
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
tls-auth ta.key 0
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
route 192.168.180.0 255.255.255.0
push "route 192.168.180.0 255.255.255.0"
keepalive 10 120
cipher AES-256-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
crl-verify crl.pem
ip route show (server)
10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.1
169.254.0.0/16 dev tun0 scope link metric 1000
192.168.99.0/24 via 192.168.180.3 dev enp0s9
192.168.180.0/24 dev enp0s9 proto kernel scope link src 192.168.180.4
I dont have any iptables rules except the ones mentioned above. By the way everthing works until i execute my commands above after that no ping works anymore except for 10.8.0.1. If i ping 192.168.180.4 from the client and then look on the client wireshark on the tun0 interface i see an ICMP request packet but no replay. Have someone an idea?
I'm also open to different approaches on forcing icmp packet through vpn and reaching the LAN of the VPN Server