Linux - Security This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-01-2005, 09:08 PM
|
#1
|
Member
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438
Rep:
|
FTP server stuck in passive with iptables running.
Hello.
I have a (gentoo) server that runs samba and pureftp. It runs fine when I have iptables stopped. However when I start iptables the FTP only connects in passive mode, so it won't list files or folders etc.
As soon as I turn iptables off it works fine.
Would anyone know what chain I would need to add into iptables to allow this to work properly? Below is what I used to allow ftp through my firewall...
iptables -A INPUT -i eth0 -p tcp -m multiport --dport 20,21 -j ACCEPT
iptables -A INPUT -i eth0 -p udp -m multiport --dport 20,21 -j ACCEPT
Can anyone see what I have done wrong? Thanks alot.
Best Regards,
Craig
|
|
|
02-04-2005, 08:50 AM
|
#2
|
Member
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549
Rep:
|
active ftp works on port 21 and 20, passive ftp starts on port 21 but jumps after logging in to a port above the 1024.
So if you want your passive ftp to work when your firewall is up, you will need to use a connection tracking module. On redhat the name of the module is ip_conntrack_ftp
|
|
|
02-17-2005, 06:46 PM
|
#3
|
Member
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438
Original Poster
Rep:
|
Hi pk.
Thanks for the info. Sorry for not replying, I haven't been getting email alerts from linuxquestions.org for some reason.
Where can I find ip_conntrack_ftp? Is this a file I can edit etc? I don't quite understand.
I would love to get this working properly.
Thanks again.
Regs
Craig
|
|
|
02-18-2005, 05:05 AM
|
#4
|
Member
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549
Rep:
|
try the command "lsmod" to see if it is already running, if not then type "modprobe ip_conntrack_ftp".
|
|
|
02-18-2005, 05:06 AM
|
#5
|
Member
Registered: Jun 2002
Location: Netherlands - Amsterdam
Distribution: RedHat 9
Posts: 549
Rep:
|
(this is how it works on redhat/fedora, maybe gentoo works the same?)
|
|
|
02-24-2005, 04:57 PM
|
#6
|
Member
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438
Original Poster
Rep:
|
works a treat.!!!! thanks PK 
|
|
|
All times are GMT -5. The time now is 02:39 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|