Prerequisites
ptunnel-ng built on attack and/or pivot host.
Clone Repository
git clone https://github.com/utoni/ptunnel-ng.git
Build
sudo apt install automake autoconf -y
cd ptunnel-ng
sed -i '$s/.*/LDFLAGS=-static "${NEW_WD}\/configure" --enable-static $@ \&\& make clean \&\& make -j${BUILDJOBS:-4} all/' autogen.sh
sudo ./autogen.sh
Start PTunnel-ng Server
sudo ./ptunnel-ng -r10.129.202.64 -R22
-r10.129.202.64 – remote host.
-R22 – remote port (e.g., SSH on 22).
Connect via Local Listener
sudo ./ptunnel-ng -p10.129.202.64 -l2222 -r10.129.202.64 -R22
-p10.129.202.64 – ping host (ICMP).
-l2222 – local listen port.
- Result: you can SSH to
localhost:2222, tunneled over ICMP.