wmoran at potentialtech.com
Thu Jun 12 14:10:05 PDT 2003
[Please wrap your lines around 70 chars or so]
Koroush Saraf wrote:
> Hi all,
> I'm trying to setup a BSD box to act as a NAT gateway between private
> net and public Internet. My requirements is to map the src and destination
> of the packet according to a set of rules.
> The BSD box has two public IP addresses. Depending on which interface the
> packet arrives on it will get routed to a different private destination
> I'm using ipnat with the following mapping on the NAT box.
> The Nat box has only 1 interface xl0
> the ip addresses of this interface are:
> public 129.197,244.6/24,22.214.171.124/24, 126.96.36.199/24
> private 10.77.1.2/24, 10.77.2.2/24
This is not a particularly good setup. I hope you aren't expecting this to
act as a firewall or provide any security? You'd probably be better off
setting up the machines with the IP addresses directly, instead of natting.
Otherwise, get a second NIC ... it's the right thing to do.
Please provide the output of "ifconfig". What you describe above is wrong,
but it's possible that you mistyped it. If you actually try to have two
IPs on the same NIC that equate to the same network number, your networking
will not work as expected.
> The servers on the private lan are 10.77.1.1/24 and 10.77.2.1/24 on two
> different subnets.
> List of active MAP/Redirect filters:
> map xl0 188.8.131.52/32 -> 10.77.1.1/32
> map xl0 184.108.40.206/32 -> 10.77.2.1/32
> map xl0 10.77.1.1/32 -> 220.127.116.11/32
> map xl0 10.77.2.1/32 -> 18.104.22.168/32
> However I'm not getting the desired results.
You're using the wrong command. Use rdr.
More information about the freebsd-questions