Have you ever accessed your
VPS and noticed odd
open ports that you never configured? Yes, I can say “uh-oh” as too. Unknown open ports are comparable to merely having a door open in your home — you might not see it, but a hacker would. Here, we will go over how to see these ports and shut them down before they become a problem.
What are Unknown Open Ports and Why They are Important?
Open ports are simply doors into your
VPS that allow data to be sent or received. Some open ports are fine —
port 22 for SSH or
port 80 for a website. However, there are some ports that may also be open without you knowing. That is when things can be alarming.
Any open ports, but especially unknown open ports may be an indicator of one of the following:
- An app was installed, but it was not configured properly, and the service is still listening on a port.
- Malicious software or a bot opened a backdoor.
- An old app is still running in the background and quietly listening.
Hackers are always looking for an open port on a
server in hopes to
exploit the server through that open port… scary, right?
Locating Unexpectedly Open Ports
You may be able to use a few simple commands:
•
netstat -tulpn – This command lists all currently open ports and which app they belong to.
•
ss -lntu – This is a faster version of netstat.
•
nmap – This will scan your server externally and tell you what random people on the internet can see.
Fixing the Problem / Securing your VPS
After figuring out what the problem is, you can fix it by taking the following steps:
- Stop and disable services you don't need.
- Use a firewall (e.g. ufw or iptables) to stop unwanted ports from being opened.
- Keep your operating system continually updated. Legacy software is known to have vulnerabilities that hackers can use; you do not want to allow this.
- Use alerts to notify you when new ports are opened automatically & unexpectedly.
Concluding Remarks
Unfamiliar ports can be compared to strangers living in your home; you're not going to let them stay there without at least knowing who they are. This means checking your
VPS regularly, disabling unused ports, and ensuring what you have is fully patched at least once a month.
It might only take a few minutes, but it could save you hours of the opposite of peace of mind. A clean,
secured server, now that's peace of mind!