Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Feb 05, 2013 3:37 pm 
Offline
Newbie

Joined: Tue Feb 05, 2013 3:07 pm
Posts: 4
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


Top
   
PostPosted: Tue Feb 05, 2013 5:07 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
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
Code:
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?

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
PostPosted: Tue Feb 05, 2013 8:41 pm 
Offline
Newbie

Joined: Tue Feb 05, 2013 3:07 pm
Posts: 4
obs,

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

Code:
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


Top
   
PostPosted: Wed Feb 06, 2013 12:01 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
PatrickF wrote:
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:
Code:
sudo iptables -nvL


Top
   
PostPosted: Wed Feb 06, 2013 7:44 pm 
Offline
Newbie

Joined: Tue Feb 05, 2013 3:07 pm
Posts: 4
Yes indeed, it has proven to be the firewall.

Cloud9 works when I do this:

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


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

Code:
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.


Top
   
PostPosted: Thu Feb 07, 2013 5:56 am 
Offline
Senior Member

Joined: Sat Nov 27, 2010 8:21 pm
Posts: 63
Those iptables rules are a little confused. You just want a rule for incoming traffic with a destination port of 3131, so

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


Top
   
PostPosted: Thu Feb 07, 2013 4:56 pm 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
PatrickF wrote:
Yes indeed, it has proven to be the firewall.

Cloud9 works when I do this:

Code:
/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
Code:
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, providing useless advice on the Internet since 2005.


Top
   
PostPosted: Fri Feb 08, 2013 8:12 pm 
Offline
Newbie

Joined: Tue Feb 05, 2013 3:07 pm
Posts: 4
rsk wrote:
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
Code:
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group