Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have no internet connection, or not much of it. I can ping 8.8.8.8 but I cannot update or connect with my browser. This is a multiboot laptop and a couple of other systems are able to connect without problems, so it is this Debian system that has a problem.
Code:
aris@hp2Debian:~$ uname -a
Linux hp2Debian 5.19.0-2-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.19.11-1 (2022-09-24) x86_64 GNU/Linux
Some search indicated that port 53 could be closed and I have verified that. More search did not provide an answer on how to open it. The only answers have to do with /etc/resolv.conf but
Code:
aris@hp2Debian:~$ cat /etc/resolv.conf
# Generated by NetworkManager
I do not have a clue on how to proceed from here to fix this. Any help is welcome.
IF your resolv.conf is 'empty' as you posted,
That is the problem (I think). It seems to happen a lot, but I don't know the whole story. (Hopefully an expert will chime in.) Here's a (LQ) link that might help: https://www.linuxquestions.org/quest...on-4175699145/
P. S. I don't think port 53 needs to be 'open' (do you mean listening? You're not a [dns] server(?)!) But I've seen some strange stuff I don't understand about 127.0.0.53[:53] (systemd-resolved) https://www.tecmint.com/resolve-temp...me-resolution/
From the output I guess resolv.conf is taken care by the NetworkManager. Checking the man page of the NetworkManager did not provide results of how to fix this.
Just now I was looking at a page and the port can be opened with ufw, but I am not sure if it is going to be fixed. I will try the following command after installing the ufw package with dpkg (at least all the dependencies are installed)
I'm guessing that: 22 sshd server disappeared when ufw was enabled, and appeared when it was 'allow'ed... Yes?
I can only answer this one. Yes, all the output below was added by myself (ufw allow <port>/tcp), but apart from port 22, all the others are closed. I also do not know how his works and whether I have done the right thing adding ufw. Let's see if someone that knows what's going on might reply. nmap is not installed on the problem system so I use another computer for the output.
Code:
aris@hb8DebianS:~$ nmap -Pn 192.168.0.12
PORT STATE SERVICE
22/tcp open ssh
53/tcp closed domain
80/tcp closed http
443/tcp closed https
I will include the output of nslookup, maybe it helps someone.
Code:
aris@hp2Debian:~$ nslookup 127.0.0.53
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
;; communications error to 127.0.0.1#53: connection refused
;; no servers could be reached
It seems I have the same problem on another system (Kali) on the same laptop. Only port 22 is open.
The other six systems on the laptop are okay.
Port 53: DNS uses Port 53 which is nearly always open on systems, firewalls, and clients to transmit DNS queries.
So it is a necessity on a system.
But back to my problem. It had nothing to do with the port. Here is the story.
About 15-20 days ago we changed ISP. The change also reflected the DNS servers that I had in the network configurations of every computer. I removed the old entries and left the settings to automatic. Everything was working. One of my computers, about a week ago, refused to connect, same story as described in the OP. The next time I booted it was okay so I did not cared much about it. Then yesterday I had my OP problem. Last night I had a long night going through the settings of the modem and my access point and after I posted the OP, I saw in the modem settings they had DNS IP addresses. I thought to give it a try and they just got connected. All I needed to do was to place the new DNS server addresses in the network configurations. And this is how the problem was solved.
Port 53: DNS uses Port 53 which is nearly always open on systems, firewalls, and clients to transmit DNS queries.
So it is a necessity on a system.
There is a difference between an open/closed port (incoming) and a firewall configured to blocks outgoing connections (which is not the default behaviour).
As others have said, port 53 needs to be open for servers listening for DNS queries, same as port 80 needs to be open for servers listening for HTTP requests.
You don't need to open the ports for regular machines not running those servers; this does not stop clients from working, because an "open port" refers to incoming traffic.
If you had configured the firewall to block outgoing traffic on port 53 you would (hopefully) know that you'd done that, but more importantly it would be listed in the "ufw status" output. (Unless it was blocked elsewhere in the network, but that would then affect more than just the single OS.)
@#10&all: I/we need a bit more help understanding 'closed' (my first two questions in #6). I'm guessing open = (daemon)listening (any difference? Did the presence of a firewall cause the different state-word: open versus listening?)
And closed versus not being listed at all (as is every other port) is the result of the firewall running?
Yeah I'm quite confused here!!!
(I tried Googling but couldn't find anything solid and understandable)
Edit update: I found something from this Google:
-spanning what are all the possible different network intitle:Port intitle:States? https://geek-university.com/port-states/
More detailed info on the 6 nmap Port States: https://wiki.onap.org/plugins/servle.../view/35520753
For simplicity, I 'slightly recommend' OP:
apt remove ufw, since they solved the problem by: "placing the new DNS server addresses in the ?network configurations?" (exactly what 'net configs' files&content did you change=update?)
Thanks for the advice for removing ufw. I purged the package and also had a line saying "Purging configuration files for ufw". The system is working as it should. And that was a good link about nmap port states.
Funny side note is that nmap does not show anything about port 53 now. So is that port used only if you have a DNS service installed?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.