使用静态 IP 进行流量重定向的服务器
我在网络服务器上使用Google Cloud上的应用引擎。 Web服务器必须与API进行通信,以从客户端获取各种数据。
对于特定的客户端,我需要服务器的静态IP才能将其列入白色。但是,我无法在App Engine上控制这一点。我考虑过在某个地方创建用静态IP地址的流量重新路由的服务器。最好的解决方案是什么?
Thanks,
Paul
I use app engine on google cloud for my webserver. The webserver must communicate with APIs to fetch all kind of data from clients.
For a specific client, I need a static IP for my server for it to be whitelisted. However, I can't control this on app engine. I thought about creating somewhere a server acting as a traffic rerouting with a static IP address. What would be the best solutions for this ?
Thanks,
Paul
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要为您的应用发动机标准环境服务设置静态IP地址,请使用 带有云路由器和 cloud noreferrer“> cloud nat 。通过使用无服务器VPC访问,您可以将出口流量发送到虚拟私有云(VPC)网络。通过使用VPC上的网络地址转换(NAT)网关,您可以通过专用的IP地址路由应用程序引擎流量。
通过云NAT路由流量不会在网络堆栈中引起额外的跳跃,因为云NAT网关和云路由器仅提供控制平面,并且数据包不会穿过云NAT网关或云路由器。
为了将带有外部目的地的流量发送到您的VPC网络,以便它具有指定的静态IP地址,因此必须将出口设置更改为
All-Traffic
。正如 @ferregina pelona 所提到的,如果您不想将其应用于所有服务器,那么您将需要创建一个代理服务。
按照 document 设置一个静态出站IP地址。
To set up a static IP address for your App Engine standard environment service, use Serverless VPC Access with Cloud Router and Cloud NAT. By using Serverless VPC Access, you can send egress traffic to your Virtual Private Cloud (VPC) network. By using a network address translation (NAT) gateway on your VPC, you can route the App Engine traffic through a dedicated IP address.
Routing your traffic through Cloud NAT does not cause an additional hop in your networking stack since the Cloud NAT gateway and the Cloud Router provide only a control plane and the packets do not pass through the Cloud NAT gateway or the Cloud Router.
In order to send traffic with external destinations to your VPC network so that it will have the static IP address that you specified, you must change the egress setting to
all-traffic
.And as mentioned by @Ferregina Pelona if you don’t want to apply this for all servers, then you will need to create a proxy so instead of calling the external service you can call the proxy and it calls the service.
Follow the steps mentioned in the document to set up a static outbound IP address.