How to access my linode via port 3131 for Cloud9

I have installed nodejs driven Cloud9 on my linode. By default cloud9 IDE listens on port 3131. So technically I should be able to do http://my.linode.ip.address:3131 to open the installed Cloud9. I can also change what port Cloud9 listens to, by way of its conf file. The problem is that my linode is not allowing me to connect to the web pages through any port, other than 80 it seems. What should I do in order to access my linode via HTTP and through a specified port like 3131 or 3000 etc.

Thanks

Patrick

7 Replies

Your IP would be helpful in diagnosing your problem.

If you're using a firewall on your Linode you should open port 3131

You should also check that cloud9 is listening on all IPs you can do that using sudo netstat -lpnt and looking for the process listening on that port with the ip 0.0.0.0

Can you telnet to the port?

obs,

Thanks for your reply. The netsat command shows Cloud9 listening:

tcp   0    0 0.0.0.0:3131   0.0.0.0:*    LISTEN   7381/node

There is not much documentation on firewall settings for my Linode, and I have no idea if I even have a firewall active.

Would it be the iptables that handles it?… if so, is the idea that all ports except 80 are blocked by default unless allowed using iptables?

Also, telnet did not connect to 3131.

Pat

@PatrickF:

Also, telnet did not connect to 3131.

It seems likely that your firewall is blocking port 3131. The following command will show your firewall configuration:

sudo iptables -nvL

Yes indeed, it has proven to be the firewall.

Cloud9 works when I do this:

/etc/init.d/arno-iptables-firewall stop

Of course I wouldn't want to disable my firewall, however Cloud9 does not work using:

iptables -A INPUT -p tcp -m tcp --sport 3131 -j ACCEPT 
iptables -A OUTPUT -p tcp -m tcp --dport 3131 -j ACCEPT

What am I missing here?

Thanks.

Those iptables rules are a little confused. You just want a rule for incoming traffic with a destination port of 3131, so

iptables -A INPUT -p tcp -m tcp --dport 3131 -j ACCEPT

@PatrickF:

Yes indeed, it has proven to be the firewall.

Cloud9 works when I do this:

/etc/init.d/arno-iptables-firewall stop

If you're using Arno's, add the port to its list.

If you're using Debian with debconf-managed mode:

dpkg-reconfigure arno-iptables-firewall

Accept default (they default to current-setup) answers to questions until you'll get to "Open external TCP ports:" list

Add 3131 to the space-separated list (that probably already contains 22 and stuff).

Go through rest of the answers accepting default, say Yes to last question ("Restart firewall now?"),

If you're using non-managed mode or any other distro:

Edit /etc/arno-iptables-firewall/firewall.conf with your favourite text editor

Find line looking like

OPEN_TCP="space separated list here"

Add a space and 3131 to the end of the list, inside the quotes.

/etc/init.d/arno-iptables-firewall restart

Enjoy.

@rsk:

If you're using Arno's, add the port to its list.

Edit /etc/arno-iptables-firewall/firewall.conf with your favourite text editor

Find line looking like

OPEN_TCP="space separated list here"

Add a space and 3131 to the end of the list, inside the quotes.

/etc/init.d/arno-iptables-firewall restart

Enjoy.

Golden!!… Thank you.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct