You are not logged in.

#1 2020-08-22 00:05:11

laanan
Member
Registered: 2020-01-25
Posts: 30

Question about DNS Servers and Linux

Hello,

I've got a chat server (OS Debian vanilla) connected to a local network that lives on a Windows server. Most of the workstations that connect to this network are Windows 10, one is a Macbook, one is Debian (the chat server), and one is Bunsen Labs.

There is a DNS server at 192.168.1.10. All the windows computers are set up to point to this IP for DNS, and can connect no problem to the chat server (it's on port 80 and is browser based).

The Macbook and the Bunsen Labs computers were having trouble connecting to the chat server, however. I can make the connection by directly entering the server's IP address, but trying to log-in fails because the browser is unable to resolve the host. For the Macbook, I simply changed the DNS for the connection, and then the browser was able to resolve the host. That was easy peasy.

For the Bunsen Labs computer, it was a little bit more work to get rid of the old DNS entries for the connection, but I was eventually able to get it so that there is only one DNS entry, again, 192.168.1.10. I restarted the connection and verified the DNS server IP, but, unfortunately, the browser still cannot resolve the host.

Since setting the DNS worked on the Windows and Apple machines, my thinking is that there is something about my connection settings on the Bunsel Labs computer that must be preventing the host from being resolved.

Any pointers would be much appreciated.

Thank you!

Offline

#2 2020-08-22 01:30:28

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 661

Re: Question about DNS Servers and Linux

How do the clients know about the DNS-server? Do you have an dhcp-server that leases ip-adresses and gives them the dns-adress? Or, do you have static ip-adresses and configured the clients with the DNS-adress?

Have you read https://wiki.debian.org/NetworkConfiguration?


// Regards rbh

Offline

#3 2020-08-22 07:19:02

ohnonot
...again
Registered: 2015-09-29
Posts: 4,882
Website

Re: Question about DNS Servers and Linux

I assume you used network-manager to change the DNS server?
If not, please do. Somewhere in "Edit connection" you can completely override the DNS server.
If it still doesn't work, show us your network-manager settings and what else you changed.


BL quote proposals to this thread please.
my repos / my repos
---
Thank you for posting direct image links!

Offline

#4 2020-08-22 19:05:19

laanan
Member
Registered: 2020-01-25
Posts: 30

Re: Question about DNS Servers and Linux

I'm pretty sure it's a dhcp lease from the server. I thought the clients would know the DNS based on me setting the DNS for the connection with nmcli. I've also set it in resolv.conf.

Here's from nmcli con show:

"ipv4.method:                            manual
ipv4.dns:                               192.168.1.10
ipv4.dns-search:                       
ipv4.dns-options:                       (default)
ipv4.dns-priority:                      0
ipv4.addresses:                         192.168.168.62/24
ipv4.gateway:                           192.168.168.168
ipv4.routes:                           
"

And here's from resolv.conf:
"# Generated by NetworkManager
nameserver 192.168.1.10

"

Offline

#5 2020-08-23 02:43:02

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 661

Re: Question about DNS Servers and Linux

laanan wrote:

I've got a chat server (OS Debian vanilla) connected to a local network that lives on a Windows server.

This must be an mistake? You mean you have a local network with a windows server?

There is a DNS server at 192.168.1.10.

Is it another windows server, linux server or...

I can make the connection by directly entering the server's IP address, but trying to log-in fails because the browser is unable to resolve the host.

This does not sounds right too. IF the BL-box can ping chatserver, then it can can resolve the server. It can translate the name to an ip-adress. Then it should be possible to login in the browser. Webbserverlogs and maybe chatserverlogs might shed some light.

For the Macbook, I simply changed the DNS for the connection, and then the browser was able to resolve the host. That was easy peasy.

So, you have changed DNS-server?

For the Bunsen Labs computer, it was a little bit more work to get rid of the old DNS entries for the connection, but I was eventually able to get it so that there is only one DNS entry, again, 192.168.1.10.

You have no router with built in DNS-server? Is it another server that is gateway? Do your dhcp-server not send out dns-entry? If so, networkManager should automaticley updatet your DNS-entry.
I prefer to have a little redundance with DNS, also points to external DNS-server. Furthermore, my wireles broadbandmodem, has also an built in DNS server. I prefer to have my router between, on another lan, but also has its DNS-server as backup...

I restarted the connection and verified the DNS server IP, but, unfortunately, the browser still cannot resolve the host.

It is not the browser that resolve other hosts...

Since setting the DNS worked on the Windows and Apple machines, my thinking is that there is something about my connection settings on the Bunsel Labs computer that must be preventing the host from being resolved.

If BL-box can ping the chattserver on its name, then it sure can resolve the host. Login problems, might bee something else...

Last edited by rbh (2020-08-23 02:50:03)


// Regards rbh

Offline

#6 2020-08-23 02:59:08

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 661

Re: Question about DNS Servers and Linux

The use of /etc/hosts might ease managment of lan infrastructure.


// Regards rbh

Offline

#7 2020-08-23 06:36:58

ohnonot
...again
Registered: 2015-09-29
Posts: 4,882
Website

Re: Question about DNS Servers and Linux

laanan wrote:

I'm pretty sure it's a dhcp lease from the server. I thought the clients would know the DNS based on me setting the DNS for the connection with nmcli. I've also set it in resolv.conf.

You said "the DNS is at IP" - so I assumed that was static, but now I'm not so sure the problem is in your BL machine at all.
If that Windows machine connects dynamically with changing IP addresses that might well be your problem.
TBH your situation sounds like your swimming, just about hanging on. I didn't catch it the first time because it's rather complex.

You mention that your chat server is on port 80 but you do not mention what port your DNS server is on or how you set it up.
Typically it's port 53 IIRC.
And you don't need to log in, it serves name resolution.
I wonder why you feel the need to run a DNS server at all, and from a Windows machine at that? ... no, I think I got that wrong. You say you have a local network that lives on a Windows server. Frankly, I have no idea what that means. A network is a network (of machines), a server is a machine.
It's all very confusing.

BTW, if you do things in networkmanager you should leave other files alone. Generally speaking, you either let NM manage your network, or do it manually, but not both. I suspect settings in NM take precedence, those in resolv.conf don't do nothing.

Anyhow, clarification is required I think.

Last edited by ohnonot (2020-08-23 06:40:48)


BL quote proposals to this thread please.
my repos / my repos
---
Thank you for posting direct image links!

Offline

#8 2020-08-24 03:41:01

laanan
Member
Registered: 2020-01-25
Posts: 30

Re: Question about DNS Servers and Linux

ohnonot,

You are spot on that I am treading water, here. Let me just try to restate the problem I am experiencing in simple terms that I actually understand. Thanks for the patience!

ok, so I am trying to connect to an nginx webserver at https://zulip.myserver.local via Chrome on BL. When I do so, Chrome says: "server IP address could not be found.
DNS_PROBE_FINISHED_NXDOMAIN"

For all the other computers on this network, which are iOS or Windows 10, setting the DNS IP address value in the wifi connection settings to 192.168.1.10 resolved the issue.

Not so for BL...

Offline

#9 2020-08-24 06:41:49

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 661

Re: Question about DNS Servers and Linux

Ok, you do not have an DNS-server at 192.168.1.10, you want to connect to the webserver at that adress.

You can alwasu connect to the ip-adress https://192.168.1.10 instead.

It is possible to configure some routers to cache local dns-adresses...

Last edited by rbh (2020-08-24 06:42:21)


// Regards rbh

Offline

#10 2020-08-24 07:09:05

ohnonot
...again
Registered: 2015-09-29
Posts: 4,882
Website

Re: Question about DNS Servers and Linux

Always use at least 2 (very) different browsers to test.
Didn't Chrom* use its own DNS over the system's?


BL quote proposals to this thread please.
my repos / my repos
---
Thank you for posting direct image links!

Offline

#11 2020-08-24 07:25:36

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 661

Re: Question about DNS Servers and Linux

If you want to associate some static ip's with their hostname, a good tool is file /etc/hosts. (Both in linux and on windows and mac)

More info: https://manpages.debian.org/buster/manp … .5.en.html

Last edited by rbh (2020-08-24 07:30:09)


// Regards rbh

Offline

#12 2020-08-26 15:58:48

laanan
Member
Registered: 2020-01-25
Posts: 30

Re: Question about DNS Servers and Linux

rbh and ohnonot, thank you for all the help!

Editing /etc/hosts did end up fixing the problem. I had to remove the https:// from the hostname to get it to work. I am still confused about the whole DNS server, thing, since BL acts so differently than the iOS and Windows 10 computers.

To be clear:

* webserver is at 192.168.168.65
* Bunsen Labs is at 192.168.168.62
* DNS server is at 192.168.1.10

Last edited by laanan (2020-08-26 16:53:58)

Offline

#13 2020-08-26 19:14:53

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 661

Re: Question about DNS Servers and Linux

Configured right, there should not be any difference of how the pc's work in linux or windows. Basic networking functions is the same.

You seems to have a complex (home?)lan. Have you set it upp your self? The DNS server at 192.168.1.10, is it a linux box?

Are you satisfied with your curent setup or?

I have not worked with bind dns-server's for many years, on my home-lan, it's sufficient to use the routers built in caching dns-server...


// Regards rbh

Offline

Board footer

Powered by FluxBB