我正在将sage付费网关集成到我的Asp.net MVC 4网站,该网站目前在 azure app services 上运行。 所以我需要打开 azure app services 中的端口以获得 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."
答案 0 :(得分:1)
可能会有所帮助,请尝试在应用程序的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>
答案 1 :(得分:1)
Azure Web Apps infra uses different IP's for inbound and outbound communication. By default port 80 & 443 is open on Azure Web Apps infrastructure. It also doesn't restrict inbound requests from a specific IP by default, unless you have IP Restriction configured in web.config.
If you are using ASE then you will have to configure inbound and outbound rules.
See this article on how to do this: