Open Ports
I have a problem with the ports on my new linode. I need to open the following ports:
80
6900
6121
5121
Can you help me with this?
Thanks
8 Replies
You can open these ports using iptables. You should be able to run the following commands to open the ports:
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 6900 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 6121 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 5121 -j ACCEPT
I hope this information helps.
Did this, also ufw, also cloud firewall and still my port 25 is blocked.
Starting Nmap 7.60 ( https://nmap.org ) at 2022-01-13 23:14 -05
Nmap scan report for mail.agencia.click (192.53.164.233)
Host is up (0.0000070s latency).
Not shown: 997 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
443/tcp open https
No matter what i do on Linode, this 3 are the only ports open.
I even un-installed iptables, uninstalled ufw and still seeing the same.
Now I don't know what to do….
iptables firewall rules live in kernel memory. In order to get rid of the in-memory content, you need to reboot your Linode. There will still be iptables info there after the reboot but there should only be two rules:
- pass all inbound traffic; and
- pass all outbound traffic.
After you reboot your Linode, you should re-install ufw. When you do that, you'll get iptables automagically (ufw depends on iptables to do it's job). After you get ufw re-installed, you can start over using only ufw.
-- sw
P.S. You need to make sure that iptables firewall rules are NOT being restored to some default state from some file at boot-up by some systemd job. If that's the case, you need to disable the systemd job before your reboot your Linode. I'm afraid that you'll have to discover how to do this by yourself. This stuff is usually bistro-dependent.
Port 25 will be blocked until you put in a ticket.
All was solved.
Port 25 was never blocked.
No service was configured to hear on the public IP (was on a private IP) so NMAP was saying that was blocked when it wasn't.
When I did
$service postfix status
The system also said that the service was active but exited, which was false, because it is sending emails and IMAP is working fine through dovecot.
Very annoying, but now all is working.
Many thanks
I understand iptables can so some things that ufw doesn't, but why in the world people recommend using iptables when it is 1000% more complicated than ufw?
I would even not mention iptable to anybody until ufw can't do the job.
Even i would call for a "Damnatio memoriae" to the one that created iptables.
I understand iptables can so some things that ufw doesn't, but why in the world people recommend using iptables when it is 1000% more complicated than ufw?
No arguments from me that iptables is complicated…overly complicated IMHO. However, it's the best that Linux has to offer.
ufw is a friendly front-end™ to iptables…another layer of bugs to watch out for and possibly work around. ufw can't function without iptables.
You're argument makes no sense…
ufw is generally only available on Ubuntu unless you want to install it from source (and track/install maintenance releases by hand). So, if you're a Debian, Fedora, CentOS, etc user this is the only way to install ufw. iptables on the other hand is universal among Linuxen. The decision comes down to how much work you want to make for yourself if you're not an Ubuntu user.
As much as Canonical, Ltd would like to think it dominates the world, it doesn't. There are plenty of reasons to not use Ubuntu.
-- sw