Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I already have an ftpd running on port 20/21/Unpriv on a linuxbox1 connected directly to the internet..
However I want to port forward 1574 to another ftpd which is serving ftp on port 1574 within an internal LAN on box2.
If the default ftp ports are 20/21 what ports do i forward instead of 20/21.. I know i have to forward 1574 but what other port do i need to forward to make up for port 20?? and the unpriv ports??
IIRC the ftp data port always is one below the control connection, like you ve shown in your example. This example (as far as I can see) won't cut out $UNPRIVPORTS as it's first-match-wins in netfilter/iptables, and this one only matches $UNPRIVPORTS ACCEPT's for this address.
/* Kinda IIRC, cuz Raz left so we can't ask him, I still need to convert to netfilter/iptables... */
so if i used 800 as control connection then the data transfer port will be 799.
as for unpriv ports, even if i FORWARD unpriv ports, it won't interfere with the INPUT unpriv ports because it is specifically filtering packets that has its destination to 10.0.0.2..
Originally posted by FunkFlex so if i used 800 as control connection then the data transfer port will be 799.
AFAIK, yes.
as for unpriv ports, even if i FORWARD unpriv ports, it won't interfere with the INPUT unpriv ports because it is specifically filtering packets that has its destination to 10.0.0.2[/QUOTE]
Guesso, to me it kinda reads like: "lemme FORWARD from TCP WHERE source is UNPRIVPORTS AND destination is 10.0.0.2 1574" :-]
If unsure I always tack on logging rules for *everything* dropped and accepted, so you'll see soon enough what fails where.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.