PingTunnel Improvements: Win32 & Syslog


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”

  1. 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

  2. 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

Leave a Reply

Your email address will not be published. Required fields are marked *