Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to access a rails server running at on my computer from a tablet on the same wifi.

I can connect to regular webserver :80, but somehow can't get to the :3000.

I tried:

sudo ufw enable 3000

but that didn't help.

share|improve this question
I think that's not the correct command to open a port in UFW. You should try GUFW, it simplifies a lot configuring UFW. – Salem Feb 19 '13 at 20:49
Yup, that worked. Post this as an answer and I'll accept it. – mreq Feb 19 '13 at 21:23
@Salem: would you mind making the answer as to close this question? Thanks! – mreq May 17 '13 at 9:08
Sorry I completely forgot this. – Salem May 17 '13 at 11:11
up vote 2 down vote accepted

The correct command to open that port would be

$ sudo ufw allow 3000                                     # from all hosts
$ sudo ufw allow from to any port 3000     # just to some subnet hosts

Also you can resort to gufw, which simplifies a lot the firewall management.

enter image description here

share|improve this answer

If I remember correctly, webrick (I guess you're using script/server) binds only to the local interface. In order for it to be accessible from the outside, start it like this:

script/server -b <your-ip-address>

Obviously you need to enter your ethernet (or wi-fi) IP address for this to work.

share|improve this answer
in rails 3 it's rails s -b ipaddress but the default is open to all, so the -b flag shouldn't be mandatory – mreq Feb 19 '13 at 21:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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