Jump to content

Disable DHCP and/or DNS


Dave-ee Jones

Recommended Posts

Hoi!

So, for the sake of theoretical scenarios, how would one disable DHCP and/or DNS? I believe they both run under 'dnsmasq' which means if I disabled DHCP by stopping 'dnsmasq' I would also kill DNS. I want to be able to kill one or the other, or both. Just to be annoying. :)

Anyone know how to do this? I can't find a boolean value in the configs that allow you to turn off DNS/DHCP and then restart the 'dnsmasq' service.

Also, if I restarted the PS after making these changes (via UCI I would presume..) will they revert back to the original configuration (which is what I want just in case something breaks).

Any help is appreciated! Cheers.

Edited by Dave-ee Jones
Link to comment
Share on other sites

  • 1 month later...

I apologize if I'm posting at the wrong place. But Dave-ee Jones seems to have dealt with something related to this in the past.

Is it possible to set a static IP or request a preferred IP from the DHCP server, for the squirrel, when it is on switch 3 mode?

I've been trying to set it here --

 

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option type 'bridge'
        option proto 'dhcp'
        option ifname 'eth0 eth1'

 

-- changing the proto to static an setting the ipaddr value and gateway or jsut adding a ipaddr '192.xxx.xxx.x" under the option proto 'dhcp'

 

My problem is that when i run /etc/init.d/network reload or restar. The vpn connection freezes and all i can do is manually reboot the squirrel.

 

Link to comment
Share on other sites

That's okay, it's not entirely off topic :)

You can change the IP of the PS, but if you're running a VPN you will probably need to stop the OpenVPN service, restart the network and then start the OpenVPN service again.

uci set network.lan.ipaddr="10.0.0.1"
uci commit
/etc/init.d/openvpn stop
/etc/init.d/network reload
sleep 10
# Might need to reload the config here, but I don't think it's required
/etc/init.d/openvpn start

I haven't actually played around with creating more interface configurations, but it does sound interesting so I will have to look into it..

Thanks for the input!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...