1

In AWS, I set up an RDS which was originally not publicly available. I set it up using this tuturial. The Apache server that resulted is publicly accessible; the MySQL instance is not.

Now I'm trying to modify access to the RDS to make it where I can get to it with HeidiSQL.

I've added the RDS to the public security group, and tried a few other mods to no effect.

I'd like make this where it can be accessed only from my IP. But in an attempt to just get a connection, I've set it right now where the security group has it wide open. However, when I try to connect from HeidiSQL or Telnet using port 3306, no TCP connection is established.

Here is the configuration. Any idea what I'm missing?

VPC: enter image description here

Subnet: enter image description here

Gateway: enter image description here

RouteTable: enter image description here

Security Group: enter image description here

DB Security Group: enter image description here

RDS: enter image description here

10
  • 1
    What is your exact question? Are you having trouble accessing the DB? Or are you having trouble restricting access to the DB? It looks like it's open to the world now so you should be able to access it. Also you might want to show both security groups that you have assigned to your RDS instance.
    – Mark B
    May 2, 2016 at 17:12
  • Thanks for your help, @MarkB. In the end, I want the RDS only available to my IP, but, as you saw, I've attempted to just open it to the world right now. However, when attempting to connect (via HeidiSQL and Telnet using port 3306), the connection is not accepted. No TCP connection.
    – Jonathan M
    May 2, 2016 at 17:59
  • Why not just host the database on localhost? May 2, 2016 at 18:07
  • @EthanMoore, we don't want the cost of hosting it ourselves. That's a bit outside the scope of this question.
    – Jonathan M
    May 2, 2016 at 18:10
  • 1
    From the route table screenshot 0.0.0.0/0 is not targeted to IGW, So this does not look like a public subnet, looks like it is a private subnet where it is getting routed through a NAT may be. May 2, 2016 at 18:33

1 Answer 1

1

RDS instance was inside private subnet and that was the reason Apache (inside VPC) was able to connect to it but you were not able to connect from outside. If you change the private subnet route table to make it public by pointing to 0.0.0.0/0 > IGW - it worked.

To make it only accessible from your machine, you need to go to the attached security group and change the TCP 3306 source from open to all to My-IP.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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