From owner-freebsd-questions@FreeBSD.ORG Sun Nov 1 12:14:39 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC8741065676 for ; Sun, 1 Nov 2009 12:14:39 +0000 (UTC) (envelope-from laszlo_danielisz@yahoo.com) Received: from web30802.mail.mud.yahoo.com (web30802.mail.mud.yahoo.com [68.142.200.145]) by mx1.freebsd.org (Postfix) with SMTP id 8CC248FC1B for ; Sun, 1 Nov 2009 12:14:39 +0000 (UTC) Received: (qmail 25743 invoked by uid 60001); 1 Nov 2009 12:14:38 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1257077678; bh=MAxOLfIQneLC03JMTJO2PfHTWnJYyalfFVOddHrOGVU=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=pFkJTvWsHudQHJ+sjjyFirG9BigC68GRdPCxnLmCDRwLUNxa9Z9sKNMjonTm+k7ujsVYozrTRiHjIAo/9iY6pznaOImWFuyfTnCAssN5LK+G5EgGSk6RTvXIvg+CEW8p61nvyzUxpUplwsUvRP9V6uwHpckbNEFAH0Gc4VIiDbc= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=4rh75vBvy6c06WM3xFuB1osLn/wv2yhKAkde6j0yNbAHQgH0QiMaVcuu61i62li42NWDx+46+KpPuFGzNk8OoshDpsjK0AFuE0xOYiNu8APE3HdHoVs7bzcEPsAXNjx//ao7qgHrOkqAFm4PTLjXAn0Af3O2yfincGcN8psGeGk=; Message-ID: <905594.22832.qm@web30802.mail.mud.yahoo.com> X-YMail-OSG: 8oN37FsVM1mLAlIkaZz6xJNGJGwQyWnyzfzOAG.hpz1325NDdTS43RVJBkiSrNggKAaKvdI69xpxFmT3taR1rk2eBHRMBmBo6tQwzmyxyvyZn8cVo0PKWU8E3GhPsUTAEzhk2PWPcv_0M6XKjXUPQbcMfZUmSpw7f7JLRHx9uH46zFemXs5o2CzHRIln5LfgBaBQoWrgCGY1KTbYaAkr46PEw7J38_RUL2MYaNOgHqizCReGIRW_6uCLNIcichqv8r6fwymmdt_kowIDS6JXL2xoGgyo_lDTxVlWhHtrNxEsPepeRmHNL3Aq2MrF1D0V.VFOorRRGwMn2cXiulWA6HLByxhDJCUmJBQthSYWr4klqkQ18.qJ9NAWXNJqafA2FxAK.ZBaBdvvsqYnJamIH.SacJldoQrNqh6CH4.2yE6aPKowQhAuB4rHhg1.da_SKY3IeVW93XpVHOK6c80phQ-- Received: from [78.131.57.57] by web30802.mail.mud.yahoo.com via HTTP; Sun, 01 Nov 2009 04:14:38 PST X-Mailer: YahooMailRC/211.6 YahooMailWebService/0.7.361.4 References: <82804.79685.qm@web30804.mail.mud.yahoo.com> <516971.12872.qm@web30807.mail.mud.yahoo.com> <806321.83601.qm@web30807.mail.mud.yahoo.com> Date: Sun, 1 Nov 2009 04:14:38 -0800 (PST) From: =?iso-8859-1?Q?D=E1nielisz_L=E1szl=F3?= To: =?iso-8859-1?Q?Trond_Endrest=F8l?= In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: dhcpd related issue X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2009 12:14:39 -0000 Thank you Trond! =0ATrue and I'll implement this to my pf.conf just first I= want to make work this dhcpd :-)=0A=0A=0A=0A=0A___________________________= _____=0AFrom: Trond Endrest=F8l =0ATo:= D=E1nielisz L=E1szl=F3 =0ACc: freebsd-question= s@freebsd.org=0ASent: Sun, November 1, 2009 12:48:45 PM=0ASubject: Re: dhcp= d related issue=0A=0A-----BEGIN PGP SIGNED MESSAGE-----=0AHash: SHA1=0A=0AO= n Sun, 1 Nov 2009 12:30+0100, Trond Endrest=F8l wrote:=0A=0A> On Sun, 1 Nov= 2009 02:06-0800, D=E1nielisz L=E1szl=F3 wrote:=0A> =0A> > I had one more i= dea: try nmap on my dhcp server, and port 67 does =0A> > not seems to be op= ened, after I tried telneting in and my connection =0A> > was refused:=0A> = > =0A> > $ telnet 192.168.1.1 67=0A> > Trying 192.168.1.1...=0A> > telnet: = connect to address 192.168.1.1: Connection refused=0A> > telnet: Unable to = connect to remote host=0A> =0A> DHCP uses UDP, telnet uses TCP, no wonder y= ou're getting refused.=0A> =0A> Do you have bpf (Berkeley packet filter) co= mpiled in the kernel?=0A> dhcpd relies on bpf. Just a thought, although dhc= pd would probably =0A> shut down if bpf is unavailable.=0A> =0A> As others = have suggested, please post the output from ifconfig rl1, =0A> and from net= stat -rnf inet.=0A> =0A> > Than I disabled pf=0A> > # pfctl -d=0A> > No ALT= Q support in kernel=0A> > ALTQ related functions disabled=0A> > pf disabled= =0A> =0A> Just another (silly) thought, does your pf setup allow UDP from = =0A> 192.168.1.1:67 to *:68 over the rl1 interface?=0A=0AInitially the DHCP= client uses 0.0.0.0 as its IP address and =0Abroadcasts the DHCP requests = to 255.255.255.255. I know you have =0Adisabled pf, but you should later al= low the clients and dhcpd to send =0ADHCP messages using the above addresse= s, i.e. dhcpd will broadcast =0Aback the offerings using its own IP-address= as source (192.168.1.1 in =0Ayour case) and the broadcast address 255.255.= 255.255 as destination. =0AYou should probably also allow for the use of 19= 2.168.1.255 as =0Abroadcast address in your pf setup with respect to DHCP m= essages.=0A=0A=0AMore ranting on my part,=0ATrond.=0A=0A> > Than I checked = telnet/nmap again but still don't found any 67 port =0A> > ever there. I ch= ecked again that the dhcpd is running, and its up:=0A> >=0A> > # ps ax|grep= dhcp=0A> > 958 ?? Is 0:00.00 /usr/local/sbin/dhcpd -cf /usr/local/= etc/dhcpd.conf -lf /var/db/dhcpd/dhcpd.lease=0A> > =0A> > Any idea?=0A> =0A= > Did you restart dhcpd?=0A> What's the output from fstat with respect to d= hcpd?=0A> =0A> The output should be something resembling:=0A> =0A> dhcpd = dhcpd 18990 root / 2 drwxr-xr-x 1024 r=0A> dhcpd d= hcpd 18990 wd / 6 drwxr-xr-x 1024 r=0A> dhcpd dhc= pd 18990 text /usr 10505569 -rwxr-xr-x 595924 r=0A> dhcpd dhc= pd 18990 0 /dev 14 crw-rw-rw- null rw=0A> dhcpd dhcpd= 18990 1 /dev 14 crw-rw-rw- null rw=0A> dhcpd dhcpd = 18990 2 /dev 14 crw-rw-rw- null rw=0A> dhcpd dhcpd = 18990 3* local dgram c32224b4 <-> c32228bc=0A> dhcpd dhcpd 189= 90 4* internet raw icmp c32d8b2c=0A> dhcpd dhcpd 18990 5* int= ernet dgram udp c3173974=0A> dhcpd dhcpd 18990 6 /var 70999= -rw-r--r-- 93335 w=0A> dhcpd dhcpd 18990 7 /dev 7 c= rw------- bpf rw=0A> =0A> If you happen to have lsof installed, it shou= ld yield something like =0A> this:=0A> =0A> dhcpd 18990 1 dhcpd cw= d VDIR 0,98 1024 6 /root=0A> dhcpd 18990 1 dhc= pd rtd VDIR 0,98 1024 2 /=0A> dhcpd 18990 1 d= hcpd txt VREG 0,106 595924 10505569 /usr/local/sbin/dhcpd=0A> d= hcpd 18990 1 dhcpd txt VREG 0,98 220136 26684 /libe= xec/ld-elf.so.1=0A> dhcpd 18990 1 dhcpd txt VREG 0,98 1= 143792 1327 /lib/libc.so.7=0A> dhcpd 18990 1 dhcpd 0u VCHR = 0,14 0t0 14 /dev/null=0A> dhcpd 18990 1 dhcpd = 1u VCHR 0,14 0t0 14 /dev/null=0A> dhcpd 18990 = 1 dhcpd 2u VCHR 0,14 0t0 14 /dev/null=0A> dhcpd = 18990 1 dhcpd 3u unix 0xc31719a8 0t0 ->0xc3171b44 (= QR=3D0 QS=3D0 SO=3DPQLEN=3D0,QLEN=3D0,QLIM=3D0,RCVBUF=3D32768,SNDBUF=3D1638= 4 SS=3DISCONNECTED)=0A> dhcpd 18990 1 dhcpd 4u IPv4 0xc32d8b2c = 0t0 ICMP *:* (QR=3D0 QS=3D0 SO=3DPQLEN=3D0,QLEN=3D0,QLIM=3D0,RCV= BUF=3D73728,SNDBUF=3D73728)=0A> dhcpd 18990 1 dhcpd 5u IPv4 0xc= 3175060 0t0 UDP *:bootps (QR=3D0 QS=3D0 SO=3DPQLEN=3D0,QLEN=3D0= ,QLIM=3D0,RCVBUF=3D262144,REUSEADDR,SNDBUF=3D73728)=0A> dhcpd 18990 = 1 dhcpd 6w VREG 0,104 94061 70999 /var (/dev/ufs/var)=0A>= dhcpd 18990 1 dhcpd 7u VCHR 0,7 0t26744985 7 /de= v/bpf=0A> =0A> =0A> HTH,=0A> Trond.=0A> =0A> > ____________________________= ____=0A> > From: D=E1nielisz L=E1szl=F3 =0A> > = To: patrick =0A> > Cc: freebsd-questions@freebsd.org= =0A> > Sent: Sun, November 1, 2009 8:34:03 AM=0A> > Subject: Re: dhcpd rela= ted issue=0A> > =0A> > It's the same, I still don't got any IP address.=0A>= > =0A> > =0A> > =0A> > =0A> > ________________________________=0A> > From:= patrick =0A> > To: D=E1nielisz L=E1szl=F3 =0A> > Cc: freebsd-questions@freebsd.org=0A> > Sent: Sun= , November 1, 2009 6:38:31 AM=0A> > Subject: Re: dhcpd related issue=0A> > = =0A> > What happens if you disable pf temporarily?=0A> > =0A> > 2009/10/31 = D=E1nielisz L=E1szl=F3 :=0A> > > Hello,=0A> > >= =0A> > > I just configured my dhcpd but it gives no IP-s.=0A> > > What had = I done until now:=0A> > >=0A> > > 1. Installed isc-dhcp via ports=0A> > >= =0A> > > 2. edited the /usr/local/etc/dhcpd.conf=0A> > >=0A> > > option dom= ain-name "bsd";=0A> > > option domain-name-servers ;=0A> = > > option subnet-mask 255.255.255.0;=0A> > > authoritative;=0A> > >=0A> > = > default-lease-time 3600;=0A> > > max-lease-time 86400;=0A> > > ddns-updat= e-style none;=0A> > >=0A> > > subnet 192.168.1.0 netmask 255.255.255.0 {=0A= > > > range 192.168.1.129 192.168.1.250;=0A> > > option routers 192.168.1.1= ;=0A> > > }=0A> > >=0A> > > 3. Added the following ones to /etc/rc.conf=0A>= > > ifconfig_rl1=3D"inet 192.168.1.1 netmask 255.255.255.0"=0A> > > dhcpd= _enable=3D"YES"=0A> > > dhcpd_conf=3D"/usr/local/etc/dhcpd.conf"=0A> > > dh= cpd_ifaces=3D"rl1"=0A> > >=0A> > >=0A> > > 4. Opened the adequate port in p= f=0A> > > pass in log on rl1 inet proto tcp from 192.168.1.0/24 to 192.168.= 1.1 port =3D bootps flags S/SA keep state=0A> > > pass in log on rl1 inet p= roto udp from 192.168.1.0/24 to 192.168.1.1 port =3D bootps keep state=0A> = > >=0A> > > 5.. When I start de daemon:=0A> > > # /usr/local/etc/rc.d/isc-d= hcpd start=0A> > > Starting dhcpd.=0A> > > Internet Systems Consortium DHCP= Server V3.0.7=0A> > > Copyright 2004-2008 Internet Systems Consortium.=0A>= > > All rights reserved.=0A> > > For info, please visit http://www.isc.org= /sw/dhcp/=0A> > > Wrote 0 leases to leases file.=0A> > > Listening on Socke= t/rl1/192.168.1/24=0A> > > Sending on Socket/rl1/192.168.1/24=0A> > >=0A>= > > Everythings looks to be ok there but on the client (I tried OS-X and N= okia symbian) I can not obtain the IP address, do you have any idea what sh= ould I check?=0A> > >=0A> > >=0A> > > Thanks!=0A> > > Laci=0A=0A- -- =0A- -= ---------------------------------------------------------------------=0ATro= nd Endrest=F8l | Trond.Endrestol@fagskolen.gjovik.no=0AACM= , NAS, NUUG, SAGE, USENIX | FreeBSD 7.2-STABLE & Alpine 2.00=0A=0A--= ---BEGIN PGP SIGNATURE-----=0AVersion: GnuPG v2.0.12 (FreeBSD)=0A=0AiEYEARE= CAAYFAkrtdaIACgkQbYWZalUoElsSkgCdFCF8uxSXyw4tckkrz8/sE2vI=0Axb0An1AKlAoBKrc= BYfEXPfXGGRKuYefU=0A=3DQnuU=0A-----END PGP SIGNATURE-----=0A=0A=0A