IP forwarding
Mike Burger
mburger at bubbanfriends.org
Tue Sep 14 01:14:35 UTC 2004
On Mon, 13 Sep 2004 menonrr at adelphia.net wrote:
>
> Hello,
>
> The mailing list friends helped me to enable IP forwarding on my Redhat 9 gateway with the rule:
>
> "iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 172.16.3.10"
>
> This rule forwards the traffic from the internal network (172.16.4.0/24) to the outside.
>
> Problem:
>
> But I feel that the internal IPs are being forwarded with the IP address of the external NIC of the gateway.
>
> It would be helpful if I could have a way to keep the internal IP address (172.16.4.0)as it is without being substituted with the gateways IP address(172.16.3.10). This is because I want the external users to see the internal machines(172.16.4.0 network) as it is.
Does your gateway have the address you want attached to it?
At a command prompt, type "ip addr" If the output does not include a line
that starts like:
inet 172.16.3.10
Then it can't and won't forward out that way.
If not, add this line to your rc.local file:
ip addr add 172.16.3.10 dev eth1
And, while you're at it, run it, as root, from your command line, to add
that IP address to your external interface.
--
Mike Burger
http://www.bubbanfriends.org
Visit the Dog Pound II BBS
telnet://dogpound2.citadel.org or http://dogpound2.citadel.org
To be notified of updates to the web site, visit
http://www.bubbanfriends.org/mailman/listinfo/site-update, or send a
message to:
site-update-request at bubbanfriends.org
with a message of:
subscribe
More information about the redhat-list
mailing list