Block incoming connection/request based on defined rules.
conf/mod_block/mod_block.conf
Config Item | Description |
---|---|
Basic.ProductRulePath | path of product rule configuration |
Basic.IPBlacklistPath | path of ip blacklist file |
[basic]
# product rule config file path
ProductRulePath = mod_block/block_rules.data
# global ip blacklist file path
IPBlacklistPath = mod_block/ip_blacklist.data
Format of IPBlacklistPath file
192.168.1.253 192.168.1.254
192.168.1.250
conf/mod_block/block_rules.data
Config Item | Description |
---|---|
Version | String Verson of config file |
Config | Struct Block rules for each product |
Config{k} | String Product name |
Config{v} | Object a list of rules |
Config{v}[] | Object a block rule |
Config{v}[].Cond | String Condition expression, See Condition |
Config{v}[].Name | String Name of rule |
Config{v}[].Action | Object Action of rule |
Config{v}[].Action.Cmd | String Name of action |
Config{v}[].Action.Params | Object a list of action parameters |
Config{v}[].Action.Params[] | String a action parameter |
Action | Description |
---|---|
CLOSE | Close the connection |
{
"Version": "20190101000000",
"Config": {
"example_product": [
{
"action": {
"cmd": "CLOSE",
"params": []
},
"name": "example rule",
"cond": "req_path_in(\"/limit\", false)"
}
]
}
}