Static NAT
Hello
I'm trying to set up my an internal network connected to a hub with
an uplink to a redhat 8 box running iptables. Each internal box would have an internal ip, but i'm trying to get dnat and snat to change the packets' IPs to available static addresses on my network. This way i could have a nice firewall in place and take advantage of some other services for these internal. I've been trying to do this for a couple of days but with little luck. I know i set up the rest of the tables correctly though because if I use MASQUERADE it works instantly, but i need those IPs! :)
Here is a sample of my DNAT/SNAT entries for one machine.
echo -n "setting nat rules"
$IPTABLES -t nat -A PREROUTING -s 0.0.0.0/0 -d 129.63.106.11 -j DNAT --to-destination 192.168.2.2
$IPTABLES -t nat -A POSTROUTING -s 192.168.2.2 -d 0.0.0.0/0 -j SNAT --to-source 129.63.106.11
echo " Done"
is this really possible?
E2-O: The presence of this footer indicates the message has been scanned for viruses by the WebShield e500.
--- William Olbrys <[email protected]>
Quoted 10 lines · wrote:
echo -n "setting nat rules"
$IPTABLES -t nat -A PREROUTING -s 0.0.0.0/0 -d
129.63.106.11 -j DNAT
--to-destination 192.168.2.2
$IPTABLES -t nat -A POSTROUTING -s 192.168.2.2 -d
0.0.0.0/0 -j SNAT
--to-source 129.63.106.11
echo " Done"is this really possible?
Those rules look fine. What do you have in your
FORWARD chain?
=====
Kevin C. McConnell --RHCE-- <Red Hat Certified Engineer>
__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com