I have linux server that now it`s routing to private ips using iptables.(masquerade) I just got 32 public ips and i want them also to have internet access in paralell with the private ip class. I understand that i don't need NAT if routing to a public ip class. How to make them both work. routing to the public ip and routing to the private ip. how can i do that? thank you.

link|improve this question
feedback

1 Answer

The ideal way to do it is with two separate networks. Like this:

modem <-> switch1 <-> firewall/router <-> switch2

Connect 'outside' machines to switch1 and 'inside' machines to switch2.

Another way to do it is like this:

modem <-> firewall/router <-> switch

Here you bridge the modem interface to the interface that goes to the switch. You implement your firewall by filtering the bridge. The NAT is purely 'on a stick'. This actually works perfectly. Set up the public IPs first and get them working, then just add the NAT by adding a sub-interface with an RFC1918 address and configuring it exactly as if it was a second physical interface.

link|improve this answer
all right i understand that: 1.i need to bridge eth0(wan) to eth1(Lan) 2.Filter the bridge (i'm not sure i know how to do that) 3.creating eth1:1 with one of the public ip and route this with NAT to private ip is that correct? is it is ..well i think i need some examples please THANK YOU! – tric Oct 31 '11 at 11:35
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.