allow changing DNS when using DHCP

  • When i use DHCP and then try to change the DNS it says its forbidden, which is a bit odd. Unfortunately, in my country we are sometimes forced to use a different DNS server than the one that is sent by the proprietary router (where nothing like dns is configurable).

  • Go to Best Answer
  • Code
    connmanctl config <service_name> --nameservers 8.8.8.8 1.1.1.1

    The GUI is probably coded around the concept of mutually exclusive DHCP or Manual connection. See if you can set it from the CLI?

  • i can set it from cli, yes, but cli is not an option for "regular" users. i can do that for myself, but when my little sis asks me "how can i do that?" (because she gets blocked because or her ISP), then she has 0 chance to change anything thats not changable from UI.

    There are RFCs out there that mention that DHCP DNS settings must not be forced and user overrides should be accepted (something like that...), so imo this would be a reasonable and nice feature

  • i can set it from cli, yes, but cli is not an option for "regular" users. i can do that for myself, but when my little sis asks me "how can i do that?" (because she gets blocked because or her ISP), then she has 0 chance to change anything thats not changeable from UI.

    Skeeve
    October 26, 2025 at 6:49 PM
  • When i use DHCP and then try to change the DNS it says its forbidden, which is a bit odd. Unfortunately, in my country we are sometimes forced to use a different DNS server than the one that is sent by the proprietary router (where nothing like dns is configurable).

    Hi, Do you strictly need to use DHCP at that device? I'm thinking about, you could to start to configure the network with DHCP. After it's connected, change to "manual". The values obtained by DHCP will remain, and you change only the parameters that you want (DNS server). Maybe worth a try...

  • feels like a joke to me somehow... so its blocked because its blocked, which makes no sense at all to me - even the rfc for dhcp states dns should be overwritable by the user - the only thing thats blocking is the UI, for no reason at all, just because it can be blocked? therefore people that are not familiar with networking but must use a different dns are doomed when they dont know how to configure their network with cli or manually... or not to use libreelec at all. i got it. i give up.


    VLouis thanks, thats a workaround that might probably work. but i am wondering why this workaround is required at all. but guess i dont understand this "we must block manual dns overwrites because we can" mentality.

  • The LE settings add-on has long history of "if it works, don't fix it" style maintenance because it's all Python code that nobody on current project staff understands; and in that context you'll argue "but it doesn't work" and I'd argue it does for 99.9999% of our users and Dr. Spock's logic quote "the needs of the many outweigh the needs of the few" applies. There's also a general desire to keep interfaces simple and supporting all possible configuration options generally adds complication.

    That said, the codebase is all GPLv2 and open-source so there is nothing to stop someone submitting the technical changes that implement the feature you desire. It's just unlikely to be someone on staff as we have learned to avoid that Python juju.

  • VLouis thanks, thats a workaround that might probably work.

    "Probably"? Why you didn't tried? It would take only few minutes, easy to do, and needs to be done only once. Easy and done. Why this "cruciade" for GUI modification to be included special settings? Especially when could be exist an easy workaround.

    ... or not to use libreelec at all. i got it. i give up.

    That's only up to you...

  • this "we must block manual dns overwrites because we can" mentality.

    You got it totally wrong it is not LE that sets DHCP on or off all ISPs or self bought modems/routers have DHCP as default ON it is up to the user to set that in modem/router off/on. LE has nothing to do with that if you do not want to use it set it off in modem/router and modify /etc/resolv.conf

  • "Probably"? Why you didn't tried?

    Because my sister asked me, i live about 500km away. I will not drive 500km to test that. Also, she does not need it anymore, she used a laptop where she was able to easily change DNS settings.

    Why this "cruciade" for GUI modification to be included special settings?

    All applications i know, really all, allow changing dns, even when they use DHCP, without "hacking" around.

    That's only up to you...

    No, to my sister. She already abandoned libreelec and uses now her laptop.

    Seems like i can only quote 4 statements, or i am doing something wrong, so i do it "my way"

    Doemela
    > LE has nothing to do with that

    thats wrong. LE resp. the UI blocks changes when someone uses DHCP. I want DHCP. But i also want to change the DNS server. Like on all other systems i know. Imagine windows or linux blocking dns changes because one uses DHCP :D

    This will become an endless discussion.

  • The only solution I can think of to bypass DHCP is a small background script to bypass it. Create a file named autostart.sh for your sister and send it to her. Here is the exact code needed. Copy this block of text:

    Instructions for your Sister. To install this script, you will need a computer connected to the same home network as the LibreELEC device.

    • Open File Explorer on your computer.
    • In the address bar at the very top, type your LibreELEC network path and press Enter:
      \\YOUR_LIBREELEC_IP_ADDRESS\ (Example: \\192.168.1.15\)
    • Open the Configfiles folder.
    • If you cannot see it, enable "Hidden items" in the View settings of Windows.
    • Copy autostart.sh to that Config folder.
    • Restart LibreELEC.
  • again, this was a one-shot. If this would be a problem that occurs all the time for my sister, i would fix it myself. I use 802.1x with conman on my device - i know how to work with the terminal, but this was my sister and she needed it. now she doesnt need it anymore (and will use her laptop in the future), but i am sure there is some people out there that will fall in the same situation and then can not continue. just because its blocked in the UI. the logic exists, one can change dns when not using dhcp, so imho its only a "we block coz we can", because the dialogs etc. are there. but i did not check the code.