Linux Netfilter discussions
 help / color / mirror / Atom feed
* IPtables settings to access a backup FTP
@ 2007-08-18 19:08 Richard
  2007-08-18 20:16 ` Martijn Lievaart
  0 siblings, 1 reply; 5+ messages in thread
From: Richard @ 2007-08-18 19:08 UTC (permalink / raw)
  To: netfilter

Hello, this is my first message so I hope I'm doing this right ! :)

I've got iptables setup and running well on my server and up to now I've 
not had any problems, however I have just installed a backup system 
which needs to connect by FTP to a distant server.

With my firewall disactivated all works fine, however with the firewall 
activated when I use the "ls" command of the debian ftp command line 
package (CWD) I get:

200 ok then a long wait then :
421 Service not available, remote server has closed connection.

I've tried this on two different FTP's and it only works if the firewall 
is disactivated.

One server is a plesk server but the server I need to connect to I do 
not know much about, with filezilla on my pc I've managed to connect to 
it with both FTP active and FTP passive so I guess it can do both.

On my server I just do :

ftp ftp.server.com
username
password

So I'm not sure if it connects as passive or active.

These are the ports that I have got open :

-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

-A INPUT -p tcp -m tcp --dport 20 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 21 -j ACCEPT

-A OUTPUT -p tcp -m tcp --dport 20 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 21 -j ACCEPT

Which ports do you suggest I should open to connect to this FTP server ?

Thanks in advance,

Richard



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

end of thread, other threads:[~2007-08-18 22:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-18 19:08 IPtables settings to access a backup FTP Richard
2007-08-18 20:16 ` Martijn Lievaart
2007-08-18 20:25   ` Richard
2007-08-18 20:29     ` Martijn Lievaart
2007-08-18 22:36       ` Richard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox