Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 May 2012 16:59:52 -0500
From:      Derek Ragona <>
To:        David Banning <>, Chuck Swiger <>
Subject:   Re: problems with networking and route command
Message-ID:  <>
In-Reply-To: <>
References:  <> <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
At 07:07 AM 5/18/2012, David Banning wrote:
> > > It is machines that connect and receive via DHCP and 
> above that
> > > can't connect to the internet though the server.  I don't know a whole
> > > lot about route - I have been attempting a variation of route commands
> > > without success.
> >
> > You need to implement NAT on this box, since is an 
> RFC-1918 unrouteable private network range.
>I previously connected to the internet using ppp with the -nat option
>and now my connection has changed - so that makes sense.
>So I implemented natd.
>Unfortunately natd does not work as yet.  I followed the setup as laid
>out in "man natd" and also used the layout in;
>Here is my natd setup
>1. Compiled IPFIREWALL & IPDIVERT into my kernel - went fine.
>Here is my rc.conf network related entries;
>natd_flags="-f /etc/natd.conf"
>ifconfig_rl0="inet netmask"
>network_interfaces="rl0 vr0 lo0"
>My firewall rules;
>ipfw add 64000 allow ip from any to any
>ipfw add divert natd all from any to any via rl0
>ipfw add allow tcp from any to 139
>ipfw add allow tcp from any to 139
>ipfw add 6000 deny tcp from any to 139
>ipfw add 6010 deny tcp from any to 445
>ipfw add deny tcp from any to any 139
>My /etc/natd.conf;
>interface rl0
>use_sockets yes
>same_ports yes
>My /etc/services includes the line;
>natd     8668/divert  # Network Address Translation socket
>Output of ifconfig;
># ifconfig
>fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
>         ether 02:11:d8:b3:0e:43
>         ch 1 dma -1
>         inet netmask 0xffffff00 broadcast
>         inet6 fe80::16d6:4dff:fe47:88ae%vr0 prefixlen 64 scopeid 0x2
>         ether 14:d6:4d:47:88:ae
>         media: Ethernet autoselect (100baseTX <full-duplex>)
>         status: active
>         inet netmask 0xfffffff0 broadcast
>         inet6 fe80::211:95ff:fe66:7162%rl0 prefixlen 64 scopeid 0x3
>         ether 00:11:95:66:71:62
>         media: Ethernet autoselect (100baseTX <full-duplex>)
>         status: active
>lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
>lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
>         inet6 ::1 prefixlen 128
>         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
>         inet netmask 0xff000000
>ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
>sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 552
>faith0: flags=8002<BROADCAST,MULTICAST> mtu 1500
> >From my initial communication I have swapped the uses of the two network
>cards - which explains the reversal of entries for devices vr0 and rl0.
>Still I have server connection to the internet on rl0 and server
>connection to the network on vr0 - but the network cannot connect
>to the internet via rl0.
>If there are any commands that would help collect information leading
>to the answer I would appreciate any feedback.

Try using the examples here:

That freebsddiary article is very old, and many versions ago.  Essentially 
you need to forward the packets from your NAT'd private interface over to 
the interface on the internet.

You can try this using an open firewall, sending all packets to test the 
setup.  Then add rules to lock it down to only the ports you want to allow.


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Want to link to this message? Use this URL: <>