All of lore.kernel.org
 help / color / mirror / Atom feed
* Iptables ACCEPT and DROP
@ 2004-04-16 17:43 Ravi Verma
  2004-04-17 10:37 ` IT Clown
  0 siblings, 1 reply; 4+ messages in thread
From: Ravi Verma @ 2004-04-16 17:43 UTC (permalink / raw)
  To: netfilter

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



^ permalink raw reply	[flat|nested] 4+ messages in thread
* Iptables ACCEPT and DROP
@ 2004-04-16 17:56 Ravi Verma
  2004-04-16 18:08 ` Antony Stone
  0 siblings, 1 reply; 4+ messages in thread
From: Ravi Verma @ 2004-04-16 17:56 UTC (permalink / raw)
  To: netfilter

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-04-17 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-16 17:43 Iptables ACCEPT and DROP Ravi Verma
2004-04-17 10:37 ` IT Clown
  -- strict thread matches above, loose matches on Subject: below --
2004-04-16 17:56 Ravi Verma
2004-04-16 18:08 ` Antony Stone

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.