c0nn3ct / badvpn

Automatically exported from code.google.com/p/badvpn
Other
0 stars 0 forks source link

tun2socks on Win7 doesn't work #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, I'm Ezio, and I've a problem with tun2socks. I've tryed different 
configurations and the tun2socks always stuck with this debug message:

-----
C:\Utils\badvpn-win32\bin>badvpn-tun2socks.exe --tundev 
"tap0901:tap:10.0.0.1:10.0.0.0:255.255.255.0" --netif-ipaddr 10.0.0.2 
--netif-netmask 255.255.255.0 --socks-server-addr 192.168.33.252:1080 
--loglevel 5
NOTICE(tun2socks): initializing BadVPN tun2socks 1.999.111
DEBUG(BReactor): Reactor initializing
DEBUG(BSignal): BSignal initializing
INFO(BTap): Looking for TAP-Win32 with component ID tap0901, name tap
INFO(BTap): Opening device \\.\Global\{BCDB3D4A-FF30-4C40-B02D-9149E9A68B5D}.tap

INFO(BTap): Device opened
NOTICE(tun2socks): entering event loop
DEBUG(BReactor): Entering event loop
DEBUG(tun2socks): lwip init
DEBUG(tun2socks): netif func init
DEBUG(BReactor): GetQueuedCompletionStatus timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): GetQueuedCompletionStatus timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
DEBUG(BReactor): GetQueuedCompletionStatus timed out
DEBUG(BReactor): Dispatching timer
DEBUG(tun2socks): TCP timer
... and so on
-----

The Os that I've used is a Windows 7 Professional 64bit SP0 with UAC enabled. 
I've tryed to change this variables when I've tryed to get tun2socks work, on 
every combination:
- I've launched the tun2socks from administrative shell and from the user's one.
- I've used the OpenVPN tap device (that on my system is called "OpenVPN") and 
a new tap device created from "OpenVPN/Utility/Add a new TAP virtual ethernet 
adapter", called "tap"
- I've used the suggested network for tap device (10.0.0.0) and another private 
network (the one that I want to use: 192.168.254.0)
- I've used a "lan" socks5 proxy (192.168.33.252:1080) and a local ssh socks5 
proxy (127.0.0.1:1080)

tun2socks stucks with the message reported before, and the tap device specified 
is shown in connection manager as connected, but without ip address, mask and 
gw. The packets count is also 0 for in and 0 for out.

bye,
Ezio

Original issue reported on code.google.com by ezio.bo...@gmail.com on 21 Mar 2012 at 8:59

GoogleCodeExporter commented 8 years ago
It appears that tun2socks is not receiving any packets from the operating 
system. Have you followed tun2socks my guide on the wiki? It explicitly says 
that you have to assign the right IP address to the TUN device yourself 
(10.0.0.1 netmask 255.255.255.0 for the command line you posted), and it does 
not appear you did so. You also set up the routes properly.

Please try the guide first and report problems after you're sure you did 
exactly what it says.

Original comment by ambr...@gmail.com on 21 Mar 2012 at 9:28

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
maskeye, in your case too the OS is not sending any packets into the Local 
interface. You have to adjust the routing table properly. Either add the 
route(s) you want manually, via the gateway 10.0.0.2, or configure it as a 
default gateway in the IP configuration dialog for the Local interface. Anyway, 
it would help if you provided your routing table (route print) and IP 
configurations of both interfaces (write down or screenshot).

Original comment by ambr...@gmail.com on 19 May 2012 at 12:11

GoogleCodeExporter commented 8 years ago
maskeye, it's likely that your metrics are incorrect and that the OS is still 
using the default gateway of "Local Area Connection". There are multiple ways 
to achieve the desired routing; one is by forcing the new tun2socks route to 
have a lower metric than the existing "Local Area Connection" route.

Original comment by ambr...@gmail.com on 19 May 2012 at 12:13

GoogleCodeExporter commented 8 years ago
Alternatively, you can remove the default gateway from "Local Area Connection" 
and only have the tun2socks route. However this is inconvenient when you want 
to not use tun2socks.

Original comment by ambr...@gmail.com on 19 May 2012 at 12:15

GoogleCodeExporter commented 8 years ago
It works great on my computer. I can share my ssh internet connection trough 
wifi hotspot with this tiny tools. Just a little tricks and we can enjoy shared 
ssh internet connection. Haturnuhuun mas bro..o

Original comment by ay1...@gmail.com on 9 Sep 2013 at 5:13