In this article I will show that how can you block ICMP ping request
We will use to two system for this practical. Go on first Linux system and set IP address to 192.168.0.254
Apply new IP by service network restart command and verify it ifconfig
Now go other machine and set IP address to 192.168.0.1 (I am using window machine for testing you can use your Linux machine for it also.)
verify new ip by ipconfig

Test connectivity with server by ping commands
You will get reply because all Linux servers are by default configured to response on ICMP ping request.
Now go back on Linux server and configure it to deny ping request.Test connectivity with server by ping commands
You will get reply because all Linux servers are by default configured to response on ICMP ping request.
We need to add deny tag in sysctl.conf file open /etc/sysctl.conf file
Now add net.ipv4.icmp_echo_ignore_all = 1 line in the end of file and save this file
Change will take place after restart, reboot system with reboot -f commands
Now try to ping form other system again you will not get replay now
Now other system cannot ping the Linux server but Linux server can ping ohter system as so far our other system have no such service configured. Go on Linux server and pingother system
No comments:
Post a Comment