Internet via ICMP

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

    image

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

    Software


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

    Installation and setup


    We look in the repositories / collect hans on both computers ourselves.
    On the server, run:

    echo 1 | sudo tee /proc/sys/net/ipv4/icmp_echo_ignore_all
    sudo hans -s 192.168.x.x -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 with hans running, and PASSWORD is the password.

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

    sudo sysctl -w net.ipv4.ip_forward=1
    sudo iptables -t nat -I POSTROUTING -s 192.168.x.x -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.x.x

    That's all! Thus, most likely, you can bypass the monthly traffic restriction or even the speed limit (but here it’s how lucky). The screenshot above shows the real speed that my tunnel is currently providing.

    Also popular now: