Adding Azure/AWS region IPs to Network Traffic Rules

I got some days ago a question from a partner if we can limit the outgoing traffic from several locations to Amazon S3. In VBR there is a single “any to Internet” rule where you can limit the traffic, but you cannot limit this to different IP subnets. The customer has a very big range of possible line speeds and thats why the need to specify different rules based on subnet.

I figured out that Amazon as well as Microsoft provides APIs to request the IP subnets of their datacenter regions.

I created two scripts called “Add-AwsTrafficRules.ps1” and “Add-AzureTrafficRules.ps1”, which can be run with this parameters:

-Name test -SourceIPSubnet -AwsRegion eu-central-1 -ThrottlingValue 5 -ThrottlingUnit MbitPerSec
-Name test -SourceIPSubnet -AzureRegion europewest -ThrottlingValue 5 -ThrottlingUnit MbitPerSec

Already existing Rules (based on Name) will be skipped and this is the result.

Have fun with this little helper. You can find them hier:

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

thirteen − 3 =