How to find out who is pinging me ?
Hi Geeks
I would like to know, How to find out Who is pinging/pinged my Linux System ? Please guide me to get answer for this question Thanks in advance Regards Bala.Linuxtech |
I used to use Netstat to find out: (Command is "netstat --inet6 -c -e -p -a")
Today all I do is to check my router's log. And OF COURSE I have a homemade linux router :) |
Hi,
Put a line like the below in /etc/sysconfig/iptables. Code:
-A INPUT -p icmp --icmp-type echo-request -j LOG --log-prefix "LOG_IPTABLES_PING_REQUEST: " If you cannot identify where, post back your /etc/sysconfig/iptables. Then later Code:
grep 'LOG_IPTABLES_PING_REQUEST: ' /var/log/messages |
Quote:
Thanks , it's interesting but i dont know where should i insert this line, This is my iptables file, pls guide me to get resolve this .. Thanks # Generated by iptables-save v1.3.5 on Thu Dec 27 23:24:41 2012 *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [15137:3829777] :RH-Firewall-1-INPUT - [0:0] -A INPUT -j RH-Firewall-1-INPUT -A INPUT -p icmp --icmp-type echo-request -j LOG --log-prefix "LOG_IPTABLES_PING_REQUEST: " -A FORWARD -j RH-Firewall-1-INPUT -A RH-Firewall-1-INPUT -i lo -j ACCEPT -A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type any -j ACCEPT -A RH-Firewall-1-INPUT -p esp -j ACCEPT -A RH-Firewall-1-INPUT -p ah -j ACCEPT -A RH-Firewall-1-INPUT -d 224.0.0.251 -p udp -m udp --dport 5353 -j ACCEPT -A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited COMMIT # Completed on Thu Dec 27 23:24:41 2012 |
Hi,
No problem, here we go. Code:
*filter Code:
service iptables restart To log and then to block (without any information sent back to the requester), you can add a line like the below after the logging line. Code:
-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type echo-request -j LOG --log-prefix "LOG_IPTABLES_PING_REQUEST: " |
All times are GMT -5. The time now is 03:23 PM. |