There is always the possibility that I haven't understood
fully, but...
Quote:
Originally Posted by shams
Debian wheezy...
|
This is the box that you are working with...it is running Debian Wheezy (which only really matters because we can call it 'the wheezy box' for convenience).
Quote:
Originally Posted by shams
Debian wheezy is connected with eth0 to the ADSL modem router, network manager is configured for dhcp and gets it's private ip from the router,
|
So the router is being the DHCP server (and, therefore, dnsmasq shouldn't be). NM is the client on the wheezy box, and that's all working.
Quote:
Originally Posted by shams
the network manager overrite the /etc/resolv.conf in every boot as
|
That is normal behaviour, but it should get put back to the previous state when you shut down.
Quote:
...with above resolv.conf dnsmasq cannot resolve the local host names for my web and mail server, for the dnsmasq to work properly the resolv.conf should have these 3 lines in order...
|
Well, that's a possibility, but maybe not the best one. A brief re-acquaintance with the man page suggests that using the 'additional hosts file' option gets you away from the problem of having stuff in resolv.conf overwritten by whatever feels that it would like to. I think that you want -H rather -h, but you could probably make -h work, too.
Quote:
Originally Posted by shams
To solve the problem i installed the packages resolvconf and add the above 3 lines to the /etc/resolvconf/resolv.conf.d/original but the resolvconf overrite the resolv.conf to only these two lines in every boot:
and the new problem is now cannot open the external web.
Can any one help how to configure the resolvconf that write the 3 lines to /etc/resolv.conf on every boot?
|
I don't see any reason that the original method plus the additional hosts file shouldn't work without any further messing about, although there are almost certainly other ways that you could get it working.
You might also choose to use some combination of -R (don't use resolv.conf at all) and -r (read the IPs of the upstream servers from the specified file), and that way other processes can trample all over resolv.conf and you won't bothered. If you do do this, however, I would recommend that you document what you are doing wherever someone subsequently messing with this might look; it could easily confuse them if resolve.conf isn't doing what is expected, and doubly embarrassing if the person turns out to be you.
You could alternatively use the -s switch, but reading the explanation makes my head hurt (slightly), but I think it would be an equally good method.
(And, from what I said earlier, it seems that you cannot want -F, but, from what I remember, provided that you don't uncomment any of the dhcp stuff, that issue need not come up, because the defaults do not enable the dhcp side of the server.)