How to scan computers in your own home LAN for open ports

Hello Coineach,

Certainly. I sometimes use SSH server and that opens port 22.

If you want to see an open port, just install SSH server

sudo apt-get install openssh-server

Now scan your computer for open ports from another Gnu-Linux computer in your LAN.
You should see that port 22 is open. It’s protected by your username and password though.
When you want to close port 22, just uninstall openssh server,

sudo apt-get remove openssh-server

Now when you scan your computer for open ports from another Gnu-Linux computer in your LAN you should see that port 22 is no longer visible.

If we understand the risks and benefits of having ssh server installed, and we have taken appropriate steps to ensure a suitable level of security for our purposes, ssh can be extremely useful to us.
However, if we’re not using it or if we haven’t thought about using enough security measures (weak passwords), then the risks might outweigh the benefits.

2 Likes