As of June 5, 2025, AWS WAF just got a powerful new capability β you can now match incoming traffic based on Autonomous System Numbers (ASNs).
This opens up a new layer of control in your WAF rules, making it easier to block:
- π« Known VPN providers
- π Malicious bot networks
- π Poor-performing ISPs
- β Or allow traffic from trusted carriers
π€ Wait, Whatβs an ASN?
An ASN (Autonomous System Number) represents a group of IP addresses owned and managed by an organization β usually:
- An ISP
- A VPN provider
- A cloud/data center provider
For example:
Google ASN β 15169
Cloudflare ASN β 13335
A shady VPN provider β 12345
π Why Is This Update So Useful?
Before:
- You had to manually maintain IP lists to block VPNs
- Couldnβt easily identify traffic by provider
- Blocking was brittle and error-prone
Now:
- Just block by ASN β clean and fast
- Works natively inside AWS WAF
- Combine it with rate limiting, geo match, IP sets, and more
π― Example: Blocking a Known VPN ASN
You notice excessive scraping or login abuse from a VPN provider with ASN 12345.
Hereβs how you block it in AWS WAF:
π οΈ In AWS Console:
- Go to your Web ACL
- Create a new Rule
- Choose "Match Rule" > ASN match
- Enter 12345
- Set Action to Block
- Save
β Done β all traffic from that ASN will now be blocked.
π Advanced Use: Rate Limit by ASN
Letβs say you want to throttle traffic instead of fully blocking:
βIf ASN 12345 sends more than 100 requests in 5 minutes, block it temporarily.β
Use a Rate-based Rule with:
- Condition: ASN match = 12345
- Rate limit: 100 requests / 5 min
- Action: Block
Perfect for mitigating abuse without hurting good traffic.
π§ TL;DR
| Feature | Benefit |
|---|---|
| ASN Match | Block entire ISP/VPN networks in one rule |
| Simpler Setup | No more chasing IPs |
| Better Control | Combine with rate limits, geo, headers, etc. |
π¬ Final Thoughts
This update gives you ISP-level control over your traffic β perfect for securing web apps against bad actors using anonymous networks.
π Better security
β‘οΈ Faster decisions
πΈ Lower WAF maintenance effort
Are you using ASN-based rules in your WAF yet? Letβs talk in the comments π
Top comments (0)