nat on bridge
Igor Popov
igorpopov at newmail.ru
Fri May 11 08:49:42 UTC 2007
hi.
I have a question about NAT (pf) on bridge.
Network diagram:
[PPPoE clients 192.168.0.0/16 and real ip] <-->[PPPoE concetrator
80.0.0.1/29]<---->[em0 FreeBSD bridge and NAT 80.0.0.2/29
em1]<----->80.0.0.3/29[BGP Router]
Why bridge? Both PPPoE concentrator and BGP router are Cisco routers, there is
dynamic routing (EIGRP) between them, so it must be directly connected.
FreeBSD should NAT internal ip network and switch on bridge all another
packets, is it possible?
ifconfig em0 up
ifconfig em1 up
ifconfig bridge0 addm em0 addm em1 up
ifconfig bridge0 inet 80.0.0.2/29
route add default 80.0.0.3
pf rules:
table const <pppoe> {192.168.0.0/16}
nat on bridge0 tagged TO_NAT tag NATED -> (bridge0)
pass in on em1 all keep state
pass in on em0 inet tag TO_INET keep state
pass in on em0 inet from <pppoe> to any tag TO_NAT keep state
pass out on em1 tagged NATED
pass out on em1 tagged TO_INET
--
You climb to reach the summit, but once
there, discover that all roads lead down.
-- Stanislaw Lem, "The Cyberiad"
More information about the freebsd-ipfw
mailing list