https://github.com/arogov-com/icmptunnel
IPv4 over ICMP tunnel
https://github.com/arogov-com/icmptunnel
encapsulation-protocol icmp-tunnel network-programming tunnel tunneling
Last synced: about 2 months ago
JSON representation
IPv4 over ICMP tunnel
- Host: GitHub
- URL: https://github.com/arogov-com/icmptunnel
- Owner: arogov-com
- Created: 2023-12-06T12:13:37.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-19T09:47:08.000Z (7 months ago)
- Last Synced: 2025-03-26T12:47:00.910Z (2 months ago)
- Topics: encapsulation-protocol, icmp-tunnel, network-programming, tunnel, tunneling
- Language: C
- Homepage:
- Size: 23.4 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# icmptunnel
IPv4 over ICMP echo### Build
make### Arguments
-s - run as server
-c - run as client
-i - outside interface
-a - assign address to tunnel interface
-z - compress packets with zlib
-r - enable ping reply
-d - enable debug prints. May be specified twice for full packet printing### Handled signals
SIGUSR1 - Print statistic to stdoutSIGUSR2 - Enable/increase debug level of running application
### Run server
Ignore replys for ICMP requests:`sudo echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all`
Add MASQUERADE rule to firewall. iface - output interface, network - tunnel network:
`sudo iptables -t nat -A POSTROUTING -s -o -j MASQUERADE`
Enable IP forwarding in kernel
`sudo echo 1 > /proc/sys/net/ipv4/ip_forward`
Run server
`sudo ./icmptunnel -s -i eth0 -a 10.20.30.1`
### Run client
`sudo ./icmptunnel -c -i eth0 -a 10.20.30.2`### Local test
The script will create 3 namespaces (client, gateway, server) and transfer traffic between the client's and server's namespaces`make test`