How to run tun2socks on virtualbox? #318
Unanswered
moninah850
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I installed Badvpn-tun2socks (https://github.com/ambrop72/badvpn) to route all VirtualBox (Debian 12) traffic via ssh using the command:
ssh -D 127.0.0.1:8080 <user>@<host>
.ip route
:default via 10.0.2.2 dev enp0s3 proto dhcp src 10.0.2.15 metric 100
10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.15 metric 100
169.254.0.0/16 dev enp0s3 scope link metric 1000
cat /etc/resolv.conf
:Generated by NetworkManager
nameserver 208.67.222.222
I enter the following commands in the terminal:
sudo ip tuntap add dev tun0 mode tun user user
sudo ifconfig tun0 10.0.0.1 netmask 255.255.255.0
badvpn-tun2socks --tundev tun0 --netif-ipaddr 10.0.0.2 --netif-netmask 255.255.255.0 --socks-server-addr 127.0.0.1:8080
ssh -D 127.0.0.1:8080 user@host
sudo route add 208.67.222.222 gw 10.0.2.2 metric 4
sudo route add gw 10.0.2.2 metric 5
sudo route add default gw 10.0.0.2 metric 6
Did I do everything right? Did miss anything? Will all traffic be routed through SSH? TCP, UDP, traffic of running apps in the system, etc?
The project https://github.com/ambrop72/badvpn has not been updated for a long time. Is the https://github.com/xjasonlyu/tun2socks project a continuation? Can I achieve the same result without using Badvpn (don't install badvpn), but only tun2socks (install only https://github.com/xjasonlyu/tun2socks)?
Thanks in advance everyone!
Beta Was this translation helpful? Give feedback.
All reactions