0

This is a nuub question (i'm more of a programmer given an admin task right now). I have a rails application that works just fine on a remote windows server 2008 machine (it's rails 2.3.5, and I run ruby script/server and it runs just fine on port 3000 (ie i can access it on localhost:3000)..

suppose the machines domain is called domain.com.. if I go to domain.com:3000 nothing happens.

How do I make this application accessible on the www? if i just go to domain.com I see an IIS welcome page.

1 Answer 1

1

The precise steps you need depend on your network design and software/hardware devices, but check all the important points from one end to the other and make sure they allow the traffic to go through.

It is probably being stopped at one or more of these places:

  • Windows Firewall blocks incoming connections by default. Have a look in Control Panel -> Administrative Tools -> Windows Firewall with Advanced Security, Inbound Rules. Make a new rule "Allow Port, TCP, 3000, All profiles". Save it and try again.

  • How is it connected to the internet? You might have a router and/or a firewall, both of those will block incoming connections by default. You will need to open port 3000 on any firewall device. If your server has a private address (192.x.x.x, 172.x.x.x, 10.x.x.x) then it is behind Network Address Translation (NAT) and you need to setup port forwarding to send incoming connections on port 3000 on the internet side to your server on the LAN side. (Here are examples on how to do that for various routers: http://portforward.com/english/routers/port_forwarding/ )

  • You can get to localhost:3000, but if your application is binding to the address 127.0.0.1:3000 it might be only listening for connections from the server it's running on. If so, change it to use the server's address, e.g. 192.168.0.1:3000.

  • Does the server run any antivirus software (McAfee, Norton) that includes a firewall layer? That might be blocking incoming connections on port 3000. If so, find out how to allow that through.

These are the most likely things; port 3000 connections get to your internet connection, that throws them away. Then once you get them to your server, Windows firewall throws them away.

  • It may also be that your browser is not allowed to connect out on port 3000, either because of a very strict firewall on your client computer (McAfee, Norton, etc), or because of a strict office firewall on your client internet connection.
3
  • for option one.. is restarting IIS necessary after adding a rule?
    – abbood
    Mar 12, 2014 at 9:22
  • here is a follow up question as well.
    – abbood
    Mar 12, 2014 at 11:40
  • @abbood there's no need to restart IIS after adding a rule to Windows firewall. Mar 12, 2014 at 14:09

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.