If you wish to content match based on an IP address or IP ranges and send traffic to particular servers or SubVSs, please follow the steps below in the LoadMaster Web User Interface (WUI):
- In the main menu, select Rules & Checking and Content Rules.
- Click Create New.
- Enter a recognizable Rule Name, for example match_Src.
- Select Content Matching as the Rule Type.
- Select Regular Expression as the Match Type.
- Enter src-ip in the Header Field.
- Enter the text to be matched in the Match String text box.
- Fill out any other fields as needed.
- Click Create Rule.
- Repeat the steps to perform more matches.
- In the main menu, select Virtual Services and View/Modify Services.
- Click Modify on the relevant Virtual Service.
- Expand the Advanced Properties section.
- Enable Content Switching.
- Expand the Real Servers section.
- Click None on the relevant Real Server.
- Add match_Src.
- Repeat the steps to add any more content rules as needed.
The above example will only match one specific IP address. You can also use regular expressions to match ranges.
Below is an example of a regular expression to match ranges:
This example will match IP addresses in the range 192.168.0.0 to 192.168.255.254
The above Regex string would be entered in the Match String field in the Create Rule screen.