Search code examples
ruby-on-railssshremote-accessopenstack

How to access rails server in a remote VM


I set up a Virtual Machine (VM) on OpenStack remotely. The VM is running Red Hat Enterprise Linux (RHEL) 7.

I ssh into the above VM using ssh vm-url, and then I setup a rails server during that ssh session and get it running using rails server -b vm-url

Now, I try to access the rails website above from my local Chrome browser by typing the URL vm-url:3000 into Chrome's address bar (the Omnibox), but I get:

This site can’t be reached

10.150.8.101 took too long to respond.

Why Can't I access the rails website, what have I done wrong?

Please correct me if any terminologies I used are incorrect.

Thank you.


Solution

  • Two things to check,

    • The ip attached to the VM is public and accessible
    • Http port is enabled to be accessed from outside

    The port accessed is handled in security groups which is generally configured while creating the instance. Either add new security group with enough privileges or update the same with new added ports.