The application allows you to respond to ICMP requests exponentially, constantly increasing the timeout between requests by 2 times until it reaches 1048576 msecs (17 minutes).
Just go mod tidy && go build .
Run commands from root:
- Disable icmp reply from kernel:
echo 1 | tee /proc/sys/net/ipv4/icmp_echo_ignore_all
- Allow using raw sockets:
echo 1 | tee /proc/sys/net/ipv4/ping_group_range
- Allow rules in iptables:
iptables -I OUTPUT -p icmp --icmp-type echo-reply -j ACCEPT iptables -I OUTPUT -p icmp --icmp-type echo-reply -j ACCEPT
- Allow run binary from regular user:
setcap cap_net_raw+ep icmp_exp
- Put binary to
/usr/local/bin/
- Create
/etc/systemd/system/icmp_exp.service
- Put everything from icmp_exp.service
- Change User/Group
- Reload:
systemctl daemon-reload
- Run and enable autostart:
systemctl start icmp_exp; systemctl enable icmp_exp