All the examples you give just open a port (or more than one). If you pick a preconfigured application, it will open the ports needed by that application. If you pick a service, it will open the ports needed by that service. The firewall just discards unsolicited traffic on closed ports, and lets through unsolicited traffic on open ports. If you don't have a (any) program running that is listening on that port, nothing bad happens. You should generally not use a port below 1024 for purpose like game servers, as ports below 1024 are generally reserved for specific services (like port 80 for your web server). You can check which TCP and UDP ports are being listened to with:
- Code: Select all
sudo ufw show listening
Pick a port number above 1024, one that isn't shown in that list, and you should be fine with opening that port and running your game server on it. There is also a register of known ports being used by specific programs:
http://www.iana.org/assignments/service ... umbers.xml. If you don't have those programs running, you can use their ports.