Problem accessing ftp services from the clients behind firewall.

Damar Thapa damar@sst.com.hk
Fri, 5 Oct 2001 09:59:59 +0800


Thanks, 

It worked.

I have not yet tried the ftp server though (not yet ready!)

Thanks once again.

Damar 
----- Original Message ----- 
From: "Orlando Reis" <oreis@student.dei.uc.pt>
To: <damar@sst.com.hk>; <netfilter@lists.samba.org>
Sent: Thursday, October 04, 2001 10:44 PM
Subject: Problem accessing ftp services from the clients behind firewall.


> Maybe this will help
> 
> /sbin/modprobe ip_nat_ftp
> 
> $IPTABLES -A tcp_allowed -p TCP -i ppp0 --dport 21 -j ACCEPT
> $IPTABLES -A tcp_allowed -p TCP -i ppp0 --dport 20 -j ACCEPT
> 
> And if you want you can set up a server on another machine on the inside
> network
> by(on your machine 192.168.255.1):
> $IPTABLES -A PREROUTING -t nat -p tcp -d $INTERNET_IP --dport 21 -j DNAT
> --to 10.0.0.1:21
> $IPTABLES -A FORWARD -i ppp0 -o $LAN_IFACE -d 10.0.0.1:21 -p tcp --dport
> 21 -j tcp_allowed
> 
> And
> 
> $IPTABLES -A tcp_packets -p TCP -s $ANYWHERE --dport 21 -j tcp_allowed
> $IPTABLES -A tcp_packets -p TCP -d $ANYWHERE --dport 20 -j tcp_allowed