[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
> address.

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,129.197.244.7/24, 129.197.244.8/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.

to List of active MAP/Redirect filters:
map xl0 129.197.244.7/32 -> 10.77.1.1/32
map xl0 129.197.244.8/32 -> 10.77.2.1/32
map xl0 10.77.1.1/32 -> 129.197.244.7/32
map xl0 10.77.2.1/32 -> 129.197.244.8/32


However I'm not getting the desired results.

You're using the wrong command. Use rdr.


--
Bill Moran
Potential Technologies
http://www.potentialtech.com

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to