The essence of the problem: you need to open the port, but by entering various iptables commands, this case will not be crowned with success.
For example, I enter
iptables -I INPUT -p tcp -m tcp --dport 53 -j ACCEPT
in iptables -L 53, the port is saved, but from the external network it remains closed. And after rebooting the server, all innovations in iptables are reset to the original ones. Iptables-persistense, iptables-save, iptables-apply did not help either. What could be the reason?
From my comments on this issue:
- The server is fail2ban
- Some manuals mention
service iptables start, but I don’t have this service. - When you enter the
sudo iptables-apply, it displays the errorError: rulesfile not readable: /etc/network/iptables.up.rules
INPUTchain? What is the external network? Show an example of how you use commands to save the rules - stxdtm