Unity’s great at making networking simple, but so much so that I’ve set up my app (which requires local wifi) without really understanding the ins and outs of ports.
So, following the tutorial, opened port is 2500. Now, just by googling that, I read that this very port could be used by trojans, and hence was blocked by certain firewalls.
My app needs wifi, but not an internet access. Wifi is used for local networking purposes.
Should I provide the possibility of opening another port? Or is 2500 safe enough? What I’d like to avoid are users complaining about being unable to setup the server because of port/firewall issues…
I wouldn’t worry about it too much, but I would in general pick a larger and more entropic number, and I would still provide a way to choose an explicit port as this allows a lot more flexibility at very little cost (e.g. multiple servers hosted on one machine).
If you really care you could apply for an assignment from the IANA, but if everybody did that they’d run out of numbers very quickly.
Applying for an assignement from the IANA might be quite the overkill, but I’ll certainly follow your advice and provide the user with a choice regarding ports.