Re: iptables blocking ftp clients
From: ujay (ujay50-NOSPAM-@shaw.ca)Date: 03/21/02
- Next message: x: "Re: Log In Password security"
- Previous message: x: "Re: User nobody"
- Maybe in reply to: Adaptrx: "Re: iptables blocking ftp clients"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: ujay <ujay50-NOSPAM-@shaw.ca> Date: Thu, 21 Mar 2002 18:24:35 GMT
John Hunter wrote:
> I am running a zope FTP server on port 8021 on a host that is running
> an iptables firewall. Clients on the LAN behind the firewall can
> access the server fine, so there is no problem with the server.
> Clients on the internet cannot access the 8021 FTP server, because
> they are requesting high numbered ports > 1024 that are being dropped
> with packets like:
>
> Mar 20 21:13:53 localhost kernel: IPT DROP established_only: IN=eth0 OUT= MAC=00:a0:cc:e4:53:dc:00:90:b1:22:ec:00:08:00 SRC=128.135.97.130 DST=209.101.118.59 LEN=60 TOS=0x00 PREC=0x00 TTL=56 ID=50113 DF PROTO=TCP SPT=60584 DPT=59294 WINDOW=5840 RES=0x00 SYN URGP=0
> Mar 20 21:13:54 localhost kernel: IPT DROP established_only: IN=eth0 OUT= MAC=00:a0:cc:e4:53:dc:00:90:b1:22:ec:00:08:00 SRC=128.135.97.130 DST=209.101.118.59 LEN=60 TOS=0x00 PREC=0x00 TTL=56 ID=49392 DF PROTO=TCP SPT=60582 DPT=59293 WINDOW=5840 RES=0x00 SYN URGP=0
>
> I have tried ncftp and Internet Explere as ftp clients.
>
> I have ftp connection tracking enabled on the netfilter server; should
> I expect this to handle ftp requests made externally from a client
> that then spawns new ports? I am under the impression that this
> applies only to requests that originate internally, but am not sure.
>
> My established_only chain looks like:
>
> echo "Building user defined chains"
> $IPTABLES -N established_only
> $IPTABLES -A established_only -m state --state ESTABLISHED,RELATED -j ACCEPT
> $IPTABLES -A established_only -j LOG --log-prefix "IPT DROP established_only: "
> $IPTABLES -A established_only -j DROP
>
> Any suggestions on how I can get the 8021 ftp server working?
>
> Thanks,
> John Hunter
>
> RHL 7.1 with kernel 2.4.9
> Zope 2.5.x
>
>
>
It would seem that your problem is with passive mode FTP. Information
transfer is handled by the remote client sending a PORT command, which
the server will use for sending data to. These port ranges will be
->1024 on both client and server. You will need to allow input on
established,related ports. The ip_conntrack_ftp module will recognize
the ports as related due to the PORT command sent by the client.
- Next message: x: "Re: Log In Password security"
- Previous message: x: "Re: User nobody"
- Maybe in reply to: Adaptrx: "Re: iptables blocking ftp clients"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|