在AWS中设置IP和端口转发

在AWS中设置IP和端口转发

我在 AWS EC2 中有一个 Web 服务器,例如http://11.22.33.44监听端口 80。我想做一些诸如端口转发之类的事情,例如如果我正在使用家庭网络浏览网站 IPhttp://11.22.33.44:8001,它将流量转发/转换到我的 AWS 服务器中的端口 80 并浏览我的网站。

我怎样才能在AWS中做到这一点?我只需要将此规则应用于来自我的家庭网络的任何源流量,但在其他网络环境中,它仍然应该浏览到http://11.22.33.44端口 80。

答案1

您必须设置一个 Web 服务器,例如 Apache 或 Nginx。成功设置后,您可以编写一条规则来在本地 IP 上转发您的端口。以下是设置网络服务器的一些很好的参考:-

阿帕奇=>https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-18-04-quickstart

Nginx=>https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-18-04-quickstart

相关内容