Skip to content

Instantly share code, notes, and snippets.

@giskou
Last active March 16, 2017 15:51
Show Gist options
  • Select an option

  • Save giskou/47533c743073ac752f60449e0f3c9f0e to your computer and use it in GitHub Desktop.

Select an option

Save giskou/47533c743073ac752f60449e0f3c9f0e to your computer and use it in GitHub Desktop.
Get all azure public IP ranges
curl -s https://www.microsoft.com/en-us/download/confirmation.aspx?id=41653 \
| grep 'mscom-link failoverLink' \
| egrep --only-matching 'http.*xml' \
| xargs curl -s \
| egrep --only-matching '(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment