Giter VIP home page Giter VIP logo

Comments (5)

ambrop72 avatar ambrop72 commented on August 17, 2024

It should run just fine. What issue are you facing?

from badvpn.

4-FLOSS-Free-Libre-Open-Source-Software avatar 4-FLOSS-Free-Libre-Open-Source-Software commented on August 17, 2024

from badvpn.

juanpagfe avatar juanpagfe commented on August 17, 2024

I can't ping my 10.0.0.2. I have checked almost everything. This are the commands I am running:

sudo ip tuntap add mode tun
sudo ip address add 10.0.0.1/24 dev tun0
sudo ip link set dev tun0 up

And then

tun2socks --loglevel debug --tundev tun0 --netif-ipaddr 10.0.0.2 --netif-netmask 255.255.255.0 --socks-server-addr 127.0.0.1:5566

When I run ping 10.0.0.1 it works fine, though when i run ping 10.0.0.2 I get no results at all. This is the log of tun2socks running while I ping 10.0.0.2:

sudo tun2socks --loglevel debug --tundev tun0 --netif-ipaddr 10.0.0.2 --netif-netmask 255.255.255.0 --socks-server-addr 127.0.0.1:5566
NOTICE(tun2socks): initializing BadVPN tun2socks 1.999.130
DEBUG(BReactor): Reactor initializing
DEBUG(BSignal): BSignal initializing
NOTICE(tun2socks): entering event loop
DEBUG(BReactor): Entering event loop
DEBUG(tun2socks): lwip init
DEBUG(tun2socks): netif func init
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait returned 1 file descriptors
DEBUG(BReactor): Dispatching file descriptor
DEBUG(tun2socks): device: received packet
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait returned 1 file descriptors
DEBUG(BReactor): Dispatching file descriptor
DEBUG(tun2socks): device: received packet
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait returned 1 file descriptors
DEBUG(BReactor): Dispatching file descriptor
DEBUG(tun2socks): device: received packet
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait returned 1 file descriptors
DEBUG(BReactor): Dispatching file descriptor
DEBUG(tun2socks): device: received packet
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait returned 1 file descriptors
DEBUG(BReactor): Dispatching file descriptor
DEBUG(tun2socks): device: received packet
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait returned 1 file descriptors
DEBUG(BReactor): Dispatching file descriptor
DEBUG(tun2socks): device: received packet
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
DEBUG(BReactor): epoll_wait timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): Calling epoll_wait
^CDEBUG(BReactor): epoll_wait returned 1 file descriptors
DEBUG(BReactor): Dispatching file descriptor
DEBUG(BUnixSignal): dispatching signal 2
DEBUG(BSignal): Dispatching signal
NOTICE(tun2socks): termination requested
NOTICE(tun2socks): tearing down
DEBUG(BReactor): Exiting event loop, exit code 1
DEBUG(BReactor): Reactor freeing
NOTICE(tun2socks): exiting

This have happened on Raspbian and CentOS.

from badvpn.

juanpagfe avatar juanpagfe commented on August 17, 2024

The status of my tun0:

5: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 500
link/none
inet 10.0.0.1/24 scope global tun0
valid_lft forever preferred_lft forever
inet6 fe80::db85:39cf:9ace:5bd8/64 scope link stable-privacy
valid_lft forever preferred_lft forever

And the net.ipv4.conf.tun0:

net.ipv4.conf.tun0.accept_local = 0
net.ipv4.conf.tun0.accept_redirects = 1
net.ipv4.conf.tun0.accept_source_route = 1
net.ipv4.conf.tun0.arp_accept = 0
net.ipv4.conf.tun0.arp_announce = 0
net.ipv4.conf.tun0.arp_filter = 0
net.ipv4.conf.tun0.arp_ignore = 0
net.ipv4.conf.tun0.arp_notify = 0
net.ipv4.conf.tun0.bc_forwarding = 0
net.ipv4.conf.tun0.bootp_relay = 0
net.ipv4.conf.tun0.disable_policy = 0
net.ipv4.conf.tun0.disable_xfrm = 0
net.ipv4.conf.tun0.drop_gratuitous_arp = 0
net.ipv4.conf.tun0.drop_unicast_in_l2_multicast = 0
net.ipv4.conf.tun0.force_igmp_version = 0
net.ipv4.conf.tun0.forwarding = 1
net.ipv4.conf.tun0.igmpv2_unsolicited_report_interval = 10000
net.ipv4.conf.tun0.igmpv3_unsolicited_report_interval = 1000
net.ipv4.conf.tun0.ignore_routes_with_linkdown = 0
net.ipv4.conf.tun0.log_martians = 0
net.ipv4.conf.tun0.mc_forwarding = 0
net.ipv4.conf.tun0.medium_id = 0
net.ipv4.conf.tun0.promote_secondaries = 0
net.ipv4.conf.tun0.proxy_arp = 0
net.ipv4.conf.tun0.proxy_arp_pvlan = 0
net.ipv4.conf.tun0.route_localnet = 0
net.ipv4.conf.tun0.rp_filter = 0
net.ipv4.conf.tun0.secure_redirects = 1
net.ipv4.conf.tun0.send_redirects = 1
net.ipv4.conf.tun0.shared_media = 1
net.ipv4.conf.tun0.src_valid_mark = 0
net.ipv4.conf.tun0.tag = 0

from badvpn.

juanpagfe avatar juanpagfe commented on August 17, 2024

Sorry guys. My bad. I was wrongly compiling tun2socks. The byte order I chose was wrong.

from badvpn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.