masqued AND forwarded
Try this one :
modprobe ip_conntrack_ftp
modprobe ip_nat_ftp
iptables -t nat -A PREROUTING -i $EXT_IF -p tcp -d $PUBLICIPADD \
--dport 21 -j DNAT --to-destination $LOCALADDOFFTP
iptables -A FORWARD -i $EXT_IF -o $INT_IF -p tcp --syn -d $LOCALADDOFFTP \ --dport 21 -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # This is the stateful inspection command.
# It only allows in what you send out first.
Milo
----- Original Message -----
From: "TestMail" <[email protected]>
To: <[email protected]>
Sent: Thursday, January 27, 2005 05:15 PM
Subject: Re: masqued AND forwarded
Quoted 5 lines
Try this one :
modprobe
ip_conntrack_ftp
modprobeip_nat_ftp
Quoted 8 lines
iptables -t nat -A PREROUTING -i $EXT_IF -p tcp -d $PUBLICIPADD \ --dport 21 -j DNAT --to-destination $LOCALADDOFFTPiptables -A FORWARD -i $EXT_IF -o $INT_IF -p tcp --syn -d $LOCALADDOFFTP \ --dport 21 -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # This
is
Quoted 4 lines
the stateful inspection command.
# It only allows in what you send out first.
Quoted 29 lines
Milo
----- Original Message -----
From: <[email protected]>
To: <[email protected]>
Sent: Thursday, January 27, 2005 06:44 AM
Subject: ftp: masqued AND forwardedQuoted 20 lines
Hi all,
I have spent several hours scouring the
archives trying to find out how to send external ftp requests to an internal server while at the same time allowing clients behind the firewall to access external ftp servers. (currently requests from internal clients to external ftp servers time out).Any suggestions would be greatly appreciated!
Here are the rules that I have in place:
#Load Modules
/sbin/modprobeip_tables/sbin/modprobeiptable_filter/sbin/modprobeip_conntrack/sbin/modprobeip_conntrack_ftp/sbin/modprobeip_nat_ftp#Send ftp to an internal machine
$IPTABLES -A PREROUTING -t nat -i $EXTERNALIF -p tcp -d $MYADDR --dport
20
Quoted 4 lines
Quoted 4 lines
-j DNAT --to 192.168.2.5:20
$IPTABLES -A FORWARD -i $EXTERNALIF -p tcp -d 192.168.2.5 --dport 20 -j ACCEPT
$IPTABLES -A PREROUTING -t nat -i $EXTERNALIF -p tcp -d $MYADDR --dport
21
Quoted 8 lines
Quoted 8 lines
-j DNAT --to 192.168.2.5:21
$IPTABLES -A FORWARD -i $EXTERNALIF -p tcp -d 192.168.2.5 --dport 21 -j ACCEPT#Masquerade internal connections going out. $IPTABLES -A POSTROUTING -t nat -o $EXTERNALIF -j MASQUERADE
Quoted 5 lines
Quoted 5 lines
$MYADDR is the firewall external address
$EXTERNALIF is the external interface (eth0)
$INTERNALIF is the internal interface (eth1)My apologies if this question has already been answered (probable) and
ask
Quoted 5 lines
Quoted 4 lines
forgiveness for my lack of being able to find it.
Travis Crook
Visions Beyond
Quoted 7 lines · TestMail
Try this one :
modprobe
ip_conntrack_ftp
modprobeip_nat_ftpiptables -t nat -A PREROUTING -i $EXT_IF -p tcp -d $PUBLICIPADD \ --dport 21 -j DNAT --to-destination $LOCALADDOFFTP
yes.
Quoted 2 lines
iptables -A FORWARD -i $EXT_IF -o $INT_IF -p tcp --syn -d $LOCALADDOFFTP \ --dport 21 -j ACCEPT
yes.
Quoted 2 lines
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # This is the stateful inspection command.
bzzzzzzzt. how about:
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
-j
--
"Well, I'm tired of being a wannabe league bowler. I wanna be a
league bowler!"
--The Simpsons