4.5 – IP filter (iptables)
You can set up IP filesfilters for SparkGateway.SparkView.
First, save you ip filters into a JSON file. Here is the format of the IP filter configuration file:
{
"zoneRules": {
"HTTP_API": {
"allow": true,
"ranges": [
{
"from": "192.168.12.100",
"to": "192.168.12.200"
},
{
"from": "169.254.84.132"
}
]
},
"TCP": {
"allow": true,
"ranges": [
{
"from": "192.168.12.100",
"to": "192.168.12.200"
},
{
"from": "192.168.12.10",
"to": "192.168.12.20"
},
{
"from": "169.254.84.132"
}
]
}
}
}
Then, you need to specify the location of this file in gateway.conf:iptables=
C:\\workspace\\data\\iptables.json
There are 3 zones available in SparkGateway:SparkView:
- "TCP" is used to control TCP connections
- "HTTP_API" is used to control the HTTP API usage
- "CONFIG" is used to control the config.html
Rules for accessing config.html:
- Always accessible from the
localhost.localhost - Accessible from anywhere if
remoteManage=true
ingateay.gateway.conf and correct password isprovided.provided - Accessible if
remoteManage=false
and source IP is allowed iniptables.iptables