My os :centos 7. yum remove firewalld I want to log all the ping from 111.1111.111.111 into iptables.log.
cat /etc/rsyslog.conf kern.* /var/log/iptables.log
systemctl restart rsyslog
iptables -N LOGGING iptables -A INPUT -j LOGGING iptables -A INPUT -p icmp --icmp-type 8 --source 111.111.111.111 -j LOG iptables -A INPUT -p icmp --icmp-type 8 --source 111.111.111.111 -j DROP service iptables save service iptables restart
Now to ping from 111.111.111.111 to my vps.
2.iptables -A INPUT -p icmp --icmp-type 8 --source 111.111.111.111 -j LOG can’t work
cat /var/log/iptables.log
Nothing in it.
Click below to sign up and get $100 of credit to try our products over 60 days!