I'm trying to open ports on my server by using the following commands:
Code: Select all
firewall-cmd --zone=public --add-port=800/tcp --permanent
systemctl restart firewalld
Code: Select all
firewall-cmd --zone=public --list-all
public
target: default
icmp-block-inversion: no
interfaces:
sources:
services: ssh dhcpv6-client
ports: 900/tcp 800/tcp 1957/tcp
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
rule family="ipv4" source address="123.249.24.199" reject
rule family="ipv4" source address="221.203.98.52" reject
rule family="ipv4" source address="58.242.83.37" reject
rule family="ipv4" source address="64.237.85.97" reject
I changed the default ssh port to 1957 to prevent bot attacks on port 22, if that information helps. I also tried to switch the ssh port to an other one. Then the new port is open, but the old one is closed, even if I can still see it open in the firewall.
I really don't know what to do anymore, and searching the web hasn't brought me any success yet. Can anyone who is a bit more experienced than me please tell me where the problem is?