goolee-jch / rt-n56u

Automatically exported from code.google.com/p/rt-n56u
0 stars 0 forks source link

resolv.conf overites after every reboot #512

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I added some hosts to /etc/storage/hosts
but they do not resolves until I add "nameserver 127.0.0.1" to resolv.conf 
before nameservers which I received from provider.
As I understand every time I reboot router and receive DNS servers from 
provider the file resolv.conf overwrites. And I need to add line "nameserver 
127.0.0.1" again. How can I add hosts permanently?

I am using version 1.1.2.3-010.

And small question: if I install BIND from optware, do I need to turn off 
dnsmasq? if yes how can I turn off dns functionality of dnsmasq and leave dhcp 
server?

Thanks for your work!  

Original issue reported on code.google.com by Sanniko...@gmail.com on 6 Oct 2012 at 1:08

GoogleCodeExporter commented 8 years ago
OK. I found it! Configuration for local domain:

cat /etc/storage/dnsmasq.conf
...
# Add local-only domains here, queries in these domains are answered
# from /etc/hosts or DHCP only.
local=/local.max/

# Return an MX record named "local.max" with target
# mail.local.max and preference 10
mx-host=local.max,mail.local.max,10

cat /etc/storage/hosts
127.0.0.1 localhost.localdomain localhost
192.168.1.1 router.local.max    router
192.168.1.1 storage.local.max   storage
192.168.1.1 pbx.local.max       pbx
192.168.1.1 www.local.max       www
192.168.1.1 ftp.local.max       ftp
192.168.1.1 mail.local.max      mail
192.168.1.4 tv.local.max        tv
192.168.1.9 netbook.local.max   netbook

Anyway router itself (from cli) do not resolve these hosts ;)

Original comment by Sanniko...@gmail.com on 7 Oct 2012 at 6:32

GoogleCodeExporter commented 8 years ago

Original comment by d...@soulblader.com on 30 Jul 2014 at 1:00