You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 22, 2021. It is now read-only.
I cannot get badvpn-tun2socks to work on either Ubuntu16.04 or Debian Stretch.
On Ubuntu, I tried with or without firewall. Debian is installed in a VM without FW.
# As user 'superman':
sudo ip tuntap add dev tun0 mode tun user superman
sudo ip addr add 10.0.0.1/24 dev tun0
badvpn-tun2socks --tundev tun0 --netif-ipaddr 10.0.0.2 --netif-netmask 255.255.255.0 --socks-server-addr 127.0.0.1:1080
# NOTICE(tun2socks): initializing BadVPN tun2socks 1.999.130# NOTICE(tun2socks): entering event loop
In a separate window:
ip addr
# 3: tun0: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 500# link/none # inet 10.0.0.1/24 scope global tun0# valid_lft forever preferred_lft forever
ping 10.0.0.1
# PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.# 64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.016 ms
ping 10.0.0.2
# PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
We get no answer when pinging 10.0.0.2. When adding the default gw to 10.0.0.2, we get an error:
Indeed that did it (modulo the typo tap0 -> tun0):
ip addr show tun0
# 3: tun0: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 500
ip link set tun0 up
ip addr show tun0
# 3: tun0: <NO-CARRIER,POINTOPOINT,MULTICAST,NOARP,UP> mtu 1500 qdisc noop state DOWN group default qlen 500
So the complete recipe for me:
# As root
ip tuntap add dev tun0 mode tun user BADVPN_USER
ip addr add 10.0.0.1/24 dev tun0
ip link set tun0 up
su BADVPN_USER -c "setsid badvpn-tun2socks --logger syslog --loglevel warning --tundev tun0 --netif-ipaddr 10.0.0.2 --netif-netmask 255.255.255.0 --socks-server-addr 127.0.0.1:1080"
route add SSH_SERVER gw DEFAULT_GW metric 5
# If DNS server not on local network: route add DNS_SERVER gw DEFAULT_GW metric 5# to collect DNS server ip: nmcli device show eth0 | grep DNS
route add default gw 10.0.10.2 metric 6
This comment written via badvpn-tun2socks of course ;-)
FYI, I wrote a small NetworkManager/ifupdown script to setup tun2socks tunnels based on some user-defined configuration and available interfaces. DNS leaks are managed by reconfiguring dnsmasq. It is available at https://github.com/xeyownt/tun2socks-manager.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I cannot get badvpn-tun2socks to work on either Ubuntu16.04 or Debian Stretch.
On Ubuntu, I tried with or without firewall. Debian is installed in a VM without FW.
In a separate window:
We get no answer when pinging
10.0.0.2
. When adding the default gw to10.0.0.2
, we get an error:sudo route add default gw 10.0.0.2 metric 6 # SIOCADDRT: Network is unreachable
The text was updated successfully, but these errors were encountered: