白名单和SQL 黑名单说明:
在server.xml 中配置:
<firewall>
<whitehost>
<host user="mycat" host="127.0.0.1"></host> ip 白名单用户对应的可以访问的ip 地址
</whitehost>
<blacklist check="true">
<property name="selelctAllow">false</property> 黑名单允许的权限后面为默认
</blacklist>
</firewall>
黑名单拦截明细配置
配置demo
新增IP 限制登陆功能,与mysql 账号授权指定IP 段类似,下面介绍用法。在server.xml 添加信
任IP /SQL 黑名单
示例:
只允许xx IP 的主机登陆,并且不允许执行SELECT *操作
<firewall>
<whitehost>
<host host="自己指定IP" user="test"></host>
</whitehost>
<blacklist check="true">
<property name="selectAllColumnAllow">false</property>
</blacklist>
</firewall>
使用指定主机登陆,执行SELECT *,被限制执行