From owner-freebsd-questions Fri Oct 9 14:11:31 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA21198 for freebsd-questions-outgoing; Fri, 9 Oct 1998 14:11:31 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from chmls06.mediaone.net (chmls06.mediaone.net [24.128.1.71]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA21161 for ; Fri, 9 Oct 1998 14:11:16 -0700 (PDT) (envelope-from sderdau@bit-net.com) Received: from wookie.sderdau.ne.mediaone.net (sderdau.ne.mediaone.net [24.128.122.197]) by chmls06.mediaone.net (8.8.7/8.8.7) with SMTP id RAA14372; Fri, 9 Oct 1998 17:11:02 -0400 (EDT) Message-ID: <001f01bdf3c9$5cd3c380$030aa8c0@wookie.sderdau.ne.mediaone.net> From: "Stephen A. Derdau" To: "Jeffrey Bernt" , Subject: Re: DHCP Date: Fri, 9 Oct 1998 17:11:19 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_001C_01BDF3A7.D5544680" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. ------=_NextPart_000_001C_01BDF3A7.D5544680 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I think my situation is similar to your's .... I just got it going like 5minutes ago. I have a cable modem=20 I'm runnin isc-DHCP2 What you want to do is get that going. I had to set up this in my kernel I believe to get DHCP client to = work=20 Here is a good link on that. http://home.san.rr.com/freebsd/dhcp.html Now most stuff I found was on static ip addresses. I have a dynic ip address any way ...the link above helped me. **** I think what helped me is the /etc/resolv.conf file was finally = set up right . Make sure their set up right and see if you can get connected and = running. Now if you want to have a local network to connect also with only the = one ip connection check out natd and follow these instructions ....especially the one at = the bottom of the page...make sure you start natd once all is configured. Here is the part that helped me::::: 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 sup=AD port 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=3DYES in /etc/rc.conf, or using the command sysctl -w net.inet.ip.forwarding=3D1 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=AD ify tun0 as your interface, and you're using ppp(8) on that = inter=AD 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=AD ate) and assumes that you've updated /etc/services with the = natd en=AD 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=3DYES 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=AD 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 (divert sockets) Charles Mott (packet aliasing) Eivind Eklund (IRC support & misc additions) Ari Suutari (natd) Brian Somers (glue) FreeBSD 15 April 1997 =20 -----Original Message----- From: Jeffrey Bernt To: freebsd-questions@FreeBSD.ORG Date: Friday, October 09, 1998 4:19 PM Subject: DHCP =20 =20 Help. I have my computer on a network, using a D-Link 220 (ne2000 = compatible) under FreeBSD 2.2.7, my network (through my dorm room) uses = dhcp. I can not get dhcp (wide or isc, both of which are in the = distribution cds) to work correctly. It will not even acknowledge that = the dhcp server is out there, nor will it assign me an IP. Should I just = ask for a specific IP and set my Fbsd box to that IP? Any help would be = greatly appreciated. Also, has anyone had luck with doing something like = this? Thanks. Jeff Bernt bernt@usa.net ------=_NextPart_000_001C_01BDF3A7.D5544680 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I think my situation is similar to = your's=20 ....
I just got it = going like=20 5minutes ago.
I have a cable modem
I'm runnin = isc-DHCP2
    What you=20 want to do is get that going.
    I had to set up = this in my=20 kernel I believe to get DHCP client to work
 
Here is a good link on that. http://home.san.rr.com/= freebsd/dhcp.html
 
Now most stuff I found was on static = ip=20 addresses.
I have a dynic = ip address=20 any way ...the link above helped me.
 
 **** I think what helped me is the = /etc/resolv.conf file=20 was finally set up right
.      Make sure their set = up right=20 and see if you can get connected and running.
Now if you want to have a local network to connect = also with=20 only the one ip connection
 
check out natd and follow these instructions = ....especially=20 the one at the bottom
of the page...make sure you start natd once all is=20 configured.
 
Here is the part that helped me:::::
 
 
 
RUNNING NATD
     The = following steps=20 are necessary before attempting to run natd:
 
     1.   Get FreeBSD = version=20 2.2 or higher.  Versions before this do not=20 sup­
          port=20 divert(4) sockets.
 
     2.   Build a = custom kernel=20 with the following options:
 
          &nbs= p;=20 options=20 IPFIREWALL
          = ; =20 options IPDIVERT
 
          Refer=20 to the handbook for detailed instructions on building a=20 custom
         =20 kernel.
 
     3.   Ensure that = your=20 machine is acting as a gateway.  This can be=20 done
          by = specifying the=20 line
 
          &nbs= p;=20 gateway_enable=3DYES
 
          in=20 /etc/rc.conf, or using the command
 
          &nbs= p; sysctl=20 -w net.inet.ip.forwarding=3D1
 
     4.   If you wish = to use the=20 -n or -interface flags, make sure that=20 your
          interface = is=20 already configured.  If, for example, you wish to=20 spec­
          ify = tun0 as=20 your interface, and you're using ppp(8) on that=20 inter­
          = face, you=20 must make sure that you start ppp prior to starting natd.
 
     5.   Create an = entry in=20 /etc/services:
 
          &nbs= p;=20 natd          = 8668/divert  #=20 Network Address Translation socket
 
          This=20 gives a default for the -p or -port flag.
 
     Running natd is fairly = straight=20 forward.  The line
 
       natd -interface = ed0
 
     should suffice in most = cases=20 (substituting the correct interface name).
     = Once natd=20 is running, you must ensure that traffic is diverted to = natd:
 
     1.   You will = need to=20 adjust the /etc/rc.firewall script to taste. =20 If
          you're not=20 interested in having a firewall, the following lines=20 will
          = do:
 
          &nbs= p;=20 /sbin/ipfw -f=20 flush
          &nbs= p;=20 /sbin/ipfw add divert natd all from any to any via=20 ed0
           = =20 /sbin/ipfw add pass all from any to any
 
          The=20 second line depends on your interface (change ed0 as=20 appropri­
          = ate) and=20 assumes that you've updated /etc/services with the natd=20 en­
          try as = above.  If you specify real firewall rules, it's best=20 to
          specify = line 2 at=20 the start of the script so that natd sees=20 all
          packets = before=20 they are dropped by the firewall.  The firewall=20 rules
          will be = run=20 again on each packet after translation by natd,=20 minus
          any = divert=20 rules.
 
     2.   Enable your = firewall=20 by setting
 
          &nbs= p;=20 firewall_enable=3DYES
 
          in=20 /etc/rc.conf. This tells the system startup scripts to run=20 the
          = /etc/rc.firewall=20 script.  If you don't wish to reboot now, just=20 run
          this by = hand from=20 the console.  NEVER run this from a virtual=20 ses­
          sion = unless=20 you put it into the background.  If you do, you'll=20 lock
          yourself = out=20 after the flush takes place, and execution=20 of
          = /etc/rc.firewall=20 will stop at this point - blocking all=20 accesses
         =20 permanently.  Running the script in the background should be=20 enough
          to = prevent this=20 disaster.
 
SEE ALSO
     = getservbyname(2), =20 socket(2),  divert(4),  services(5),  = ipfw(8)
 
AUTHORS
     This program is = the result=20 of the efforts of many people at different
    =20 times:
 
     Archie Cobbs <archie@whistle.com> (divert=20 sockets)
     Charles Mott <cmott@srv.net> (packet=20 aliasing)
     Eivind Eklund <perhaps@yes.no> (IRC support & = misc=20 additions)
     Ari Suutari <suutari@iki.fi>=20 (natd)
     Brian Somers <brian@awfulhak.org> = (glue)
 
 FreeBSD        &nb= sp;           &nbs= p;   =20 15 April 1997
 
 
-----Original = Message-----
From:=20 Jeffrey Bernt <bernt@usa.net>
To: freebsd-questions@FreeBSD.O= RG=20 <freebsd-questions@FreeBSD.O= RG>
Date:=20 Friday, October 09, 1998 4:19 PM
Subject:=20 DHCP

Help. I have my computer on a = network, using=20 a D-Link 220 (ne2000 compatible) under FreeBSD 2.2.7, my network = (through my=20 dorm room) uses dhcp. I can not get dhcp (wide or isc, both of which = are in=20 the distribution cds) to work correctly. It will not even = acknowledge that=20 the dhcp server is out there, nor will it assign me an IP. Should I = just ask=20 for a specific IP and set my Fbsd box to that IP? Any help would be = greatly=20 appreciated. Also, has anyone had luck with doing something like=20 this?
Thanks.
Jeff Bernt
bernt@usa.net
------=_NextPart_000_001C_01BDF3A7.D5544680-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message