Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

askthedev.com Logo askthedev.com Logo
Sign InSign Up

askthedev.com

Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Ubuntu
  • Python
  • JavaScript
  • Linux
  • Git
  • Windows
  • HTML
  • SQL
  • AWS
  • Docker
  • Kubernetes
Home/ Questions/Q 15969
Next
In Process

askthedev.com Latest Questions

Asked: September 27, 20242024-09-27T08:36:12+05:30 2024-09-27T08:36:12+05:30In: Ubuntu

I’m having trouble with configuring DNS nameservers in Netplan on my Ubuntu system. Despite following the usual steps and modifying the YAML configuration file, the changes do not seem to take effect. Can anyone guide me on how to resolve this issue and ensure that the DNS settings are correctly applied?

anonymous user

I’m in a bit of a bind here and could really use some help from the community. I’ve been trying to set up DNS nameservers on my Ubuntu system using Netplan, and honestly, it’s turning into quite the headache. I thought I was following all the steps correctly, but it doesn’t seem like my changes are actually taking effect.

So here’s the situation: I modified the YAML configuration file as I was instructed, adding the nameservers under the appropriate network interface. Everything looks good in the file, and I even double-checked for proper indentation since I know that YAML can be pretty picky about that. After saving the changes, I ran `sudo netplan apply`, but it feels like nothing has changed.

Here’s what my configuration looks like:

“`yaml
network:
version: 2
ethernets:
ens33:
dhcp4: true
nameservers:
addresses:
– 8.8.8.8
– 8.8.4.4
“`

I thought specifying Google’s public DNS servers would do the trick. But when I check my network settings, it still shows the old DNS servers. I’ve even rebooted the system just in case, but that didn’t help either.

I tried looking for logs to see if there were any error messages when applying the changes, but I didn’t find anything out of the ordinary. I’m kind of stuck here. Are there any other commands or tools in Ubuntu that can help verify if my settings are being applied correctly? Or maybe I’ve missed a step in the process?

I’m not the most seasoned Linux user, so I would appreciate any straightforward guidance. I’m eager to learn and fix this! If anyone has dealt with a similar issue, or if you have any troubleshooting tips, that would be super helpful. Thanks!

  • 0
  • 0
  • 2 2 Answers
  • 0 Followers
  • 0
