Score:0

tun2socks configuration not working

cn flag

I am trying to configure a tun2socks server that forwards all traffic to an external proxy found online. I also want to retain the ability to ssh into the server so I had to take this into consideration. So far the steps I have gathered are the following:

  1. Download the latest release of tun2socks from github
  2. ip tuntap add mode tun dev tun0
  3. ip addr add 198.18.0.1/15 dev tun0
  4. ip link set dev tun0 up
  5. ip route del default
  6. ip route add default via 198.18.0.1 dev tun0 metric 1
  7. ip route add default via 172.17.0.1 dev eth0 metric 10
  8. iptables -t nat -A PREROUTING -i eth0 -d 172.17.0.1 -j DNAT --to 192.18.0.1
  9. iptables -A FORWARD -i eth0 -d 172.17.0.1 --dport 22 -j REJECT
  10. iptables -A FORWARD -i eth0 -d 172.17.0.1 -j ACCEPT
  11. iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
  12. sudo ./tun2socks-linux-amd64-v3 -device tun://tun0 -proxy socks5://external-proxy:port

What am I doing wrong? I know there are a lot of commands here but it seems like there should be some instructions somewhere for this.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.