how 2 address&port map outbound traffic to multiple/different IPs on a single intfc?

Vasily Ivanov freebsdpf at academ.org
Wed Jun 13 02:36:18 UTC 2007


Hello.

On 12 June 2007 09:20, snowcrash+freebsd wrote:
[- snip -]

> (2) from the POOLS discussion, 'simple' outbound NAT:
>
> 	nat on $ext_if from z.z.z.102 port 25 to any -> ($ext_if)
> 	nat on $ext_if from z.z.z.102 port 25 to any -> ($ext_if)
>
> doesn't do it either - i dno't think -- as $ext_if picks up the
> "primary IP" assigned via the pppoe startup, x.x.x.1.

You can specify required IP explicitly, like 

	nat on $ext_if from z.z.z.102 port 25 to any -> x.x.x.2

You don't even need aliases on interface (at least it works for my ethernet 
connection, dunno about pppoe). Just make sure your upstream routes traffic 
to your x.x.x.x/29 into your box.

>
> so, i think i'm in the right ballpark with *nat of some sort, but how
> do i get this done correctly?
>
> cheers!
> _______________________________________________
> freebsd-pf at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-pf
> To unsubscribe, send any mail to "freebsd-pf-unsubscribe at freebsd.org"

-- 
wbr, 
Vasily
http://www.academ.org
mailto: <freebsdpf at academ.org>


More information about the freebsd-questions mailing list