Saturday, 6 January 2018

I want to restrict a user on a Linux server to only be allowed to access their Node server on a specific port. Should this restriction be defined in the environment variables or in the server configs?

So let's say there is a Linux user called testuser. They are being given the port 5000 to access their api/website. They should not be able to change this number.If they setup their Express server to listen on port 5000 then they should be able to access it in a browser like this: http:/[server_ip_address]:5000If they set it up on any other number nothing should happen.If they set it up to 5001 by mistake then it shouldn't conflict with whatever process that runs there or may be setup to run there by a different user who has this port dedicated to them.Is this something I should handle in Node or is it a Linux question?

Submitted January 06, 2018 at 05:11PM by brogramming102

No comments:

Post a Comment