βICMP Tunneling
Root is needed in both systems to create tun adapters and tunnels data between them using ICMP echo requests.
You'll need two copies of icmptx-0.01.tar.gz; one copy for the server, one copy for the client.
Download and compile. For example:
Proxy-side icmptx setup
You'll need a machine connected to the Internet to serve as your proxy. Make sure the proxy's firewall does not block ICMP traffic. If you can't simply ping the machine, icmptx will surely not work. Also, make sure your kernel supports TUN devices.
After compilation, run the icmptx server as root (assuming the proxy's end of the tunnel is going to be 10.0.1.1):
Now verify you have a tun device:
Configure the tun device. Also, ensure the kernel doesn't intercept and reply to pings.
You need to enable forwarding on this server. I use iptables to implement masquerading. There are many HOWTOs about this (a simple one, for example). On Debian, the configuration file for iptables is in /var/lib/iptables/active. The relevant bit is:
Restart iptables:
and enable forwarding:
You can make sure this change (and the modification that disabled echo replies) are permanent by editing /etc/sysctl.conf, and adding:
Client-side icmptx setup
The client's kernel also needs to support TUN devices. Assuming your proxy's IP address is 212.25.23.52, run as root:
Now setup the tun device:
By running /sbin/route -n, figure out what your gateway is. It's the record with the "UG" Flags field. For example:
OK. So "192.168.1.1" is our gateway. Assuming your wireless network device is called "wlan0" (but it might well be "eth1", or whatever), run:
Obviously, 212.25.23.52 should be replaced with your proxy's IP address.
If all is well, you should have Internet connection now. All traffic will be tunnelled through your proxy, via ICMP.
Last updated