ptunnel
ptunnel tunnels TCP connections over ICMP echo request and reply packets, acting as a proxy to handle sockets and secured identification. It is useful in closed networking environments with firewalls and proxies.
Description
ptunnel is an application that allows reliable tunneling of TCP connections to a remote host using ICMP echo request and reply packets, commonly known as ping requests and replies. It operates as a proxy and can handle sockets and secured identification, making it handy for environments restricted by firewalls and proxies.
The tool supports both proxy and forwarding modes, with features for security such as password authentication, privilege dropping, and chroot restrictions. It can also toggle to UDP instead of ICMP, listening on port 53 when root privileges are available.
ptunnel requires root privileges for full functionality but offers unprivileged mode with limitations. It is particularly effective for bypassing network restrictions where ICMP traffic is permitted.
How It Works
ptunnel encapsulates TCP connections within ICMP echo request and reply packets to tunnel traffic to a remote host. In forwarding mode (with -p), it listens on a TCP port and forwards packets; without -p, it operates in proxy mode connecting to a remote destination. It supports custom echo replies in privileged mode for reliability, with security via password matching (-x), privilege dropping (-setuid, -setgid), chroot (-chroot), and optional UDP encapsulation on port 53.
Installation
sudo apt install ptunnelFlags
Examples
ptunnel -hptunnelptunnel -p proxy.pingtunnel.com -lp 8000 -da login.domain.com -dp 22 -c eth0ssh -p 8000 localhostptunnel -daemon /var/run/ptunnel.pidptunnel -udpptunnel -x password -setuid nobody -chroot /var/empty