Route vpn traffic through scaleway instance


#1

Dear all,

I am having a functional (which means I have no trouble reaching any host) VPN (tinc) running on a scaleway instance.
Now I am trying to route my internet traffic from a client pc through this vpn.

I have set up on a vpn server:

net.ipv4.ip_forward =  1
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

still if i change the route on my client (10.8.0.18 is the private ip of the vpn server)

ip route add 52.57.94.122 via 10.8.0.18

the IP (and only this) 52.57.94.122 becomes unreachable. I suppose that it has something to do with the fact, that the scaleway servesr itself is behind a nat.

Could you please give me some hint how to configure my iptables there?

Thanks a lot


#2

All I can say is that I’ve successfully routed traffic through scaleway using openvpn, ssh and recently wireguard with no problem. I do avoid any 10. addresses for the vpn interfaces though and use 192.168. ranges instead just to make sure I don’t conflict with scaleway’s internal server IPs or routing.


#3

could you please tell me what you did with iptables(?) on your openvpn servers?


#4

Using only bare iptables (no firewalld) and default policy accept I only need the same commands to enable forwarding and nat as you used. You could check the output of iptables-save just to make sure there is nothing else in there blocking.