I am trying to block one IP with iptables in my Ubuntu server 12.04.
The foreign IP is 117.16.18.95.dyna. You can take a look at the next image:
I have added this ip to iptables with the next command:
sudo iptables -A INPUT -s 117.16.18.95 -p tcp -j DROP
sudo service iptables-persistent save
sudo service iptables-persistent restart
However, when i run again the command netstat -tap
, this IP is not blocked.
How can I remove/block/delete this IP from my Ubuntu server?
code
" rather than posting screenshots. That improves readability, attracts better answers and allows indexing by search engines, which may help people with similar questions.-p
option tonetstat
to actually work, you must run it withsudo
.