DNS nexcloud problem

Hi, has anyone encountered a problem that after entering dns in resolv.conf the page stopped working? I have one with #nexcloud. I changed the server addressing from 192.168.0.10> 10.60.1.6 and without the dns server entered, the application works fine and when I enter dns, the page does not load or it goes down so about 10-15 minutes, when I go to ip, sometimes they had not. Do you change your ip somewhere else in the apach? On VH I have to listen on all IP addresses. I’ve been struggling with it for 10-12 hours :confused:
Oh, no matter what DNS I enter, the situation is always the same.
Works fine without DNS.

What OS / Distribution are you using? Can you post the exact contents of your resolv.conf file.

Also why did you switch to another the subnet? Is the new subnet behind a firewall? Maybe DNS traffic to the internet is blocked from that subnet? Can you ping the DNS server you added to the resolv.conf?

If you cahanged the IP address of your server and if you are using it as a ServerName in your Apache VirtualHost, you probably have to change it there too, yes.

What is VH-I???

OS / Distribution - Debian 11
Can you post the exact contents of your resolv.conf file

nameserver 1.1.1.1

I switched because I had to separate the user network from the server network.
The network is behind a firewall and everything is allowed on it.
Yes 1.1.1.1 server can ping.

Here I have ServerName indicated in apache as localhost

Virtualhost apache exactly <VirtualHost *: 80>

Just to be sure that you actualy can pass DNS requests to 1.1.1.1, please show the output of:

dig google.com @1.1.1.1

If this is working, there is probably some other problem with your network configuration…

Are you using a minimal installation of Debain or did you install a desktop environment? If you are using a DE, your network settings are most likely controled by NetworkManager and will probably be overwriten if you change them from the command line.

How is your network configured on this machine? DHCP or static? Please post the contents of:

/etc/network/interfaces

What’s the output of:

ip a
1 Like

When dns is entered in resolv.conf
image

When there is no entry in resolv.conf
image

yes i use minimal installation


# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug ens18
iface ens18 inet static
        address 10.60.1.6
        netmask 255.255.255.0
        gateway 10.60.1.1
        dns-nameserver 1.1.1.1
        dns-nameserver 1.0.0.1


root@NextSzkola:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group defaul                                                                                       t qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP g                                                                                       roup default qlen 1000
    link/ether 00:a0:98:3d:74:4a brd ff:ff:ff:ff:ff:ff
    altname enp0s18
    inet 10.60.1.6/24 brd 10.60.1.255 scope global ens18
       valid_lft forever preferred_lft forever
    inet6 fe80::2a0:98ff:fe3d:744a/64 scope link
       valid_lft forever preferred_lft forever

And in nexcloud it says "The server has no active connection to the Internet. Many connections cannot be made. This means that some features such as external storage, update notifications or installation of third party applications will not work. Remote access to files and sending e-mail notifications also may not work. Please connect to the Internet from this server to use all functions. "

Nextcloud works with these entries
/etc/resolv.conf


#nameserver 1.1.1.1
#nameserver 1.0.0.1
#nameserver 127.0.0.1


and without these it doesn’t work

nameserver 1.1.1.1
nameserver 1.0.0.1
nameserver 127.0.0.1

Is there a local DNS server / forwarder like bind9 or dnsmaq running on your server? You can check with the following command:

netstat -tunlp | grep :53

If so, you have to add the external DNS servers to the config of that DNS server. Or you could uninstall it, and then remove the entry for 127.0.0.1 from /etc/resolv.conf.

bing9 is definitely not a dnsmaq i am not sure

Seems like systemd-resolved is running. I’m not using it on my servers but this thread on stack exchange seems to have a lot of useful info and links in it:

https://unix.stackexchange.com/questions/442598/how-to-configure-systemd-resolved-and-systemd-networkd-to-use-local-dns-server-f

And here are the official wiki article about networkd and a link to the manpage of resolved:

https://wiki.debian.org/SystemdNetworkd

https://manpages.debian.org/bullseye/systemd/systemd-resolved.service.8.en.html

Hope this helps…

I disabled systemd-resolved and added a dns entry in resolv.conf and unfortunately nexcloud still does not work. I also don’t have the network Manager installed. The files mentioned in this link are also absent, i.e. /etc/systemd/network/*.network

I am still surprised that such problems appeared after changing the ip address

Did you reboot the server after you disabled systemd-resolved? You probably also have have to remove 127.0.0.1 from the resolv.conf. Other than that I’m running out of ideas…

Can’t really say, because I don’t use static IP configurations for most of my systems and neither do I use external DNS resolvers. Most of my systems are getting their IPs via static DHCP leases or via cloud-int and for DNS I’m using Unbound on my pfSense box.

yes i reset and removed 127.0.0.1

Thank you for your help anyway, maybe I can think of something.