If FF complaints about the port then yes you should allow that port to be used.
Or make nginx listen on a common port and proxypass to where ever the backend lives.
Or make nginx listen on a common port and proxypass to where ever the backend lives.