Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Hey im having some trouble allow remote connections to postgres from other ec2 instances using the named security group feature to rules.

I have set the listens directive in postgres.conf to "*" and have allowed all ips in the pg_hba.conf file to

host all all 0.0.0.0/0 md5

i have a security group for the instance trying to connnect called appserver and one called db for the postgres instance. the db security group allows TCP connections from 5432 from any instance with the appserver security group

However this simply dosent work. I cannot establish a connection to postgres remotely. To validate things are working with postgres in general i allowed 0.0.0.0/0 for the db security group for port 5432 and it worked.

I really dont know what else to try now!

share|improve this question
    
Are you sure that the instance from which you are trying to make connection, is a part of appserver security group .. because usually it works ? –  GeekRide Dec 20 '12 at 6:47
    
@GeekRide yeh 100% –  Mike Waites Dec 20 '12 at 14:32
    
Is this setup in VPC or just simply EC2 and no VPC is included ? –  GeekRide Dec 20 '12 at 18:31
    
@GeekRide this is simply EC2 and no vpc –  Mike Waites Dec 25 '12 at 0:01
    
are you using an external dns to connect from one instance to another? i.e db.test.com and not xxx.xxx.xxx.xxx.eu-west-1.compute.amazon.com? –  Alistair Prestidge Jan 7 '13 at 21:07
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.