After you add the website to WAF, configure blacklist and whitelist rules or precise protection rules to allow only specified IP addresses to access the website. WAF then blocks all source IP addresses except the specified ones.
Configuring a Precise Protection Rule to Block All Source IP Addresses Except the Specified Ones
- Log in to the management console.
- Click
in the upper left corner of the management console and select a region or project. - Click
in the upper left corner and choose Web Application Firewall (Dedicated) under Security. - In the navigation pane on the left, choose Policies.
- Click the name of the target policy to go to the protection configuration page.
- In the Precise Protection configuration area, enable the protection.
Figure 4 Precise Protection configuration area
- Click Customize Rule. In the upper left corner of the displayed page, click Add Rule.
- In the displayed Add Precise Protection Rule dialog box, add a protection rule as shown in Figure 5 to block all requests.
The priority value here must be greater than that configured in Step 9 because allowing access has a higher priority than blocking access and a smaller priority value indicates a higher priority.
Figure 5 Blocking all requests
- Click Add Rule. In the displayed Add Precise Protection Rule dialog box, add a rule for the specified IP address.
For example, if you want to allow 192.168.2.3 to access the website, add a protection rule as shown in Figure 6.
The priority value here must be smaller than that configured in Step 8 because allowing access has a higher priority than blocking access and a smaller priority value indicates a higher priority.
Figure 6 Allowing the access of a specified IP address