📜 ⬆️ ⬇️

Internet via ICMP

Hello! You forgot to pay for the Internet, the provider blocked TCP and UDP, and forgot about ICMP, and any resource is pinged? Then this topic is for you!

image

It is assumed that you have a VPS or Dedicated or something else under linux from tun and the computer from which you want to connect, under linux.

Soft


At first I used ptunnel and the tunnel almost did not work, I thought it should be that way, it's icmp, but then I tried hanstunnel and was very happy.
')

Installation and Setup


We search in repositories / build hans on both computers by ourselves
On the server, run:

echo 1 | sudo tee /proc/sys/net/ipv4/icmp_echo_ignore_all sudo hans -s 192.168.xx -p PASSWORD 

where 192.168.xx is the range of IP addresses, and PASSWORD is the password.

On the client:

 sudo hans -c SERV_IP_ADDR -p PASSWORD 

where SERV_IP_ADDR is the address running hans, and PASSWORD is the password.

So, hans is running on both computers, ip is received, what to do next? Further, on the server we execute:

 sudo sysctl -w net.ipv4.ip_forward=1 sudo iptables -t nat -I POSTROUTING -s 192.168.xx -j MASQUERADE 

On the client:

 sudo ip route add SERV_IP_ADDR via $(ip route | grep default | awk '{print $3}') sudo ip route del default sudo ip route add default via 192.168.xx 

That's all! Thus, most likely, you can bypass the monthly traffic limit or even the speed limit (but then how lucky). The screenshot above shows the actual speed that my tunnel currently provides.

Source: https://habr.com/ru/post/131800/


All Articles