Iptables ACCEPT and DROP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Friends:

I have observe a behavior of iptables which I need to understand.

216.155.193.168 is the IP address of Yahoo's messenger site and it
listens on port 5050.

The following command will allows the machine to connect to
216.155.193.168.

iptables -A OUTPUT -o eth0 -p tcp -d 216.155.193.168 --dport 5050 -j
ACCEPT

After that, I see output like following:

#telnet 216.155.193.168 5050
Trying 216.155.193.168...
Connected to 216.155.193.168.
Escape character is '^]'.

Now when I issue
iptables -A OUTPUT -o eth0 -p tcp -d 216.155.193.168 --dport 5050 -j
DROP And iptables -A OUTPUT -o eth0 -p tcp -d 216.155.193.168 --dport
5050 -j REJECT

Still, it allows connection to 216.155.193.168 on port 5050.

How does this work? It seems -j DROP is not opposite of -j ACCEPT. How
can stop this?

Kind regards.

Ravi Verma



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux