iptables-nat-ftp question

This is a discussion on iptables-nat-ftp question within the Linux Security forums, part of the System Security and Security Related category; Hey all, I have enabled ip_conntrack_ftp and ip_nat_ftp modules, i am using masquerading on my firewall and have forwarding open ...


Go Back   Usenet Forums > System Security and Security Related > Linux Security

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2004
Chris Etzel
 
Posts: n/a
Default iptables-nat-ftp question

Hey all,

I have enabled ip_conntrack_ftp and ip_nat_ftp modules, i am using
masquerading on my firewall and have forwarding open both ways but cannot
get connected to certain passive FTP hosts.

I have >1024 open (with exceptions for common bad ports) and ports 20,21
open.

When I run ls it hangs -> below is output:

230 User logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
500 'EPSV': command not understood.
227 Entering Passive Mode (216,37,65,60,12,236)
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls (1214 bytes).

END OUTPUT

Does anyone know the workaround for this in iptables ?

Thanks,


Chris
Reply With Quote
  #2 (permalink)  
Old 04-21-2004
Chris Etzel
 
Posts: n/a
Default Re: iptables-nat-ftp question

On Tue, 20 Apr 2004 20:39:07 +0000, Brad Olin wrote:

> On Tue, 20 Apr 2004 13:53:21 -0700, Chris Etzel
> <hellno@idontwantspam.com> wrote:
>
>>Hey all,
>>
>>I have enabled ip_conntrack_ftp and ip_nat_ftp modules, i am using
>>masquerading on my firewall and have forwarding open both ways but cannot
>>get connected to certain passive FTP hosts.
>>
>>I have >1024 open (with exceptions for common bad ports) and ports 20,21
>>open.
>>
>>When I run ls it hangs -> below is output:
>>
>>230 User logged in.

Thank you Brad. You were correct. That particular server uses active mode.

Thanks a bunch.


Chris


>>Remote system type is UNIX.
>>Using binary mode to transfer files.
>>ftp> ls
>>500 'EPSV': command not understood.
>>227 Entering Passive Mode (216,37,65,60,12,236)
>>200 PORT command successful.
>>150 Opening ASCII mode data connection for /bin/ls (1214 bytes).
>>
>>END OUTPUT
>>
>>Does anyone know the workaround for this in iptables ?
>>

>
> With the ip_conntrack_ftp module active you shouldn't need to open port
> 20 yourself (or ports >1024), ip_conntrack_ftp should open the data port
> for you.
>
> My guess is your server requires active transfer mode and your client is
> attempting to use passive tranfer mode. Enter the command 'passive' to
> toggle your tranfer mode prior to the 'ls' command.
>
>
> Brad


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 11:32 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0