2

I have SSH root access to an EC2 instance but no access to the AWS Console / AWS KEY & SECRET.


My incoming traffic to this host on all TCP ports except 22 TCP seems to be blocked - I cannot access my services (for example nginx on port 80) from the outside.

nmap shows these ports as filtered, while port 22 is shown as open when SSH is running and closed when SSH is temporarily shut down.


ICMP and UDP are also blocked.

(I used ping, nc and some other tools to check that.)


I know that my instance is in some custom, non-default EC2 Security Group named, let's say my-security-group, but I don't know its rules.


How to list these rules with the access level I have got?


Update 1: My iptables rules are empty - let's assume that I am sure that its the Security Group that is blocking my traffic.

  • 1
    You can't. You can get a list of groups you're in at http://169.254.169.254/latest/meta-data/security-groups but it won't give you the rules. – ceejayoz Jan 30 '15 at 22:18
  • @ceejayoz You should make this comment an answer. I will upvote it soon as it looks like you are right. :( (Sorry to be sad about it.) – Greg Dubicki Jan 31 '15 at 21:17
  • Done, thanks! Sorry I don't have a better answer for ya. – ceejayoz Jan 31 '15 at 23:04
2

You can't. You can get a list of groups you're in at http://169.254.169.254/latest/meta-data/security-groups but it won't give you the rules themselves.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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