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.53 | krzee | can 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.22 | krzee | i open it without -d in 1 window, then in another i nslookup thebox 127.0.0.1 |
05:06.37 | krzee | and the windows running dnsd just shows no queries |
05:06.47 | krzee | -bash-3.2# busybox dnsd |
05:06.48 | krzee | Accepting UDP packets on 0.0.0.0:53 |
05:06.48 | krzee | dnsd: no queries |
05:07.33 | krzee | netstat -ln shows it listening correctly, but nmap from another computer does now show port 53 listening |
05:15.16 | Russ | you can't reliably use a tool like nmap to probe udp |
05:15.26 | Russ | its stateless |
05:15.38 | Russ | use tcpdump and/or wireshark to watch packets |
05:15.41 | krzee | ok |
05:15.47 | krzee | i cant |
05:15.54 | Russ | ...thats odd |
05:16.03 | krzee | its a voip phone, doesnt have tcpdump |
05:16.22 | Russ | but the network cable is plugged into a...? |
05:16.25 | krzee | unless you mean looking for return packets |
05:16.49 | Russ | make sure packets are going out to the phone first |
05:16.54 | krzee | but that will only tell me if its sending back |
05:17.01 | krzee | the phone should be initiating the traffic |
05:17.04 | krzee | to itself |
05:17.10 | Russ | wah? |
05:17.14 | krzee | hence why i cant tcpdump |
05:17.28 | Russ | then just put the hosts in /etc/hosts and be done |
05:17.39 | krzee | did, the phone doesnt honor it |
05:18.05 | krzee | http://forum.snom.com/index.php?showtopic=8488 |
05:18.28 | krzee | Hi krzee, |
05:18.28 | krzee | <PROTECTED> |
05:18.28 | krzee | <PROTECTED> |
05:18.57 | krzee | and i see it has busybox which has dnsd |
05:19.11 | krzee | so i found the sample file http://trac.mondorescue.org/browser/trunk/mindi-busybox/examples/dnsd.conf?order=name |
05:19.25 | krzee | but even with that EXACT file it wont resolve |
05:19.41 | krzee | and it seems like its timing out |
05:19.59 | krzee | takes a long time to not resolv it, much longer than localhost should |
05:22.12 | krzee | so ya, i have no idea what dnsd wants from me, starting to wonder if i can dnsmasq onto this thing |
05:22.31 | krzee | can get* |
05:25.52 | krzee | its not just "thebox", it doesnt resolve anything |
05:26.57 | Russ | you can use whatever resolve order you want |
05:27.11 | Russ | see: nsswitch.conf |
05:27.34 | krzee | yes, but the phone software doesnt care / honor that |
05:27.50 | Russ | so it doesn't bother using libc? |
05:27.52 | krzee | nsswitch is configured for hosts, and hosts works for ping / nslookup |
05:28.01 | krzee | right, thats in the above forum link |
05:28.04 | Russ | who wrote this software so I can avoid them |
05:28.22 | krzee | snom |
05:28.39 | krzee | "Even if you edit the /etc/hosts the phone will resolute hostnames by using DNS - this is the wanted behaviour, no bug." |
05:28.39 | Russ | strace snom and dnsd, watch for the network traffic |
05:29.13 | Russ | "wanted behaviour", more like, "we don't understand this 'unix' thing and don't care" |
05:29.20 | krzee | exactly |
05:29.28 | krzee | i responded similarly |
05:29.31 | Russ | "wanted behaviour" is spelled out in nsswitch.conf |
05:29.37 | krzee | i think you'll like my response |
05:29.45 | krzee | yes, i more or less told them that =] |
05:29.49 | Russ | anyway, anytime I have a problem like this my go to tool is strace |
05:29.57 | krzee | http://forum.snom.com/index.php?showtopic=8488 |
05:30.41 | krzee | ok it does recieve |
05:31.14 | krzee | recvfrom(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.15 | krzee | write(2, "dnsd: no queries\n"..., 17dnsd: no queries |
05:31.15 | krzee | ) = 17 |
05:31.42 | krzee | and repeats |
05:31.56 | Russ | next step, change the string output format of strace and up the length to capture the whole packet |
05:32.17 | Russ | get that into a format wireshark can understand and let it decode the dns request for you |
05:32.34 | Russ | or look at the busybox source and see under what conditions it says "no queries" |
05:34.54 | Russ | or change the dns server to be external (any ip) so you can grab it from the wire |
05:38.17 | krzee | head = (struct dns_head *)buf; |
05:38.18 | krzee | if (head->nquer == 0) |
05:38.18 | krzee | eret("no queries"); |
05:38.40 | Russ | ya, grab it from the wire and see what's up |
05:38.51 | krzee | grab the response? |
05:39.21 | krzee | like the packets where it responds with its "no queries" |
05:39.56 | Russ | grab the request |
05:40.13 | krzee | isnt the request just like any other nslookup request? |
05:40.26 | Russ | it might not be |
05:40.36 | Russ | if you send a query from a normal machine does it work? |
05:40.56 | Russ | they seem to have their own handcrafted dns library, so.... |
05:41.20 | krzee | no, does the same thing |
05:41.28 | krzee | recvfrom(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.28 | krzee | write(2, "dnsd: no queries\n"..., 17dnsd: no queries |
05:41.28 | krzee | ) = 17 |
05:42.10 | Russ | then your configuration is likely fubar |
05:42.41 | krzee | right, 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.09 | krzee | i mean of course i tried mine first, but figured ild settle for the exact example |
05:44.19 | Russ | what host are you trying to resolve? |
05:44.38 | krzee | i explain it in my forum post |
05:44.49 | Russ | are you pinging 'thebox'? |
05:45.06 | krzee | ahh, ya nslookup thebox |
05:45.15 | krzee | just because "thebox" is the example config |
05:45.35 | krzee | http://trac.mondorescue.org/browser/trunk/mindi-busybox/examples/dnsd.conf |
05:48.36 | Russ | wfm |
05:48.48 | Russ | russ@russ-laptop:~/src/busybox (master) $ sudo ./busybox dnsd -c examples/dnsd.conf -v |
05:48.59 | Russ | russ@russ-laptop:~/src/busybox (master) $ nslookup thebox localhost |
05:49.01 | Russ | [...] |
05:49.06 | Russ | Address: 192.168.1.5 |
05:49.37 | krzee | shit so its just me |
05:50.15 | Russ | which version of bb? |
05:50.29 | krzee | BusyBox v1.8.2 (2009-11-17 16:28:31 CET) multi-call binary |
05:50.57 | krzee | hah -v wasnt in the usage, i hadnt tried that before |
05:54.12 | Russ | 1_8_2 also wfm |
05:57.00 | krzee | thats really fubar |
05:57.03 | krzee | =/ |
05:57.14 | krzee | so something is broken in this firmware |
05:57.27 | Russ | 'russ@russ-laptop:~/src/busybox ((1_8_2)) $ sudo qemu-arm ./busybox dnsd -c examples/dnsd.conf -v' works too :p |
05:57.29 | krzee | maybe i should downgrade firmwares and see if i can get to a working install |
05:57.49 | Russ | how many addresses does the dns server need to resolve? |
05:57.51 | krzee | haha well played |
05:57.54 | krzee | 1 |
05:58.00 | krzee | but it will change |
05:58.17 | krzee | depending which randomly selected vpn it gets into |
05:58.18 | Russ | my idea would just be a dumb dns reflector |
05:58.40 | Russ | any request gets the same prepackaged response |
05:59.48 | krzee | the 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.02 | krzee | oh yes, that would work |
06:00.16 | krzee | as long as it were running on the phone |
06:00.24 | krzee | so that it could be changed by the vpn client |
06:01.03 | krzee | the device will ONLY need to resolve hosts to a single ip |
06:02.14 | krzee | (once running whatever the script will call) |
06:30.44 | krzee | thank you, your "wfm"'s let me know i was chasing the wrong thing |
06:31.06 | krzee | i 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) |