1Panel icon indicating copy to clipboard operation
1Panel copied to clipboard

[Bug] Panel Settings-Security-Authorized IP Functional Abnormal Feedback

Open JinkaiNiu opened this issue 1 year ago • 10 comments

Contact Information

[email protected]

1Panel Version

专业版 v1.10.25-lts

Problem Description

在面板 面板设置-安全-授权IP功能中,增加IP地址段,增加了8669条之后,保存,面板就无法访问了,必须将IP访问验证关了才行,但是实际上访问的IP是在授权IP配置的清单之内的,配置的格式是0.0.0.0/0这种格式的。

Steps to Reproduce

在面板 面板设置-安全-授权IP功能中,增加IP地址段,增加了8669条之后,保存,面板就无法访问了。

The expected correct result

正常应该可以生效并且实现授权访问验证

Related log output

日志显示均正常。

Additional Information

No response

JinkaiNiu avatar Feb 21 '25 00:02 JinkaiNiu

感谢反馈,这边的实现原理大概是在接收到每个请求时,先遍历授权 ip ,看是否存在,不存在就报错返回,存在就继续

这里面板无法访问可以看一下接口是否都响应超时,另外想问一下,啥情况会用设置这么多授权 ip 呢?

ssongliu avatar Feb 21 '25 02:02 ssongliu

感谢反馈,这边的实现原理大概是在接收到每个请求时,先遍历授权 ip ,看是否存在,不存在就报错返回,存在就继续

这里面板无法访问可以看一下接口是否都响应超时,另外想问一下,啥情况会用设置这么多授权 ip 呢?

不支持设置授权访问地区,所以只能把国内的段全部加进去。

JinkaiNiu avatar Feb 21 '25 03:02 JinkaiNiu

感谢反馈,这边的实现原理大概是在接收到每个请求时,先遍历授权 ip ,看是否存在,不存在就报错返回,存在就继续

这里面板无法访问可以看一下接口是否都响应超时,另外想问一下,啥情况会用设置这么多授权 ip 呢?

没有出现访问超时的情况。

JinkaiNiu avatar Feb 21 '25 03:02 JinkaiNiu

感谢反馈,这边的实现原理大概是在接收到每个请求时,先遍历授权 ip ,看是否存在,不存在就报错返回,存在就继续 这里面板无法访问可以看一下接口是否都响应超时,另外想问一下,啥情况会用设置这么多授权 ip 呢?

不支持设置授权访问地区,所以只能把国内的段全部加进去。

建议使用 WAF 功能来实现地域访问限制。

wanghe-fit2cloud avatar Feb 21 '25 03:02 wanghe-fit2cloud

感谢反馈,这边的实现原理大概是在接收到每个请求时,先遍历授权 ip ,看是否存在,不存在就报错返回,存在就继续 这里面板无法访问可以看一下接口是否都响应超时,另外想问一下,啥情况会用设置这么多授权 ip 呢?

不支持设置授权访问地区,所以只能把国内的段全部加进去。

建议使用 WAF 功能来实现地域访问限制。

我是需要对面板服务进行访问控制,面板里面的waf无法对面板进行访问控制。

JinkaiNiu avatar Feb 21 '25 03:02 JinkaiNiu

感谢反馈,这边的实现原理大概是在接收到每个请求时,先遍历授权 ip ,看是否存在,不存在就报错返回,存在就继续 这里面板无法访问可以看一下接口是否都响应超时,另外想问一下,啥情况会用设置这么多授权 ip 呢?

不支持设置授权访问地区,所以只能把国内的段全部加进去。

建议使用 WAF 功能来实现地域访问限制。

我是需要对面板服务进行访问控制,面板里面的waf无法对面板进行访问控制。

将面板添加为反向代理网站。

wanghe-fit2cloud avatar Feb 21 '25 03:02 wanghe-fit2cloud

感谢反馈,这边的实现原理大概是在接收到每个请求时,先遍历授权 ip ,看是否存在,不存在就报错返回,存在就继续 这里面板无法访问可以看一下接口是否都响应超时,另外想问一下,啥情况会用设置这么多授权 ip 呢?

不支持设置授权访问地区,所以只能把国内的段全部加进去。

建议使用 WAF 功能来实现地域访问限制。

我是需要对面板服务进行访问控制,面板里面的waf无法对面板进行访问控制。

将面板添加为反向代理网站。

好的,感谢🙏

JinkaiNiu avatar Feb 21 '25 03:02 JinkaiNiu

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Thanks for the feedback, the implementation principle here is probably that when receiving each request, first traverse the authorized ip to see if it exists. If it does not exist, it will report an error and return, and if it exists, it will continue. If the board cannot be accessed, you can see if the interfaces respond to timeouts. Also, I would like to ask, what will be the situation of setting up so many authorization IPs?

Setting authorized access areas is not supported, so you can only add all domestic segments.

It is recommended to use the WAF function to achieve geographic access restrictions.

I need to access control of the panel service, and the waf inside the panel cannot access control of the panel.

Add the panel as a reverse proxy site.

OK, thank you 🙏

wanghe-fit2cloud avatar Feb 21 '25 03:02 wanghe-fit2cloud

@wanghe-fit2cloud 您好 我实际测试了下 是您说的这个逻辑 可能是把允许访问的IP段进行了遍历,但是我测试了下 加了146条 之后 登录过程和页面相应就很慢 ,还是希望优化下这块的功能,API接口访问的功能里面也包含了允许访问白名单的功能,但是测试也正常 即使加了8000条也正常

Image

Image

JinkaiNiu avatar Feb 21 '25 15:02 JinkaiNiu

我们在 v2 版本对 WAF 功能进行了优化和重构。目前该功能已进入测试阶段,后续将与 2.0 版本一起发布。

wanghe-fit2cloud avatar Feb 22 '25 04:02 wanghe-fit2cloud