1

I configured an HTTP proxy server on my EC2 instance using Apache's mod_proxy module. I now want the proxy to accept requests only from my other EC2 instances, how do I achieve that?

This is my proxy config:

ProxyRequests On <Proxy *> Order deny,allow Deny from all Allow from ??? </Proxy> 

I know a solution could be to have to proxy to listen on another port, and configure a security group on AWS so that only my EC2 instances can access that port, is this the way to go?

Thank you.

1 Answer 1

1

Well this is an interesting problem. If you don't have a VPC setup for your instances where you can control their internal LAN subnets, Amazon makes them pretty much random for you.

Now your security groups by default will let any of your own ec2 instances have full access to each other so just allow all from

Allow from 10 

That is your best solution if you aren't using a VPC without the headache of adding new lines for each instance that spins up.

1
  • Thank you, @Mike. I tried and it doesn't work.. To be honest something VERY bizarre is happening, all the proxy rules are not applying. Even specifying only <Proxy *>Order Allow,Deny</Proxy>, I'm still able to use the proxy from my PC. I tried every possible configuration and I'm always able to use it from my PC, unless I specify ProxyRequests Off. Do you know what could be the reason? Thank you. Commented May 13, 2012 at 23:27

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.