I have a log file like this :
Frq:15 IP:0.0.0.0 Date: 2014-03-21 12:19:31 AM
Frq:9 IP:198.252.206.25 Date: 2014-03-21 12:19:31 AM
Now i get column of ip addresses with awk :
cat /tmp/test | awk '{print $2}'|awk '{gsub("IP:", "");print}'
And the result is :
0.0.0.0
198.252.206.25
I want add this ip addresses into iptables to be DROP from INPUT but i dont know how
Thanks friends.