Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Oct 1998 17:16:00 -0400
From:      "Stephen A. Derdau" <sderdau@mediaone.net>
To:        Stephen Derdau <sderdau@bit-net.com>
Cc:        questions@FreeBSD.ORG, sderdau@ne.mediaone.net
Subject:   Re: ALMOST THERE !!! DHCP client
Message-ID:  <361E7D10.AA2A08C3@mediaone.net>
References:  <361E49CF.62611474@bit-net.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks I have my system up and runnng

using 
isc-dhcp2
	see http://www.home.san.rr.com/freebsd/dhcp.html
natd
	RUNNING NATD
     The following steps are necessary before attempting to run natd:

     1.   Get FreeBSD version 2.2 or higher.  Versions before this do
not support divert(4) sockets.

     2.   Build a custom kernel with the following options:

            options IPFIREWALL
            options IPDIVERT

          Refer to the handbook for detailed instructions on building a
custom
          kernel.

     3.   Ensure that your machine is acting as a gateway.  This can be
done
          by specifying the line

            gateway_enable=YES

          in /etc/rc.conf, or using the command

            sysctl -w net.inet.ip.forwarding=1

     4.   If you wish to use the -n or -interface flags, make sure that
your
          interface is already configured.  If, for example, you wish to
spec­
          ify tun0 as your interface, and you're using ppp(8) on that
inter­
          face, you must make sure that you start ppp prior to starting
natd.

     5.   Create an entry in /etc/services:

            natd          8668/divert  # Network Address Translation
socket

          This gives a default for the -p or -port flag.

     Running natd is fairly straight forward.  The line

       natd -interface ed0

     should suffice in most cases (substituting the correct interface
name).
     Once natd is running, you must ensure that traffic is diverted to
natd:

     1.   You will need to adjust the /etc/rc.firewall script to taste. 
If
          you're not interested in having a firewall, the following
lines will
          do:

            /sbin/ipfw -f flush
            /sbin/ipfw add divert natd all from any to any via ed0
            /sbin/ipfw add pass all from any to any

          The second line depends on your interface (change ed0 as
appropri­
          ate) and assumes that you've updated /etc/services with the
natd en­
          try as above.  If you specify real firewall rules, it's best
to
          specify line 2 at the start of the script so that natd sees
all
          packets before they are dropped by the firewall.  The firewall
rules
          will be run again on each packet after translation by natd,
minus
          any divert rules.

     2.   Enable your firewall by setting

            firewall_enable=YES

          in /etc/rc.conf. This tells the system startup scripts to run
the
          /etc/rc.firewall script.  If you don't wish to reboot now,
just run
          this by hand from the console.  NEVER run this from a virtual
ses­
          sion unless you put it into the background.  If you do, you'll
lock
          yourself out after the flush takes place, and execution of
          /etc/rc.firewall will stop at this point - blocking all
accesses
          permanently.  Running the script in the background should be
enough
          to prevent this disaster.

SEE ALSO
     getservbyname(2),  socket(2),  divert(4),  services(5),  ipfw(8)

AUTHORS
     This program is the result of the efforts of many people at
different
     times:

     Archie Cobbs <archie@whistle.com> (divert sockets)
     Charles Mott <cmott@srv.net> (packet aliasing)
     Eivind Eklund <perhaps@yes.no> (IRC support & misc additions)
     Ari Suutari <suutari@iki.fi> (natd)
     Brian Somers <brian@awfulhak.org> (glue)

 FreeBSD                         15 April 1997     



Stephen Derdau wrote:
> 
> I just got my FreeBSD machine to connect over my
> cable modem. " Once I get this all figured I will
>                 offer assistance to any one else
>                 who may ask for help"
> any way:
> 
> Now I would like to have my cable access work similar to
> the way  dial up ppp -alias works.
> I use to dial in and have all my local computers
> accessing over the dialup connection
> 
> I just tried it with my cable modem.
> 
> I am running isc-dhcp2 and FreeBSD 2.2.7 !!!!!
>                 I didn't use two cards before
> with ppp now I have two Ethernet cards
> This is the last step and I can put all my computers
> back together after I get this.....
> I would appreciate any help......looking forward
> to helping someone else ...
> 
> Hoping
> 
> Thank You !!!!
> 
> --
> Thank You
> 
> /SD
> FreeBSD 2.2.7-STABLE #0: Mon Aug 24 02:20:10 EDT 1998
> **http://www.freebsd.org/search.html "Alot of answers found here see
> FAQ's"**
> ***** FreeBSD IT's HARD TO BELIEVE IT IS FREE ! http://www.FreeBSD.org
> *****

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?361E7D10.AA2A08C3>