Having set up a tinc
VPN node properly (the vpn Connection works):
I have set the following options
net.ipv4.ip_forward = 1
iptables -t nat -A POSTROUTING -o ens2 -j MASQUERADE
If I then set the route on my client
# need this rule to connect vpn after changing default GW
ip route add $VPN_PUBLIC_ADDR via $NETWORK_GATEWAY
ip route del default
# route traffic through vpn
ip route add default via $VPN_PRIVATE_IP
I can only access hosts in the vpn -> the traffic is not being forwarded, just the vpn connection is working properly.
What am I missing? How can I analyze the cause of the problem?
EDIT: There is no firewall set on the vpn server side (as far as I can see)
iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- anywhere anywhere