I ported Ping­Tun­nel to Win­dows, using Cyg­win and added some minor changes:

v0.62 — 16. Oct 2007
– Com­piled with Cyg­win — added win­dows sup­port
– Updated to Win­pcap v4.01
– added time­out value (-t), fine­tune your connection

Down­load Ping­Tun­nel v0.62 for Win­dows here (includ­ing source).

What is ptun­nel?
Ptun­nel is an appli­ca­tion that allows you to reli­ably tun­nel TCP con­nec­tions
to a remote host using ICMP echo request and reply pack­ets, com­monly known as
ping requests and replies.

A sim­ple exam­ple how to use ptunnel:

SERVER1 — start server:

1
2
3
4
5
6
7
8
9
10
11
12
c:>ptunnel –v 4 –c “DeviceNPF_{EED408B…}“
[inf]: Enable pcap Mode using device: DeviceNPF_{EED408B…}
[inf]: Start­ing ptun­nel v 0.62.
[inf]: © 2004–2005 Daniel Stoe­dle, daniels@cs.uit.no Win­dows Port by michu / www.neophob.com
[inf]: HINT: start ptun­nel with “-h” para­me­ter to view help and Win­dows Win­Pcap devices
[inf]: For­ward­ing incom­ing ping pack­ets over TCP.
[dbg]: Start­ing ping proxy..
[dbg]: Cre­at­ing icmp data­gram socket..
[inf]: Ini­tial­iz­ing pcap.
[vbs]: Net­work: 138.191.41.0
[vbs]: Net­mask: 255.255.255.0
[inf]: Ping proxy is lis­ten­ing in priv­i­leged mode.

Info: Use the –c option (enable Win­Pcap on the given device) else the proxy will NOT work!
For Win­dows use the –h option (ptunnel.exe –h) to view all Win­dows Win­Pcap Devices.
Win­dows exam­ple 1 — Web Proxy:
CLIENT1 -  start ptun­nel client:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
C:>ptunnel –p <SERVER1> –lp 8000 –da <WEB-PROXY> –dp <PORT> –v 4
[inf]: Start­ing ptun­nel v 0.62.
[inf]: © 2004–2005 Daniel Stoe­dle, daniels@cs.uit.no Win­dows Port by michu / www.neophob.com
[inf]: HINT: start ptun­nel with “-h” para­me­ter to view help and Win­dows Win­Pcap devices
[inf]: Relay­ing pack­ets from incom­ing TCP streams.
[dbg]: Start­ing for­warder..
[vbs]: Proxy IP address: 138.191.41.18
[inf]: Incom­ing con­nec­tion.
[evt]: No run­ning proxy thread — start­ing it.
[dbg]: Adding proxy desc to run loop. Type is user. Will cre­ate socket: No
[dbg]: Start­ing ping proxy..
[dbg]: Cre­at­ing icmp data­gram socket..
[inf]: Ini­tial­iz­ing pcap.
[vbs]: Net­work: 10.226.64.0
[vbs]: Net­mask: 255.255.255.0
[inf]: Ping proxy is lis­ten­ing in priv­i­leged mode.

Info: WEB-PROXY is your web proxy server
Now point your browsers proxy set­tings to local­host 8000 and load a web site.

Win­dows exam­ple 2 — SSH:
CLIENT1 -  start ptun­nel client:

1
2
3
4
5
6
7
$ ./ptunnel –p <SERVER1> –lp 8000 –da 127.0.0.1 –dp 22 –v 5
[inf]: Start­ing ptun­nel v 0.62.
[inf]: © 2004–2005 Daniel Stoe­dle, daniels@cs.uit.no Win­dows Port by michu / www.neophob.com
[inf]: HINT: start ptun­nel with “-h” para­me­ter to view help and Win­dows Win­Pcap devices
[inf]: Relay­ing pack­ets from incom­ing TCP streams.
[dbg]: Start­ing for­warder..
[vbs]: Proxy IP address: 138.191.41.18

Start PuTTY and con­nect to 127.0.0.1:8000…


Some addi­tional information:

Time­out value (read time­out), default is 50ms, but you can change this set­ting via the “-t” option. Here is a small bench­mark (100MB LAN) for SFTP file copy:

1
2
3
4
5
6
7
8
 Time­out value | down | up   |
|————–+——+——+
|1             | 62   | 75   |
|20            | 30   | 41   |
|50            | 20   | 15   |
|200           | 4    | 6    |
|————–+——+——+
                kb/S kb/s

Pass­word: this option DOES NOT WORK! I don’t know why, but an easy workaround is: use SSH.