0

Since socat has the functionality of creating tunnel interfaces and route traffic over UDP, I believe a VPN can be created using this feature.

Server side setup:

  • sudo socat -d -d TUN:10.0.0.1/24,up UDP-LISTEN:<PORT>,reuseaddr,fork
  • sudo iptables -A FORWARD -i tun0 -j ACCEPT
  • sudo iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o eth0 -j MASQUERADE

Client side setup:

  • sudo socat UDP:<PUBLIC-HOST>:<PORT> TUN:10.0.0.2/24,up
  • sudo ip route replace default 10.0.0.1
  • ip route add <PUBLIC-HOST> via 192.168.1.1 dev wlan0

As far as I can tell this works fine as I can ping the server on 10.0.0.1 but when trying to ping google.com it fails with

ping: google.com: Temporary failure in name resolution

Can anyone point out what is missing from this configuration/setup?

0

You must log in to answer this question.

Browse other questions tagged .