Share
  • Facebook

    Leave an answer
    Cancel reply

    You must login to add an answer.

    Continue with Google
    or use

    Forgot Password?

    Need An Account, Sign Up Here
    Continue with Google

    2 Answers

    • Voted
    • Oldest
    • Recent
    1. anonymous user
      2024-09-27T08:36:13+05:30Added an answer on September 27, 2024 at 8:36 am



      DNS Nameserver Help

      It sounds like you’re having a tough time with your DNS settings on Ubuntu using Netplan! No worries, we can figure this out together.

      First off, your configuration file looks pretty solid at first glance! Just to double-check, remember that indentation in YAML is super important, and it seems like you have that covered already. But if it’s still not working, here are a few things you can try:

      • Check the Active Configuration: After running `sudo netplan apply`, you can check if the configurations have been set properly by running:
        systemd-resolve --status
        or
        cat /etc/resolv.conf
        This should show you the current DNS settings.
      • Try Disabling DHCP: Sometimes, if DHCP is still assigning DNS servers, it might override what you set in your Netplan config. You can try disabling DHCP by changing:
                    dhcp4: true
                    

        to:

                    dhcp4: no
                    

        and then set a static IP configuration along with the nameservers.

      • Check for NetworkManager Interference: If you’re also using NetworkManager, it might be conflicting with Netplan. You can check if the interface is managed by NetworkManager by running:
        nmcli device status
        If it is managed, you might need to configure it through NetworkManager instead.
      • Look at System Logs: If you want to see logs related to network configuration, you can check:
        journalctl -u systemd-networkd
        This might give you some clues if there are any errors happening in the background.

      After making any changes, make sure you run `sudo netplan apply` again! If you’re still stuck, don’t hesitate to share the output of the commands above. Good luck, and you’re doing great for someone just starting out!


        • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    2. anonymous user
      2024-09-27T08:36:14+05:30Added an answer on September 27, 2024 at 8:36 am

      It seems like you’re on the right track with your YAML configuration for setting up DNS nameservers on your Ubuntu system. However, there are a few things you could check to troubleshoot why your changes aren’t taking effect. First, ensure that the YAML file is located in the correct directory, typically found at `/etc/netplan/`. After you run `sudo netplan apply`, it’s a good idea to check the status of your network interface and the applied configuration by running `ip a` and `systemd-resolve –status`. These commands can help you verify if the new nameservers are being recognized by the system. Additionally, double-check your indentation in the YAML file; YAML is sensitive to space, and any misalignment could cause Netplan to ignore your settings.

      If everything appears to be in order and you’re still facing issues, consider using `netplan try` before applying the changes permanently. This command allows you to test your configuration and automatically revert to the previous settings if something goes wrong. Furthermore, check if the `resolv.conf` file located at `/run/systemd/resolve/resolv.conf` has been updated to reflect your new DNS settings. If you see the old servers there, it might indicate that there’s some other service, such as NetworkManager, overriding your configurations. In that case, you may need to stop that service or adjust its settings. With these steps in mind, you should be better positioned to solve the issue and enhance your understanding of networking in Ubuntu.

        • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    Related Questions

    • I'm having trouble installing the NVIDIA Quadro M2000M driver on Ubuntu 24.04.1 LTS with the current kernel. Can anyone provide guidance or solutions to this issue?
    • What steps can I take to troubleshoot high usage of GNOME Shell in Ubuntu 24.04?
    • I recently performed a fresh installation of Ubuntu 24.04, and I've noticed that my RAM usage steadily increases over time until my system becomes unresponsive. Has anyone experienced this issue ...
    • How can I resolve the "unknown filesystem" error that leads me to the GRUB rescue prompt on my Ubuntu system?
    • I'm experiencing an issue with Ubuntu 24.04 where Nautilus fails to display the progress indicator when I'm copying large files or folders. Has anyone else encountered this problem, and what ...

    Sidebar

    Related Questions

    • I'm having trouble installing the NVIDIA Quadro M2000M driver on Ubuntu 24.04.1 LTS with the current kernel. Can anyone provide guidance or solutions to this ...

    • What steps can I take to troubleshoot high usage of GNOME Shell in Ubuntu 24.04?

    • I recently performed a fresh installation of Ubuntu 24.04, and I've noticed that my RAM usage steadily increases over time until my system becomes unresponsive. ...

    • How can I resolve the "unknown filesystem" error that leads me to the GRUB rescue prompt on my Ubuntu system?

    • I'm experiencing an issue with Ubuntu 24.04 where Nautilus fails to display the progress indicator when I'm copying large files or folders. Has anyone else ...

    • How can I configure a server running Ubuntu to bind specific IP addresses to two different network interfaces? I'm looking for guidance on how to ...

    • Is it possible to configure automatic login on Ubuntu MATE 24.04?

    • After upgrading from Ubuntu Studio 22.04 to 24.04.1, I lost all audio functionality. What steps can I take to diagnose and resolve this issue?

    • I am experiencing issues booting Ubuntu 22.04 LTS from a live USB. Despite following the usual procedures, the system fails to start. What steps can ...

    • I'm encountering a problem with my Expandrive key while trying to update my Ubuntu system. Has anyone else faced similar issues, and if so, what ...

    Recent Answers

    1. anonymous user on How do games using Havok manage rollback netcode without corrupting internal state during save/load operations?
    2. anonymous user on How do games using Havok manage rollback netcode without corrupting internal state during save/load operations?
    3. anonymous user on How can I efficiently determine line of sight between points in various 3D grid geometries without surface intersection?
    4. anonymous user on How can I efficiently determine line of sight between points in various 3D grid geometries without surface intersection?
    5. anonymous user on How can I update the server about my hotbar changes in a FabricMC mod?
    • Home
    • Learn Something
    • Ask a Question
    • Answer Unanswered Questions
    • Privacy Policy
    • Terms & Conditions

    © askthedev ❤️ All Rights Reserved

    Explore

    • Ubuntu
    • Python
    • JavaScript
    • Linux
    • Git
    • Windows
    • HTML
    • SQL
    • AWS
    • Docker
    • Kubernetes

    Insert/edit link

    Enter the destination URL

    Or link to existing content

      No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.