欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

mycat配置datav白名单

程序员文章站 2022-05-18 20:46:29
...

一.获取需要配置的白名单列表

参考地址:https://help.aliyun.com/document_detail/64686.html?spm=datav.10712463.0.0.281239679Xst28

  1. 139.224.92.81/24
  2. 139.224.92.22/24
  3. 139.224.92.35/24
  4. 139.224.4.30/24
  5. 139.224.92.102/24
  6. 139.224.4.48/24
  7. 139.224.4.104/24
  8. 139.224.92.11/24
  9. 139.224.4.60/24
  10. 139.224.92.52/24
  11. 139.224.4.26/24
  12. 139.224.92.57/24
  13. 112.74.156.111/24
  14. 120.76.104.101/24
  15. 139.224.4.69/24
  16. 114.55.195.74/24
  17. 47.99.11.181/24
  18. 47.94.185.180/24
  19. 182.92.144.171/24
  20. 139.224.4.32/24

二.配置mycat白名单

修改/usr/local/mycat/conf/server.xml文件,增加或修改firewall - whitehost节点,参考配置如下

<firewall>
	<whitehost>
		<host host="139.224.92.81" user="gzuser2,datavmm"/>
		<host host="139.224.92.22" user="gzuser2,datavmm"/>
		<host host="139.224.92.35" user="gzuser2,datavmm"/>
		<host host="139.224.4.30" user="gzuser2,datavmm"/>
		<host host="139.224.92.102" user="gzuser2,datavmm"/>
		<host host="139.224.4.48" user="gzuser2,datavmm"/>
		<host host="139.224.4.104" user="gzuser2,datavmm"/>
		<host host="139.224.92.11" user="gzuser2,datavmm"/>
		<host host="139.224.4.60" user="gzuser2,datavmm"/>
		<host host="139.224.92.52" user="gzuser2,datavmm"/>
		<host host="139.224.4.26" user="gzuser2,datavmm"/>
		<host host="139.224.92.57" user="gzuser2,datavmm"/>
		<host host="112.74.156.111" user="gzuser2,datavmm"/>
		<host host="120.76.104.101" user="gzuser2,datavmm"/>
		<host host="139.224.4.69" user="gzuser2,datavmm"/>
		<host host="114.55.195.74" user="gzuser2,datavmm"/>
		<host host="47.99.11.181" user="gzuser2,datavmm"/>
		<host host="47.94.185.180" user="gzuser2,datavmm"/>
		<host host="182.92.144.171" user="gzuser2,datavmm"/>
		<host host="139.224.4.32" user="gzuser2,datavmm"/>
	</whitehost>
</firewall>

上面配置表示能用gzuser2和datavmm两个用户访问mycat

三.重启mycat

/usr/local/mycat/bin/mycat restart