OpenWrt Forum Archive

Topic: How to STOP the dns and dhcp functions?

The content of this topic has been archived on 3 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

OK, so I have a dhcp server already - now how do I stop the DHCP stuff from functioning on the linksys box?  If I remove /etc/init.d/S50dnsmasq then something is still running and handing out addresses! (I grepped through the code but can't figure out how this is getting started up?)

So now I forceably kill any process like dnsmasq or udhcpc.  Now on my wireless laptop I don't get handed out any dhcp settings despite the linksys being in a default bridged config and hence I would expect it to be forwarding dhcp packets across the bridge?  It gets worse in that if I manually configure the settings for IP/dns then although I can ping things across the linksys bridge I can't make DNS work?  Is something blocking it?

Is there some setting needed to put the linksys into a dhcp passthrough perhaps?  (bridge not totally bridging).  Also any ideas why dns on the wireless side fails entirely once I kill the dnsmasq process...?

Perhaps my testing is flawed, but what is the process supposed to be...?

OK, cancel that.  Turned out to be an interaction between Openwrt and my other dhcp server.  Seems that if the other dhcp server detects a second dhcp server it disables itself, that and some residual issues with the DNS being set to point to the linksys box were making it look like something very peculiar was occuring

Basically delete /etc/init.d/S50dnsmasq to turn off local DHCP server

ewildgoose wrote:

Basically delete /etc/init.d/S50dnsmasq to turn off local DHCP server

....or do it the nice way and rename the file to K50dnsmasq

I prefer chmod -x /etc/init.d/S50dnsmasq

A cleaner way is to just remove the dnsmasq package with:

ipkg remove dnsmasq


After all space is a premium with an embedded OS and every byte counts no matter how small amount it is.  You can always reinstall it if later required.

DHCP should be passed across the bridge by the default iptable rules and DNS will be looked up where every the host machine requesting the DNS is pointing to for its DNS server.  From the information above it looks like the host machines are still configured with the WRT IP address for DNS.

(Last edited by zaphod on 1 Oct 2005, 23:37)

kleptophobiac wrote:

I prefer chmod -x /etc/init.d/S50dnsmasq

And personally I prefer renaming the file to start with a lower-case "s", as in "s50dnsmasq".  That way if I ever want the daemon back, I just rename it back to the original name.

I suppose we all have our preferences, eh!

Kaldek

The discussion might have continued from here.