[solved] No DNS in resolve.conf when IP/DNS is set static

  • Hello,


    I'm new in forum,, and I'd like to say hello :)
    I'm using OMV a while ago, and in last week I have installed Kralizec.
    Everything worked perfectly when OMV get IP from DHCP. When I set static IP and /DNS in webgui, resolveconf don't input information in /etc/resolv.conf
    I've tried to do:

    Code
    dpkg-reconfigure resolvconf


    But it's don't give me any effects. When I put in file /etc/resolv.conf manually information ex.:

    Code
    nameserver 8.8.8.8


    It's working till next reboot ofc. :)
    I have Realtek network card inside:

    Code
    01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)


    And I wasn't have installed proprietary firmware for it, so I installed firmware-realtek, bot after reboot it still not working.
    Also I notice that, configuration in /etc/network/interfaces is set properly, I mean "dns-nameservers" are there (same as in tab DNS servers in WebGui) when I set static IP, but it is not transferred to /etc/resolv.conf.
    When I set DHCP it transfer information to /etc/resolv.conf from my DHCP server (router).

    • Offizieller Beitrag

    Did you set the settings in the dns server tab?

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • As I wrote:

    Zitat

    Also I notice that, configuration in /etc/network/interfaces is set properly, I mean "dns-nameservers" are there (same as in tab DNS servers in WebGui) when I set static IP, but it is not transferred to /etc/resolv.conf.


    Yes, I've done it. I rebooted server after changes also.

    • Offizieller Beitrag

    What is the output of:


    Code
    cat /etc/openmediavault/config.xml | awk '/<interfaces>/,/<\/interfaces>/'
    cat /etc/openmediavault/config.xml | awk '/<dnsnameservers>/,/<\/dnsnameservers>/'

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Zitat von "ryecoaaron"

    What is the output of:


    Code
    cat /etc/openmediavault/config.xml | awk '/<interfaces>/,/<\/interfaces>/'
    cat /etc/openmediavault/config.xml | awk '/<dnsnameservers>/,/<\/dnsnameservers>/'


    FYI
    I'm right now using DHCP, not static settings. Should I switch to static settings? At the moment DNS working as expected.


    cat /etc/openmediavault/config.xml | awk '/<interfaces>/,/<\/interfaces>/'


    cat /etc/openmediavault/config.xml | awk '/<dnsnameservers>/,/<\/dnsnameservers>/'

    Code
    <dnsnameservers>192.168.1.1 8.8.8.8</dnsnameservers>
    • Offizieller Beitrag

    I would need the output when it is set to static ip.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I set static IP + DNS, after that reboot, and:
    cat /etc/openmediavault/config.xml | awk '/<interfaces>/,/<\/interfaces>/'


    cat /etc/openmediavault/config.xml | awk '/<dnsnameservers>/,/<\/dnsnameservers>/'

    Code
    <dnsnameservers>192.168.1.1 8.8.8.8</dnsnameservers>


    cat /etc/resolv.conf

    Code
    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN


    ping/update/resolving DNS not working.


    In section DNS server are:
    Primary: 192.168.1.1
    Secondary: 8.8.8.8


    cat /etc/network/interfaces

    • Offizieller Beitrag

    What is the output of:
    dpkg -l | grep openmediavault

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • dpkg -l | grep openmediavault

    Code
    ii  openmediavault                     1.0.8                         all          Open network attached storage solution
    ii  openmediavault-keyring             0.3                           all          GnuPG archive keys of the OpenMediaVault archive
    ii  openmediavault-mysql               1.0.5.4                       all          MySQL plugin for OpenMediaVault
    ii  openmediavault-nginx               1.0.9                         all          Nginx plugin for OpenMediaVault.
    ii  openmediavault-omvextrasorg        1.0.2                         all          OMV-Extras.org Package Repositories for OpenMediaVault
    ii  openmediavault-owncloud            1.1.1                         all          OpenMediaVault ownCloud plugin
    • Offizieller Beitrag

    I assume you are clicking on Apply??


    Try as root:


    omv-mkconf interfaces
    cat /etc/resolv.conf

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Yes :) I've also deleted it and save & apply & reboot. After that set it and reboot... No effects.
    omv-mkconf interfaces - done


    cat /etc/resolv.conf

    Code
    # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
    #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN


    I know that i can put inside /etc/resolv.conf information about nameserver and set permission to read only, probably it will work, but it isn't a solution :)

    • Offizieller Beitrag

    Put IPv6 on manual and save/apply. Then post:


    cat /etc/network/interfaces

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • cat /etc/network/interfaces

    • Offizieller Beitrag

    The following two lines shouldn't be in there. Not sure why they are. Are you adding anything in options?


    Code
    post-up /sbin/ifconfig $IFACE mtu 0
    dns-nameservers 192.168.1.1 8.8.8.8

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    You could setting the mtu to 1500 and save/apply. If that doesn't work, I would remove those lines and reboot. Let me know if they come back.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I've change MTU (nothing change), remove those 2 lines and reboot (I leave mtu 1500).
    After that... :) I'm unable to connect by SSH :)
    But Web working, and I've checked DNS, not resolving (tried to update system).
    I switch back to DHCP atm, after reboot, SSH/DNS working.

    • Offizieller Beitrag

    I guess you will need to post a bug here. I can't duplicate it on my systems.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I finally got it. I don't know why exactly it was needed, but:
    In section Network/Interfaces I removed eth0, and rebooted.
    After that as I assumed it should be recreated , but interface won't go UP.
    So I connected server to monitor and manually set it up and set dhclient:

    Code
    ifconfig eth0 up
    dhclient eth0


    At the end I logged on to web interface, and set static IP, and reboot afterwards.
    Everything working as need to be expected :)


    and one more thing, as you said there isn't those 2 lines in /etc/network/interface


    GNU nano 2.2.6 File: /etc/network/interfaces


    Thanks for help :)
    btw. I've changed post name, because I cannot add "[solved]" to it, and I thing now it is more clearly :)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!