Re: Changing the source address when accessing a different network
From: Allen Kistler (ackistler@yahoo.com)
Date: 02/26/03
- Next message: Malty Man.: "We live in a Matrix. Here is a message from the Earth terrestrial administrator (Kevin aka Shampoo)."
- Previous message: asadchev: "Re: Ssh/Rsh problems"
- In reply to: Stuart: "Changing the source address when accessing a different network"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: Allen Kistler <ackistler@yahoo.com> Date: Wed, 26 Feb 2003 07:08:39 GMT
Stuart wrote:
> I have a Linux RedHat 8.0 (2.4 Kernel) box set up as a
> router/firewall.
>
> It has 4 NICs which route to various private networks i.e.
> 10.1.x.x/16,10.2.x.x/16,10.3.x.x/16,192.168.127.x/24. The last NIC is
> connected to a third party network which the 10.x.x.x networks need to
> route to.
>
> [snip]
>
> Can anyone reply with the iptables commands to get the Linux router to
> change the source addresses?
In /etc/sysconfig/iptables, create a section for nat (since it probably
doesn't already exist, I imagine).
*nat
-A POSTROUTING -o eth3 -j SNAT --to 192.168.127.1
COMMIT
assuming your 4th interface is eth3 and its address is static and
192.168.127.1. Obviously you also need to have iptables installed and
started. You say it's already a firewall....
The above will get you started. There is probably more for you to do.
There are useful HOWTOs at www.tldp.org (which tend to be more concerned
with ipchains), a lot of iptables-specific info at www.netfilter.org,
and, of course, there's the iptables man page.
- Next message: Malty Man.: "We live in a Matrix. Here is a message from the Earth terrestrial administrator (Kevin aka Shampoo)."
- Previous message: asadchev: "Re: Ssh/Rsh problems"
- In reply to: Stuart: "Changing the source address when accessing a different network"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|