简体   繁体   中英

Azure Premium Function with static outbound IP-address using NAT Gateway not working

We have followed the instuctions in https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-use-nat-gateway several times without getting it to work (it changes outbound IP-address).

We have:

  1. Created .net with address 10.10.0.0/16 with su.net delegated to Microsoft.Web/serverFarms (10.10.3.0/24)
  2. Created static IP address
  3. Created NAT Gateway and attached it to the static IP Address and the su.net
  4. Deployed a Azure Premium Function attached to the su.net
  5. Set WEBSITE_.NET_ROUTE_ALL=1 on function
  6. Invoked test-endpoint looking up functions outbound IP using GET whatsmyip.org
  7. Recreating Su.net and reattached the function several times

All resources are setup in region "West Europe". Does anyone have a clue or insights on why this should not work?

Kind of embarrassing - but it turned out that one should not use whatsmyip.org from scripts/bots - since it then returns bogus ip-addresses. Using https://ifconfig.me showed that this worked all the time.

Thanks to Matt Douhan for pointing me in the right direction by verifing that the NAT Gateway actually got the traffic

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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