Comments (5)
It should run just fine. What issue are you facing?
from badvpn.
from badvpn.
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.
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.
Sorry guys. My bad. I was wrongly compiling tun2socks. The byte order I chose was wrong.
from badvpn.
Related Issues (20)
- confused me:why use an empty job for sync in listener_accept_func HOT 4
- socks5 udp doesn't work with IPv6 HOT 1
- why not using boost::asio
- 请问tun2socks透明代理udp该怎么做? HOT 2
- Forks
- Linux Router
- move_first_timers crash HOT 1
- BadVPN not Working Properly
- ERROR(udpgw): BConnection_Init failed HOT 8
- BADVPN ERROR
- out of UDP buffer
- Virtual netword adapter tap 9 via tun2socks. Need instruction HOT 4
- tun2socks и proxy ipv6
- Assertion failed in BReactor_badvpn.c
- How does the UdpGw daemon work? HOT 2
- tun2socks not support half-closing
- tun2socks on freebsd
- nss/ssl.h not found HOT 1
- 能否在Wiki中写一下tun2socks组件转发的UDP包结构? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from badvpn.