IRC log for #elinux on 20111219

00:56.20*** join/#elinux risca (~risca@m77-219-182-159.cust.tele2.se)
04:58.35*** join/#elinux krzee (nobody@openvpn/community/support/krzee)
04:58.53krzeecan anyone help me understand what the dnsd in busybox is and how to use it correctly?  the sample dnsd.conf doesnt work for me when i try to resolve the host.  the only doc i can find is about a different dnsd with different syntax
05:06.22krzeei open it without -d in 1 window, then in another i nslookup thebox 127.0.0.1
05:06.37krzeeand the windows running dnsd just shows no queries
05:06.47krzee-bash-3.2# busybox dnsd
05:06.48krzeeAccepting UDP packets on 0.0.0.0:53
05:06.48krzeednsd: no queries
05:07.33krzeenetstat -ln shows it listening correctly, but nmap from another computer does now show port 53 listening
05:15.16Russyou can't reliably use a tool like nmap to probe udp
05:15.26Russits stateless
05:15.38Russuse tcpdump and/or wireshark to watch packets
05:15.41krzeeok
05:15.47krzeei cant
05:15.54Russ...thats odd
05:16.03krzeeits a voip phone, doesnt have tcpdump
05:16.22Russbut the network cable is plugged into a...?
05:16.25krzeeunless you mean looking for return packets
05:16.49Russmake sure packets are going out to the phone first
05:16.54krzeebut that will only tell me if its sending back
05:17.01krzeethe phone should be initiating the traffic
05:17.04krzeeto itself
05:17.10Russwah?
05:17.14krzeehence why i cant tcpdump
05:17.28Russthen just put the hosts in /etc/hosts and be done
05:17.39krzeedid, the phone doesnt honor it
05:18.05krzeehttp://forum.snom.com/index.php?showtopic=8488
05:18.28krzeeHi krzee,
05:18.28krzee<PROTECTED>
05:18.28krzee<PROTECTED>
05:18.57krzeeand i see it has busybox which has dnsd
05:19.11krzeeso i found the sample file http://trac.mondorescue.org/browser/trunk/mindi-busybox/examples/dnsd.conf?order=name
05:19.25krzeebut even with that EXACT file it wont resolve
05:19.41krzeeand it seems like its timing out
05:19.59krzeetakes a long time to not resolv it, much longer than localhost should
05:22.12krzeeso ya, i have no idea what dnsd wants from me, starting to wonder if i can dnsmasq onto this thing
05:22.31krzeecan get*
05:25.52krzeeits not just "thebox", it doesnt resolve anything
05:26.57Russyou can use whatever resolve order you want
05:27.11Russsee: nsswitch.conf
05:27.34krzeeyes, but the phone software doesnt care / honor that
05:27.50Russso it doesn't bother using libc?
05:27.52krzeensswitch is configured for hosts, and hosts works for ping / nslookup
05:28.01krzeeright, thats in the above forum link
05:28.04Russwho wrote this software so I can avoid them
05:28.22krzeesnom
05:28.39krzee"Even if you edit the /etc/hosts the phone will resolute hostnames by using DNS - this is the wanted behaviour, no bug."
05:28.39Russstrace snom and dnsd, watch for the network traffic
05:29.13Russ"wanted behaviour", more like, "we don't understand this 'unix' thing and don't care"
05:29.20krzeeexactly
05:29.28krzeei responded similarly
05:29.31Russ"wanted behaviour" is spelled out in nsswitch.conf
05:29.37krzeei think you'll like my response
05:29.45krzeeyes, i more or less told them that =]
05:29.49Russanyway, anytime I have a problem like this my go to tool is strace
05:29.57krzeehttp://forum.snom.com/index.php?showtopic=8488
05:30.41krzeeok it does recieve
05:31.14krzeerecvfrom(3, "\313\33\1\0\0\1\0\0\0\0\0\0\6thebox\0\0\34\0\1"..., 513, 0, {sa_family=AF_INET, sin_port=htons(3094), sin_addr=inet_addr("127.0.0.1")}, [16]) = 24
05:31.15krzeewrite(2, "dnsd: no queries\n"..., 17dnsd: no queries
05:31.15krzee)   = 17
05:31.42krzeeand repeats
05:31.56Russnext step, change the string output format of strace and up the length to capture the whole packet
05:32.17Russget that into a format wireshark can understand and let it decode the dns request for you
05:32.34Russor look at the busybox source and see under what conditions it says "no queries"
05:34.54Russor change the dns server to be external (any ip) so you can grab it from the wire
05:38.17krzeehead = (struct dns_head *)buf;
05:38.18krzeeif (head->nquer == 0)
05:38.18krzeeeret("no queries");
05:38.40Russya, grab it from the wire and see what's up
05:38.51krzeegrab the response?
05:39.21krzeelike the packets where it responds with its "no queries"
05:39.56Russgrab the request
05:40.13krzeeisnt the request just like any other nslookup request?
05:40.26Russit might not be
05:40.36Russif you send a query from a normal machine does it work?
05:40.56Russthey seem to have their own handcrafted dns library, so....
05:41.20krzeeno, does the same thing
05:41.28krzeerecvfrom(3, "\271)\1\0\0\1\0\0\0\0\0\0\6thebox\3lan\0\0\1\0\1"..., 513, 0, {sa_family=AF_INET, sin_port=htons(52398), sin_addr=inet_addr("10.0.0.6")}, [16]) = 28
05:41.28krzeewrite(2, "dnsd: no queries\n"..., 17dnsd: no queries
05:41.28krzee)   = 17
05:42.10Russthen your configuration is likely fubar
05:42.41krzeeright, i have no clue how dnsd config should be, the example is 1 line and im using it exact until i get something figured out
05:44.09krzeei mean of course i tried mine first, but figured ild settle for the exact example
05:44.19Russwhat host are you trying to resolve?
05:44.38krzeei explain it in my forum post
05:44.49Russare you pinging 'thebox'?
05:45.06krzeeahh, ya nslookup thebox
05:45.15krzeejust because "thebox" is the example config
05:45.35krzeehttp://trac.mondorescue.org/browser/trunk/mindi-busybox/examples/dnsd.conf
05:48.36Russwfm
05:48.48Russruss@russ-laptop:~/src/busybox (master) $ sudo ./busybox dnsd -c examples/dnsd.conf -v
05:48.59Russruss@russ-laptop:~/src/busybox (master) $ nslookup thebox localhost
05:49.01Russ[...]
05:49.06RussAddress: 192.168.1.5
05:49.37krzeeshit so its just me
05:50.15Russwhich version of bb?
05:50.29krzeeBusyBox v1.8.2 (2009-11-17 16:28:31 CET) multi-call binary
05:50.57krzeehah -v wasnt in the usage, i hadnt tried that before
05:54.12Russ1_8_2 also wfm
05:57.00krzeethats really fubar
05:57.03krzee=/
05:57.14krzeeso something is broken in this firmware
05:57.27Russ'russ@russ-laptop:~/src/busybox ((1_8_2)) $ sudo qemu-arm ./busybox dnsd -c examples/dnsd.conf -v' works too :p
05:57.29krzeemaybe i should downgrade firmwares and see if i can get to a working install
05:57.49Russhow many addresses does the dns server need to resolve?
05:57.51krzeehaha well played
05:57.54krzee1
05:58.00krzeebut it will change
05:58.17krzeedepending which randomly selected vpn it gets into
05:58.18Russmy idea would just be a dumb dns reflector
05:58.40Russany request gets the same prepackaged response
05:59.48krzeethe vpn config will get it into one of many, then the registrar is the vpn server ip of that node, so i use a hostname in the voip config and have the vpn call a script when it connects
06:00.02krzeeoh yes, that would work
06:00.16krzeeas long as it were running on the phone
06:00.24krzeeso that it could be changed by the vpn client
06:01.03krzeethe device will ONLY need to resolve hosts to a single ip
06:02.14krzee(once running whatever the script will call)
06:30.44krzeethank you, your "wfm"'s let me know i was chasing the wrong thing
06:31.06krzeei will try some other versions of the firmware to see if i can get better luck =]
07:13.27*** join/#elinux lyakh (~lyakh@dslb-094-221-099-077.pools.arcor-ip.net)
08:56.46*** join/#elinux pakesson (~philip@h121n2-m-sp-gr1.ias.bredband.telia.com)
09:08.18*** join/#elinux risca (~risca@f-static-78-70-87-29.business.telia.com)
09:55.53*** join/#elinux risca (~risca@f-static-78-70-87-29.business.telia.com)
11:09.37*** join/#elinux gustavoz (~gustavoz@host71.186-109-22.telecom.net.ar)
12:46.31*** join/#elinux Kmarc_ (kari@83.145.200.19)
12:47.13*** join/#elinux risca (~risca@f-static-78-70-87-29.business.telia.com)
12:52.43*** join/#elinux m4t (matt@theorize.org)
13:00.06*** join/#elinux m4t (matt@theorize.org)
16:00.12*** join/#elinux GPSFan (~kenm@64.92.145.112)
16:18.40*** join/#elinux djerome (~djerome@ip24-251-139-203.ph.ph.cox.net)
16:54.39*** join/#elinux TimRiker (~TimRiker@bzflag/projectlead/TimRiker)
16:54.39*** mode/#elinux [+o TimRiker] by ChanServ
17:38.46*** join/#elinux rejser (~Philip@h121n2-m-sp-gr1.ias.bredband.telia.com)
18:15.39*** join/#elinux Russ (foobar@ip68-106-254-4.ph.ph.cox.net)
18:15.39*** mode/#elinux [+o Russ] by ChanServ
20:56.09*** join/#elinux risca (~risca@m83-189-130-56.cust.tele2.se)
21:37.52*** join/#elinux risca (~risca@m90-129-34-56.cust.tele2.se)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.