问题
I'm pretty new with ec2, firewall settings etc, so I might be missing something obvious, but:
- I've created a 'getting started with windows' instance
- with a security group that has 5080 specified
- and is associated with an elastic ip
On the instance I have a red5 server running. when I run the server it on 127.0.0.1:5080, i can access it from a browser on that instance, so I know the server works.
When I run it on the elastic IP however, I can't connect to it, neither from within the instance nor from outside.
when I run telnet 75.101.147.86 5080 from the outside world i get 'connection refused'
Any clues on how to debug this would be highly appreciated!
Thanks in advance,
Martin
回答1:
In the AWS management console.
1 goto Amazon EC2 tab
2 Click on Instances and note the Security Group Name from the Security Group column for the instance you want to open it for.
3 Click on the link Security Groups
4 Click on the Security Group Name from step 2.
5 You should see a dropdown that says SSH, click it and select Custom..
6 Enter:
Protocol TCP From Port 5080 To Port 5080 Source (IP or Group) 0.0.0.0/0 -- NOTE 1
7 Click Save.
If you need UDP also, then repeat using Protocol UDP in step 6.
NOTE 1: Read : http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing for more info... but don't try to limit the subnet until you have it working for the world.
If it doesn't work after that then you may have a firewall on the instance. I'm more of an ubuntu guy, but try this : http://www.cyberciti.biz/faq/disable-linux-firewall-under-centos-rhel-fedora/ for RedHat
回答2:
A workaround for this problem to change the default port at ../conf/red5.properties to any other port. I changed it to 5081 and it works.
来源:https://stackoverflow.com/questions/3955910/ec2-cannot-open-port-5080-on-windows-instance