Iptables on ubuntu Ubuntu 10.04.1 not working
Posted
by
Kevin
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Kevin
Published on 2013-07-01T08:48:44Z
Indexed on
2013/07/01
10:29 UTC
Read the original article
Hit count: 365
I am trying to block an IP address from accessing my server by using iptables, but didn't succeed.
Here are the commands that I used. (after these commands, I still keep seeing 50.18.12.86 sending request to my Apache server).
sudo iptables -F
sudo iptables -I OUTPUT -s 50.18.12.86 -j REJECT
sudo iptables -I INPUT -s 50.18.12.86 -j REJECT
sudo iptables -L -n
Chain INPUT (policy ACCEPT)
target prot opt source destination
REJECT all -- 50.18.12.86 0.0.0.0/0 reject-with icmp-port-unreachable
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
REJECT all -- 50.18.12.86 0.0.0.0/0 reject-with icmp-port-unreachable
I have tried DROP instead of REJECT, but doesn't help.
© Ask Ubuntu or respective owner