This topic describes how to filter IP addresses using proxy elements to define rules for a particular IP address or set of addresses.
To filter IP addresses, open MashupCenter_install_root\mm\config\proxy-config.xml
, and use the new proxy:ipfilter
element to define which IP addresses to filter. You can use a proxy:deny
element to define a black-list
rule for a particular IP address or set of addresses, or you can use a proxy:allow
element to define a white-list
rule for a particular IP address or set of addresses.
For example, look at the following code:
<proxy:mapping contextpath="/proxy/*" />
<proxy:policy url="*" acf="none">
In this example, the IP filter does the following filters:
- blocks all 9.6.*.* IP addresses
- allows 9.6.1.* but blocks the specific IP address 184.108.40.206
So, in this case, the proxy would not allow access to IP address 220.127.116.11 or 18.104.22.168 and would respond with the following message:
BMWPX0018E: The specified target hosts IP-address is prohibited by rule.
However, it would allow access to 22.214.171.124 or 126.96.36.199 but would deny access to 188.8.131.52.
As you add new filter rules, you can combine them in a number of ways, but the proxy always handles them in order. This means that the last matching rule will always take effect, regardless of any allow and deny rules that come before it.
Parent topic: Advanced configuration