Re: bridging and NAT in a linux is possible?

Nick Fedchik <nick-UvdXiu2sajOKBXSJ/[email protected]>
Newsgroups gmane.linux.network.bridge.ebtables.user
Message-ID <[email protected]>
> Is it possible that I can use Bridging and Nat simultaneously at a linux
> box which contains 3 or 4 ethernet interface?
Yep, it's possible.

> for example, eth0 and eth1 is bridging like br0
> and eth2(Private, 192.168.1.0/24) and eth0(Public,58.1.2.3) is NAT.
>
>                       +--------+             +--------------------------+
> internet  <----> eth0 | bridge | eth1 <----> | DMZ with real ip         |
>                       +--------+             +--------------------------+
>                          eth2
>                           ^
>                       +--------+
>                       | private|
>                       | network|(192.168.1.0/24)
>                       +--------+
>
> 1. Is it possible?
>    eth0 is used bridging and NAT simultaneously?
>    If not, 4 ethernet interface is required?
http://ebtables.sourceforge.net/br_fw_ia/br_fw_ia.html

> 2. If possible, how can I setting?
>    eth0 which includes br0 can be public ip rather than 0.0.0.0?
Use iptables 'nat' table and SNAT target

> 3. If someone in a private network connects to DMZ (from eth2 to eth1)
>    eth2 network is NATed or not?
I think than should be NAted, but depends on DMZ hosts config (routing table)
>    again, DMZ can see Private ip(192.168.1.x) or Nated public ip(58.1.2.3)?
Assign an ip address to the eth1 interface and/or use DNAT

Just try to do your solution, and You'll get some answers himself ;)

-- 
Best regards, Nick Fedchik
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.