ssh'ing to my openwrt
(ver. 10.03.1-RC6) shows that there is something wrong with its dns server:
root@OpenWrt:~# nslookup starkill
Server: 127.0.0.1
Address 1: 127.0.0.1 localhost.
nslookup: can't resolve 'starkill': Name or service not known
whereas,
root@OpenWrt:~# nslookup starkill.skails.home
Server: 127.0.0.1
Address 1: 127.0.0.1 localhost.
Name: starkill.skails.home
Address 1: 192.168.112.138 starkill.skails.home
As you can see the local dns server (dnsmasq) of openwrt cannot resolve non-FQDN hostnames. Appending the domain of my intranet resolves this issue, but does not work for me:
Since I have a dns server running in my intranet, I would like to at least have openwrt's dnsmasq consult my primary dns server.
so I checked the web-config over and over but couldn't figure out what is wrong or missing.
Then I checked the file /etc/config/network
, along with the manual.
the file initially looked like:
[...]
config 'interface' 'lan'
option 'type' 'bridge'
option 'ifname' 'eth0.0'
option '_orig_ifname' 'eth0.0 wl0'
option '_orig_bridge' 'true'
option 'proto' 'static'
option 'ipaddr' '192.168.112.253'
option 'netmask' '255.255.255.0'
option 'gateway' '192.168.112.112'
option 'broadcast' '192.168.112.255'
option 'stp' '1'
list 'dns' '192.168.112.112'
[...]
there is a "list dns ", inserted by the web-config which does not look like the usual "option " that I would expect to see. so i tried that
option 'dns' '192.168.112.112'
I also tried the "dns-search" option , in every way possible
option 'dns-search' 'skails.home'
list 'dns-search' 'skails.home.'
everytime I restarted the network with /etc/init.d/network reload
.
the dns-search clauses could not be parsed so I had to remove them.
you'll notice I show you the "lan" interface entry above. The reason is that I use my WRT54G as an access point only. I do not utilize the WAN interface, but rather one of the 4 LAN ethernet interfaces (which is connected to the rest of my intranet, and where internet gateway lies) and basically use the antennas of my unit to provide access to intranet and internet for wifi devices.
anyhow, trying to alter /etc/config/network did not yield the expected result and I still cannot resolve non-FQDN hostnames.
What is more, I cannot even do the resolving when I explicitly suggest a nameserver, either through /etc/resolv.conf
, or directly with nslookup
:
root@OpenWrt:~# nslookup starkill 192.168.112.112
Server: 192.168.112.112
Address 1: 192.168.112.112 stargaze.skails.home
nslookup: can't resolve 'starkill': Name or service not known
At this point I am lost. what am I missing here?