I want to make a factorio server, which requires an open udp port (at 34197). I am trying to use firewalld to achieve this. I did not change any settings aside from the commands in this post.
To open the port I ran this:
[root@scardex ~]# firewall-cmd --add-port=34197/udp --permanent
success
To test I ran the following:
[root@scardex ~]# netstat -lntu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:2019 0.0.0.0:* LISTEN
tcp6 0 0 :::22 :::* LISTEN
[root@scardex ~]# nc -vz -u localhost 34197
Ncat: Version 7.91 ( https://nmap.org/ncat )
Ncat: Connected to ::1:34197.
Ncat: Connection refused.
running the firewalld command list-ports returns an empty line:
[root@scardex ~]# firewall-cmd --list-ports
Running the initial command again, I get this:
[root@scardex ~]# firewall-cmd --add-port=34197/udp --permanent
Warning: ALREADY_ENABLED: 34197:udp
success
What is going on here? why canât I open my port?