| Linode Forum https://forum.linode.com/ |
|
| Opening port on linode for remote access https://forum.linode.com/viewtopic.php?f=19&t=8146 |
Page 1 of 1 |
| Author: | gauravt [ Sun Dec 04, 2011 7:23 am ] |
| Post subject: | Opening port on linode for remote access |
Hi, I would like to use linode as a development box. Rails development server runs on port 3000. What would be the steps required to open 3000 for remote access. I tried using 1)Arno Iptables [http://library.linode.com/security/firewalls/arno-iptables-debian-5-lenny] 2)ufw https://help.ubuntu.com/community/UFW but i still couldnt access rails server using port 3000 Here are the details for the linode gauravt@gauravtiwari5050:~$ uname -a Linux gauravtiwari5050 3.0.4-linode38 #1 SMP Thu Sep 22 14:59:08 EDT 2011 i686 GNU/Linux gauravt@gauravtiwari5050:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 10.04.2 LTS Release: 10.04 Codename: lucid Kindly help. |
|
| Author: | sleddog [ Sun Dec 04, 2011 7:43 am ] |
| Post subject: | |
Do: netstat -ltn to see which TCP ports have listening daemons. Port 3000 should be there. And do: iptables -L -n to see your iptables firewall status. If the default iptables policy is to 'allow', then port 3000 will be accessible if there's something listening on it. If the default policy is to reject or deny, then you will need to add a rule to allow access to port 3000. How you do that will depend on the firewall interface you use. |
|
| Author: | gauravt [ Sun Dec 04, 2011 8:04 am ] |
| Post subject: | |
Thanks for the help sleddog. here is the o/p of netstat gauravt@gauravtiwari5050:~$ netstat -anp | grep LISTEN | awk '{print $4}' | sed s/".*:"//g | sort -n -u (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) ACC 22 25 80 110 143 514 993 995 3000 3306 from o/p of iptable -L -n Chain ufw-user-input (1 references) target prot opt source destination ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:514 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:3000 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:3000 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:3000 Is there any tutorial/wiki that you could guide me too. |
|
| Author: | sleddog [ Sun Dec 04, 2011 8:20 am ] |
| Post subject: | |
Run the commands netstat -ltn iptables -L -n as root (or sudo) for a complete status picture. Try stopping/disabling your firewall temporarily. If you can then access your site you know it's a firewall issue. |
|
| Author: | gauravt [ Sun Dec 04, 2011 8:46 am ] |
| Post subject: | |
Code: gauravt@gauravtiwari5050:~$ sudo netstat -ltn output of iptables Code:
I tried disabling firewall ,using steps given here https://help.ubuntu.com/community/IptablesHowTo I am still unable to access the site running on port 3000 |
|
| Author: | hoopycat [ Sun Dec 04, 2011 9:01 am ] |
| Post subject: | |
What exactly happens when you try to connect to port 3000 on your server? There's something listening on port 3000, and it looks like it's allowed by your firewall, so it ought to be working... |
|
| Author: | sleddog [ Sun Dec 04, 2011 9:07 am ] |
| Post subject: | |
If you've flushed iptables rules so that the 3 default chains (input, forward and output) all show policy 'ACCEPT' then the issue isn't firewall-related. Which suggests that the problem is with your webserver/rails setup. Afraid I can't help you with that as I don't use rails. Hopefully someone more knowledgeable than me will be along to help |
|
| Author: | gauravt [ Mon Dec 05, 2011 11:19 am ] |
| Post subject: | |
It seems that the network that i was in had blocked acces to port 3000. I was able to get it working in another network. Thanks a lot sledogg and hoopycat for your help. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|