I have a node.js application running on a linux server(nginx).


When I try to connect from my mobile phone or my computer at house I can. But when I try to connect from my company's network I cannot get. Also I can get 80 port from either.

Why I can't get 3000 port?


Your company most likely has a firewall that is very restrictive. They will start from the state of nothing allowed and then add what is needed.

These will be things like port 80 for http (Web browsing), 443 for https and anything else you need.

You can set a proxy so that the user connnects on port 80, but your node.js app will still recieve on 3000.

Detailed link here: Here

the TLDR is:

  • Open your config (centOS /etc/nginx/conf.d or Ubuntu /etc/nginx/sites-enabled)
  • Make the changes below (Change as needed to fit your need)
  • Restart your nginx service

    server {
        listen 80;
        server_name your-domain-name.com;
        location / {
           proxy_set_header   X-Real-IP $remote_addr;
           proxy_set_header   Host      $http_host;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.