For anyone interested in clever networking hacks, I strongly advise checking out ptunnel. This software package allows you to tunnel any TCP (such as SSH) over a ICMP (i.e., ping). Since even the most restrictive firewalls (whether corporate, Wifi (don’t steal…) or other) usually let ICMP traffic through, this little piece of code can let you access anything you want.
The latest formal release is 0.61, but there’s no formal Windows version available. There are two ports of 0.52, but they don’t support the authentication found in the newer versions. If you want to run this on a public server, you’ll almost definitely want to be using the authentication.
The pingtunnel-win32.diff file can be applied to create a version that compiles for Windows. It relies on the WinPCap library (I tested with 4.0.2; just unzip into c:\Program Files\), and MinGW. After applying the patch, instead of running make, run “mingw32-make ptunnel.exe”.
This second diff file, pingtunnel-syslog.diff, can be applied to add syslog support. If you want to run this as a daemon, you’ll probably want syslog support so that you can see the output.
I’ve sent these patches to the author; hopefully they’ll make it into 0.62!
9 responses to “PingTunnel Improvements: Win32 & Syslog”
hi – I’m interested in ptunnel for win32. in windows xp I’ve installed mingw in C:\MINGW and winpcap in C\Programme\WINPCAP. ‘pingtunnel-win32.diff’ and ‘ptunnel.exe’ are located in C:\. I’ve run ‘mingw32-make ptunnel.exe’ … don’t know what the effect of this is.
now, what have I to do further in order to get get ptunnel running? please, can you give me some step-by-step help for the remaining operations? I’ve a linksys router WRT54G, managing a home net with 2 laptops.
thank you very much in advance – dirk
MinGW is a compiler; it’s meant to be used on source code files (.c, .h, etc). pingtunnel-win32.diff is a patch, which contains my changes to the 0.61 release of PingTunnel in order to make it windows compliant.
If you already have ptunnel.exe, that’s all you’ll need.
Instructions for use are available on http://www.cs.uit.no/~daniels/PingTunnel/
Mike do u have new release patc for the last pingtunnel version ??
My patches were merged into the official pingtunnel as of 0.7.0.
i mean the version with new stuffs like -daemon option, and when i try to compile 0.72 source with mingw i have problems …this errors
ptunnel.c: In function ‘main’:
ptunnel.c:363:7: error: redeclaration of ‘wVersionRequested’ with no linkage
ptunnel.c:129:7: note: previous declaration of ‘wVersionRequested’ was here
ptunnel.c:364:10: error: redeclaration of ‘wsaData’ with no linkage
ptunnel.c:130:10: note: previous declaration of ‘wsaData’ was here
ptunnel.c:365:6: error: redeclaration of ‘err’ with no linkage
ptunnel.c:131:6: note: previous declaration of ‘err’ was here
I don’t know; I no longer use ptunnel. I suggest you contact the owner. Sorry.
well tnks
For compiling PingTunnel 0.72, just edit ptunnel.c, and comment from line 129 to line 145.
Wrong lines to comment out.
Comment out 362 to 379 instead of 129 to 145. Or else gethostbyname won’t work as:
“A successful WSAStartup call must occur before using this function.”
https://msdn.microsoft.com/en-us/library/windows/desktop/ms738524(v=vs.85).aspx