On 27 Oct 2002, root wrote: > On Sat, 2002-10-26 at 09:03, Fernando wrote: > > I have a server with an adsl connection running Red Hat 8 and acting as > > gateway/firewall to my internal network. I wanna redirect port 21 of the > > server to a internal machine, where i wanna run a ftp server. I tried: > > iptables -t nat -A PREROUTING -p tcp --dport 21 -i ppp0 -j DNAT --to > > 192.168.0.10:21 > > where ppp0 its my external adsl interface and 192.168.0.10 is the ip adress > > of the machine running the ftp server > > But, the port isnt redirected. Someone know why? > > A couple of things to check first... > > You need to make sure the packets are getting through the FORWARD chain > ok What is your FORWARD POLICY, DROP or ACCEPT? > If it is DROP, you need to add a rule to ACCEPT packets, > eg -A FORWARD -i ppp0 -p tcp --dport 21 -m state NEW,ESTABLISHED,RELATED > -j ACCEPT
shouldn't that be ... -m state --state NEW,RELATED,ESTABLISHED ... ? rday -- redhat-list mailing list unsubscribe mailto:redhat-list-request@;redhat.com?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list