Re:I discovered thousands of open databases on AWS
by suifbwish on Monday January 31, 2022 @02:03AM
(#30145345)
Ssh tunnels are so badass. I’ve heard of people performing encrypted db replication through them between data centers
Re:I discovered thousands of open databases on AWS
by deberon on Monday January 31, 2022 @07:58AM
(#30147415)
I’ve witnessed somebody piping dd over an ssh tunnel to write blocks from one machine directly to another. Highly NOT recommended but still one of the neatest things I’ve seen. It worked.
Re:I discovered thousands of open databases on AWS
by suifbwish on Monday January 31, 2022 @05:52PM
(#30155907)
That sort of thing can be used for making disk images. Restoring them would be the only way to verify them as checking the md5sum of the file is not possible without a reference backup and if you have a reference backup why would you be using dd through a pipe lol. Definitely a cool trick though.
Re:I discovered thousands of open databases on AWS
by drewzero1 on Monday January 31, 2022 @12:43PM
(#30151087)
Sounds like a neat party trick! (At least, if you've got a really stable connection.) Did they do an md5sum afterward, or how did they know it worked?
Re:I discovered thousands of open databases on AWS
by noduerme on Monday January 31, 2022 @02:31AM
(#30145465)
Fair question. I used to do that always. But now, if I'm logged into a bunch of services, AWS, mail, etc in the browser, I don't want to switch my IP address to test something for fear of getting bounced or locked out. Especially if I'm in a rush to fix something.
Re:I discovered thousands of open databases on AWS
by dewey on Monday January 31, 2022 @05:57AM
(#30146697)
In that case you'd only have a different IP if you hit the localhost port of that tunneled connection, not everything on your computer. Unless you set up your browser and mail to proxy through that port there wouldn't be any issue with "switching IPs".
Re:I discovered thousands of open databases on AWS
by nkozyra on Monday January 31, 2022 @06:49AM
(#30146997)
This isn't what happens - you do a port forward and you access your services through localhost:port. Nothing else goes through the tunnel. Endpoint services see the ec2 ip. There is no IP "switching" or risk of getting banned.
But if your ec2 service has security group access to multiple things it's extremely useful because you can hit localhost:xxxx for postgres, localhost:yyyy for elasticsearch, etc.
Re:I discovered thousands of open databases on AWS
by noduerme on Tuesday February 01, 2022 @11:40PM
(#30173779)
This wouldn't be efficient in my case. I'm testing a frontend that's served on localhost:80 and connects to a local backend also on localhost:80 that makes DB calls to some remote database on 3306. I'd have to modify the backend code to connect through the proxy port every time I wanted to test it. As it is the backend code on my computer is a mirror of the production environment. Normally if I tunnel I have it set up to forward everything through the tunnel except localhost.
Re:I discovered thousands of open databases on AWS
by nkozyra on Tuesday February 08, 2022 @12:07PM
(#30261049)
In this case you'd simply do the tunnel for 3306:3306.
Your frontend and backend code would run locally and connect to MySQL through the proxy. You wouldn't have to change any backend configuration.
Re:I discovered thousands of open databases on AWS
by pettycashstash2 on Monday January 31, 2022 @06:44AM
(#30146979)
Plus this. I use ssh tunneling with private keys to access my Mariadb or MySQL instances.
It would probably be less effort than updating security rules each time