Server machines behind Firewall
Dear All,
Is there a sample ( nat scripts ) for the title ?
Edward.
Quoted 3 lines · On Thu, Jan 06, 2005 at 12:14:16AM +0800, [email protected] wrote:
Dear All,
Is there a sample ( nat scripts ) for the title ?
EXT_IF="eth0"
INT_IF="eth1"
SRV1="10.1.1.10"
iptables -t nat -A PREROUTING -i $EXT_IF -p tcp --dport 80 \
-j DNAT --to-destination $SRV1
iptables -A FORWARD -i $EXT_IF -o $INT_IF -p tcp --syn -d $SRV1 \
--dport 80 -j ACCEPT
rinse, repeat.
-j
--
"Ooh, they used nylon rope this time. It feels smooth against my skin,
almost sensuous."
--The Simpsons
Quoted 11 lines · Jason Opperisano
Quoted 3 lines · On Thu, Jan 06, 2005 at 12:14:16AM +0800, [email protected] wrote:
Dear All,
Is there a sample ( nat scripts ) for the title ?
EXT_IF="eth0"
INT_IF="eth1"
SRV1="10.1.1.10"iptables -t nat -A PREROUTING -i $EXT_IF -p tcp --dport 80 \
-j DNAT --to-destination $SRV1
I want to know why needn't to define the original IP ( Public IP ) ? eg :
iptables -t nat -A PREROUTING -i $EXT_IF -p tcp -s 202.175.xxx.xxx --dport 80 \
-j DNAT --to-destination 192.168.xxx.xxx
Sorry, what useful about the following function ( command line ) ?
Quoted 2 lines
iptables -A FORWARD -i $EXT_IF -o $INT_IF -p tcp --syn -d $SRV1 \
--dport 80 -j ACCEPT
In additional, if I want to setup a NAT ( 192.168.101.0/24 ) with a Server machines ( 192.168.100.1 ) behind Firewall...
So, is there more than one sample ( nat scripts ) for reference ?
Edward.
Quoted 9 lines · Jason Opperisano
Quoted 3 lines · On Thu, Jan 06, 2005 at 12:14:16AM +0800, [email protected] wrote:
Dear All,
Is there a sample ( nat scripts ) for the title ?
EXT_IF="eth0"
INT_IF="eth1"
SRV1="10.1.1.10"
Quoted 5 lines
iptables -t nat -A PREROUTING -i $EXT_IF -p tcp --dport 80 \
-j DNAT --to-destination $SRV1iptables -A FORWARD -i $EXT_IF -o $INT_IF -p tcp --syn -d $SRV1 \
--dport 80 -j ACCEPT
Can we setup server machines behind firewall with same machine ? Because there is only one machine allow to setup firewall + Internet Server...
Edward.
Quoted 5 lines · El mié, 05 de 01 de 2005 a las 17:14, [email protected] escribió:
Dear All,
Is there a sample ( nat scripts ) for the title ?
Edward.
You need to do DNAT from the ports you have in the firewall to the servers in your internal network.
Signature · 12 lines
Jose Maria Lopez Hernandez Director Tecnico de bgSEC [email protected] bgSEC Seguridad y Consultoria de Sistemas Informaticos http://www.bgsec.com ESPAÑA The only people for me are the mad ones -- the ones who are mad to live, mad to talk, mad to be saved, desirous of everything at the same time, the ones who never yawn or say a commonplace thing, but burn, burn, burn like fabulous yellow Roman candles. -- Jack Kerouac, "On the Road"