Linux Netfilter discussions
 help / color / mirror / Atom feed
* FTP problems
@ 2003-02-27 20:23 Del Winiecki
  2003-02-27 21:02 ` Ralf Spenneberg
  0 siblings, 1 reply; 3+ messages in thread
From: Del Winiecki @ 2003-02-27 20:23 UTC (permalink / raw)
  To: netfilter

Hi,
Everything seems to work fine except FTP via NAT.
The interfaces that are not natted handle ftp normally.
When I do ftp from inside where the connection goes thru nat, I get an
instant establisment of connection,syn,ack,syn-ack followed by a 30
second wait...then all works normally from that point. This 30 second
delay is constant with each new ftp connection. I have tried about
everything in the iptables script.
Passive ftp does the same thing.
All the other protocols seem okay including IRC.
I am running RedHat kernel 2.4.18-24.7.x i686, iptables version 1.2.5,
all the latest RedHat updates.

I have loaded:
ip_conntrack
ip_conntrack_ftp
ip_conntrack_irc
ip_table_nat
ip_nat_ftp
ip_nat_irc
ipt_state
ipt_limit
ipt_REJECT
ipt_LOG
ipt_unclean
ipt_mac
iptable_filter
iptable_mangle
iptable_nat

Should the ftp connection show up in /proc/net/ip_conntrack ? It does
NOT show in there.
Is there a problem with the ipt_nat_ftp module?
-Del




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

* Re: FTP problems
  2003-02-27 20:23 FTP problems Del Winiecki
@ 2003-02-27 21:02 ` Ralf Spenneberg
  0 siblings, 0 replies; 3+ messages in thread
From: Ralf Spenneberg @ 2003-02-27 21:02 UTC (permalink / raw)
  To: Netfilter

Am Don, 2003-02-27 um 21.23 schrieb Del Winiecki:
> Hi,
> Everything seems to work fine except FTP via NAT.
> The interfaces that are not natted handle ftp normally.
> When I do ftp from inside where the connection goes thru nat, I get an
> instant establisment of connection,syn,ack,syn-ack followed by a 30
> second wait...then all works normally from that point. This 30 second
> delay is constant with each new ftp connection. I have tried about
> everything in the iptables script.
> Passive ftp does the same thing.
Might be an issue with identd. Many ftp servers do reverse identd lookups on 
the client. If you drop these on your firewall they have to wait for the timeout.
Reject identd on your firewall:
iptables -A INPUT -p tcp --dport 113 -j REJECT

Other possibility is reverse DNS lookup by the FTP server. 

Cheers,

Ralf
 
> 
-- 
Ralf Spenneberg
RHCE, RHCX

IPsec/PPTP Kernels for Red Hat Linux:  
http://www.spenneberg.com/.net/.org/.de
Honeynet Project Mirror:                http://honeynet.spenneberg.org
Snort Mirror:                           http://snort.spenneberg.org


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

* Re: FTP problems
@ 2003-02-27 21:26 Robert Allmeroth
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Allmeroth @ 2003-02-27 21:26 UTC (permalink / raw)
  To: netfilter

hello,

I had the same problem.. but it was a DNS problem. Most FTP servers do
a reverse lookup of your IP address and if that fails it takes a while.

Robert

> Everything seems to work fine except FTP via NAT.
> The interfaces that are not natted handle ftp normally.
> When I do ftp from inside where the connection goes thru nat, I get an
> instant establisment of connection,syn,ack,syn-ack followed by a 30
> second wait...then all works normally from that point. This 30 second
> delay is constant with each new ftp connection. I have tried about
> everything in the iptables script.
> Passive ftp does the same thing.
> All the other protocols seem okay including IRC.
> I am running RedHat kernel 2.4.18-24.7.x i686, iptables version 1.2.5,
> all the latest RedHat updates.

> I have loaded:
> ip_conntrack
> ip_conntrack_ftp
> ip_conntrack_irc
> ip_table_nat
> ip_nat_ftp
> ip_nat_irc
> ipt_state
> ipt_limit
> ipt_REJECT
> ipt_LOG
> ipt_unclean
> ipt_mac
> iptable_filter
> iptable_mangle
> iptable_nat

> Should the ftp connection show up in /proc/net/ip_conntrack ? It does
> NOT show in there.
> Is there a problem with the ipt_nat_ftp module?









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

end of thread, other threads:[~2003-02-27 21:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-27 20:23 FTP problems Del Winiecki
2003-02-27 21:02 ` Ralf Spenneberg
  -- strict thread matches above, loose matches on Subject: below --
2003-02-27 21:26 Robert Allmeroth

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