Multi-Interfaced NAT enabled router help needed

Multi-Interfaced NAT enabled router help needed

Post by Christopher Barr » Fri, 04 May 2001 07:32:03

    I am in the process of building a 6-interface LAN router in Linux.
    eth0 will be the external, internet interface, while eth1-5 will serve
internal subnets. NAT will need to occur from eth0 to all of the other
interfaces, and I want to run dhcpd on the box to serve interfaces 2, 3, &
4. eth1 will point to my servers, and 5 will point to another router to
several test LANs, which will be all hardcoded. Has anyone had experience
with configuring multi-interfaces with both NAT and DHCP? And could you give
me some tidbits of info / pitfalls to watch out for / good documentation
resource URLs you've found helpful? I would really appreciate it.

Christopher Barry
InfiniCon Systems


1. NAT with 2 public interfaces and 1 privat nat interface

Hi everybody

I'm quite sure this is easy for you, cause I'm a newbie and as such one I'm
asking basic simple and stupid questions. I'm very sorry for that but at the
moment I'm stucked ...

I try to configure a FreeBSD 4.6.2 router / firewall with this layout:

Def Gateway
fxp0 -> public interface A (for ex. /
fxp1 -> public interface B (for ex. /
fxp2 -> privat interface C (NAT: for ex /

I just can't manage to make this NAT with natd working ... The first
configuration was exactly like explained in the online handbook. After this
hasn't worked I tryed a few ideas. Without success ... I hope somebody in
this news list can give me a hint / instructions how I can convince the
system to do NAT.

Thank you very much and best regards

Kernel Config inclueds
# Firewall Konfiguration / natd
options         IPFIREWALL              #firewall aktiviert
options         IPFIREWALL_VERBOSE      #print info of dropped packets
options         IPFIREWALL_VERBOSE_LIMIT=200  #Limits No packets logged
options         IPDIVERT                #divert sockets / needed by natd

latest Version rc.conf (tested many many versions ...)

# Interface Settings
ifconfig_fxp0="inet   netmask"
ifconfig_fxp1="inet netmask"
ifconfig_fxp2="inet    netmask"

# Routing Settings

# Netzwerk Dienste

# Firewall Settings
natd_flags="-v -a"

# Security

#Regional Settings

Firewall rules

# Define the Firewall command

#### Force a flushing of the current rules before we load our own rules
$fwcmd -f flush

#### NAT auf FXP2 definieren
$fwcmd add 50 divert natd all from any to any via fxp2

#### only for testing: temp open everything
$fwcmd add allow all from any to any

Zrcherstrasse 204
9014 St. Gallen

T +41 (0)71 274 93 83
F +41 (0)71 274 93 84

Stefan Mallepell


2. Out of memory uncompressing 2.2.13 bzImage

3. multi-interfaced NFS server, what interface clients are using?

4. Newbie CDROM Question

5. newbie with a NAT ISDN router needs help

6. Solaris Sys Admin EXAMS - sources/demos

7. ? multi home + multi cgi, multi email, multi log, multi support

8. Openwindows problems

9. If I make my own Linux Router with Two NIC interfaces, do I have to enable NAT on that Router box?.

10. ISDN Routers (NAT) vs. External Modems Linux does the NAT

11. Do I need a software firewall in addition to a NAT router/firewall?

12. How can UNIX Multi-process with Multi-process interface

13. Sun serial Interface <-> Cisco router serial Interface