Makefile 495 B

123456789101112131415
  1. server:
  2. cargo build
  3. sudo ./target/debug/dns-client --tunnel-server
  4. client:
  5. cargo build
  6. sudo ./target/debug/dns-client --tunnel-client --tun
  7. nw:
  8. # clean the iptables rules
  9. sudo iptables -F
  10. sudo iptables -t nat -F
  11. echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
  12. sudo iptables -A FORWARD -i tun1 -o wlp4s0 -j ACCEPT
  13. #sudo iptables -t nat -A POSTROUTING -s 10.0.0.1/24 -o wlp4s0 -j SNAT --to-source 192.168.2.78
  14. sudo iptables -t nat -A POSTROUTING -s 10.0.0.1/24 -o wlp4s0 -j MASQUERADE