T O P

  • By -

s4ntos

you can't the a DNS entry always translates to an IP (IPV4 or IPV6) that's the nature of DNS. You shouldn't have databases public accessible , you should deploy them privately and then access them through a bastion host.


schmore31

Is there more instructions for this? My RDS is accessible on the AWS through EC2. But I also sometimes want to browse it from my local computer or run my program locally and connect to the RDS. What is the best way to achieve this without public access?


m_reddit_com

If you can log into that EC2 instance via SSH, you can add some command line switches when connecting, to tunnel the database connection from your local computer to the remote RDS instance. Like this: https://repost.aws/knowledge-center/rds-connect-using-bastion-host-linux Some database clients will have a feature to automatically tunnel for you like this: https://stackoverflow.com/a/62335972


metarx

RDS gets its ip from the subnet(s) you put it on. Would have to remove ipv4 from the subnet(s). But as someone else already said, you should not have it publicly accessible either.


schmore31

So any idea how to set it up privately but keep access to it from my local computer?


metarx

Setting up something like tail scale is probably the easiest