Asp.net mvc 4 如何在my Azure App Services防火墙中允许IP地址

Asp.net mvc 4 如何在my Azure App Services防火墙中允许IP地址,asp.net-mvc-4,azure,azure-web-app-service,opayo,azure-app-service-plans,Asp.net Mvc 4,Azure,Azure Web App Service,Opayo,Azure App Service Plans,我正在将sage pay pay gateway集成到我的Asp.net MVC 4网站,该网站目前运行在azure app services上。 因此,我需要在我的azure应用程序服务中打开以上端口,以获得来自Sagepay的响应。 这就是他们要求做的 "Please ensure that all of the following IP addresses are allowed within your Server or Firewall: For outbound traffic

我正在将sage pay pay gateway集成到我的Asp.net MVC 4网站,该网站目前运行在azure app services上。 因此,我需要在我的azure应用程序服务中打开以上端口,以获得来自Sagepay的响应。 这就是他们要求做的

"Please ensure that all of the following IP addresses are allowed within your Server or Firewall: 

For outbound traffic to our gateway:
195.170.169.9 – live.sagepay.com
195.170.169.8 – test.sagepay.com
For inbound traffic you only need to whitelist IPs if you are using SERVER as this is the only solution that initiates call backs. You don’t need to apply this for our FORM and DIRECT integrations. The IPs from which we call back are:
195.170.169.14 
195.170.169.18 
195.170.169.15 
The Subnet mask used by Sage Pay is 255.255.255.000
Please ensure that your firewalls allow outbound Port 443 (HTTPS only!) and inbound Ports 443 (and optionally 80 HTTP) access in order to communicate with our servers (on Simulator/Test/Live).
There is however always scope for this to change depending on how we a utilising our data centres servers. Sage Pay own the entire 195.170.169.0/255 range (256 IP’s). If you are happy to allow this range then this automatically accommodates any future changes." 

这可能会有所帮助,请尝试将其添加到应用程序的web.config中

<system.webServer>
  <security>
    <ipSecurity allowUnlisted="false">
      <add ipAddress="123.123.123.123" allowed="true"subnetMAst="255.255.0.11"/>
    </ipSecurity>
  </security>
</system.webServer>

这可能会有所帮助,请尝试将其添加到应用程序的web.config中

<system.webServer>
  <security>
    <ipSecurity allowUnlisted="false">
      <add ipAddress="123.123.123.123" allowed="true"subnetMAst="255.255.0.11"/>
    </ipSecurity>
  </security>
</system.webServer>

Azure Web Apps infra使用不同的IP进行入站和出站通信。默认情况下,端口80和443在Azure Web应用程序基础架构上打开。 默认情况下,它也不会限制来自特定IP的入站请求,除非您在web.config中配置了IP限制

如果您使用ASE,则必须配置入站和出站规则

有关如何执行此操作,请参阅本文:


Azure Web Apps infra使用不同的IP进行入站和出站通信。默认情况下,端口80和443在Azure Web应用程序基础架构上打开。 默认情况下,它也不会限制来自特定IP的入站请求,除非您在web.config中配置了IP限制

如果您使用ASE,则必须配置入站和出站规则

有关如何执行此操作,请参阅本文:



我不知道你在问什么。入站端口80和443始终使用Azure Web应用程序打开。我将在回答部分添加该部分。你可以检查一下吗?@TDM你需要编辑你的问题,添加你发布为answer@gbellmann好的,我做到了。我不知道你在问什么。入站端口80和443始终使用Azure Web应用程序打开。我将在回答部分添加该部分。您可以检查吗?@TDM您需要编辑您的问题,将您发布的内容添加为answer@gbellmann好的,我做到了。实际上我需要在我的防火墙或服务器上做。但是我也这样做了。但是没有成功。实际上我需要在我的防火墙或服务器上做。但是我也这样做了。但是没有成功。你的意思是我不需要添加入站和出站ip地址。默认情况下,这些是允许在azure上使用?是的,您不需要或更具体地说,您甚至没有向普通web应用程序添加入站或出站规则的选项。除非您使用App Service Environment.kumar thnkz进行回复。当然可以。我们必须将ASE与VNET配置一起使用,还有很多事情要做。但如果我们已经在Azure中默认允许出站和入站ip地址,那就没有意义了。不是吗?以前我认为我需要添加单独的出站/入站地址,像wise一样打开443/80端口,但在这里这些东西已经起作用了。不是吗?我会收回一点。如果其ASE带有VNET配置,则必须允许。:)查看这些文章:你的意思是我不需要添加入站和出站ip地址。默认情况下,azure上允许这些内容?是的,你不需要,或者更具体地说,你甚至没有向普通web应用添加入站或出站规则的选项。除非您使用App Service Environment.kumar thnkz进行回复。当然可以。我们必须将ASE与VNET配置一起使用,还有很多事情要做。但如果我们已经在Azure中默认允许出站和入站ip地址,那就没有意义了。不是吗?以前我认为我需要添加单独的出站/入站地址,像wise一样打开443/80端口,但在这里这些东西已经起作用了。不是吗?我会收回一点。如果其ASE带有VNET配置,则必须允许。:)见以下文章: