| Prev | Next |
Normally, Guardian@JUMPERZ.NET protects only one web server. This plugin enables you to protect two or more web servers.
This plugin is named "MultiHost", and the name of the class is:
net.jumperz.app.MGuardian.plugin.MMultiHost
First, you must create a configuration file for this plugin. See the following example.
www1.example.com=192.168.1.2:80
www2.example.com=192.168.1.3
www3.example.com=192.168.1.3:82
All lines are in a format like "Hostname=IP Address:Port number". You can omit the port number if the value is 80.
Next, add a line to the "control" file like this:
multiHost.configFileName=/etc/guardian/multiHost
In this example, "/etc/guardian/multiHost" is the name of the configuration file.
Next, configure the "rule" file so that this plugin will be loaded. You can use GID2 like this:
<rule>
id=GID2
revision=1
name=ExecDefaultPlugins(request)
type=requestLine
pattern=^
condition=match
case_sensitive=no
log=no
action=none
command=none
plugin=net.jumperz.app.MGuardian.plugin.MIllegalEncodingDetector
plugin=net.jumperz.app.MGuardian.plugin.MIllegalBodyEncodingDetector
plugin=net.jumperz.app.MGuardian.plugin.MUriNormalizer
plugin=net.jumperz.app.MGuardian.plugin.MMultiHost
</rule>
When the value of the "Host" header field is not found in the configuration file, Guardian@JUMPERZ.NET uses the "targetHost" and the "targetPort" value of the "control" file.