简体   繁体   English

如何通过具有访问权限的隧道服务器来隧道隐藏在AWS安全组后面的URL?

[英]How to tunnel a URL that is hidden behind an AWS security group through a tunnel server that has access?

I have a tunnel server within the security group of an AWS ELB, I have an ingress that resolves domain names and directs the request to the correct service. 我在AWS ELB的安全组中有一个隧道服务器,我有一个ingress可以解析域名并将请求定向到正确的服务。

If I ssh into the tunnel server, I can do curl internal-url.mycompany.com/ping and it will work. 如果我使用ssh进入隧道服务器,则可以执行curl internal-url.mycompany.com/ping ,它将起作用。

I would like to do something like: sudo ssh -i key.pem -N -L 80:localhost:80 user@tunnel-server ( sudo because it's a privileged port) 我想做类似的事情: sudo ssh -i key.pem -N -L 80:localhost:80 user@tunnel-serversudo因为它是特权端口)

Then on my local machine invoke curl internal-url.mycompany.com/ping but this is not working. 然后在我的本地计算机上调用curl internal-url.mycompany.com/ping但这不起作用。

What you have in your question is almost exactly what you would need. 您所遇到的问题几乎完全是您所需要的。 sudo ssh -i key.pem -N -L 80:internal-url.mycompany.com:80 user@tunnel-server should proxy requests to your machine's localhost:80 to internal-url.mycompany.com:80 via the SSH tunnel to your tunnel-server. sudo ssh -i key.pem -N -L 80:internal-url.mycompany.com:80 user@tunnel-server应该通过SSH隧道将对计算机的localhost:80请求代理到internal-url.mycompany.com:80到您的隧道服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM