From: Alexandros Papadopoulos <apapadop@cmu.edu>
To: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: netfilter@lists.netfilter.org
Subject: Re: non-standard FTP ports and connection tracking (redux)
Date: Tue, 10 Dec 2002 03:12:13 -0500 [thread overview]
Message-ID: <200212100312.13403.apapadop@cmu.edu> (raw)
In-Reply-To: <Pine.LNX.4.33.0212100849050.9625-100000@blackhole.kfki.hu>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday 10 December 2002 02:52, Jozsef Kadlecsik wrote:
> On Mon, 9 Dec 2002, Alexandros Papadopoulos wrote:
> > /sbin/iptables -P OUTPUT DROP
> >
> > #####################
> > #### CHAIN INPUT ####
> > #####################
> >
> > ## Accept everything incoming on loopback interface
> > /sbin/iptables -A INPUT -s 127.0.0.1 -d 127.0.0.1 -i lo -j ACCEPT
> >
> > ## Accept all incoming traffic from related or established
> > connections /sbin/iptables -A INPUT -m state --state
> > ESTABLISHED,RELATED -j ACCEPT
> >
> > ## Allow connections to our ftp server
> > /sbin/iptables -A INPUT -p tcp --dport 2121 -j ACCEPT
> >
> > ..but still, the packets with the SYN flag set when the client
> > tries to establish the new data connection are dropped. Someone
> > please tell me what am I missing? I'm sure it's something obvious
> > but I can't seem to find it!
>
> What about the rules in the OUTPUT chain?
Oops, I'm sorry. I actually tested with a default ACCEPT policy in the
output chain to rule problems from there out, but forgot to mention it.
In any case, the relevant rules from the output chain are:
## Allow outgoing FTP (data) + HTTP replies
/sbin/iptables -A OUTPUT -p tcp --sport 1024: --dport 1024: -m state
- --state ESTABLISHED,RELATED -j ACCEPT
## Allow data for incoming FTP to return back to sender
/sbin/iptables -A OUTPUT -p tcp --sport 2121 --dport 1024: -m state
- --state ESTABLISHED,RELATED -j ACCEPT
I'd bet that the problem is that the SYN request sent from the client to
my server gets dropped, though. Seems like a conntrack/INPUT thing.
Thanks
- -A
- --
http://andrew.cmu.edu/~apapadop/pub_key.asc
3DAD 8435 DB52 F17B 640F D78C 8260 0CC1 0B75 8265
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE99aHdgmAMwQt1gmURApc8AJ4rhcf4LzELDQ399VEuunF8VBnWYwCcDNlN
oY6E1VBYAM/mHufJen5YrDk=
=xJ8w
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2002-12-10 8:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-09 22:01 non-standard FTP ports and connection tracking Kim Leandersson
2002-12-09 23:05 ` Alexandros Papadopoulos
2002-12-10 2:46 ` non-standard FTP ports and connection tracking (redux) Alexandros Papadopoulos
2002-12-10 7:52 ` Jozsef Kadlecsik
2002-12-10 8:12 ` Alexandros Papadopoulos [this message]
2002-12-10 8:46 ` Jozsef Kadlecsik
2002-12-10 16:18 ` Alexandros Papadopoulos
2002-12-12 9:16 ` Jozsef Kadlecsik
2002-12-13 6:09 ` Joel Newkirk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200212100312.13403.apapadop@cmu.edu \
--to=apapadop@cmu.edu \
--cc=kadlec@blackhole.kfki.hu \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox