-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FRPS日志中有没有可能记录得到请求头传递的地址 #4640
Comments
单纯讨论 http 代理的话,是能获取到的。代码这里 req 就是客户端请求,header / path / queryparams 等都可以在这里获取到。一般来说 http(s) 代理会通过 header( 而对于 tcp 连接,debug 日志已经包含了,userConn.RemoteAddr()。 我现在的方案是:
自定义的 action: # write to dir action.d/remote.local
# send ban ip to remote
[Definition]
actionstart =
actionstop =
timeout =
# test
# actionban = echo 'ban <ip>. matches=<matches> ' >> /var/log/fail2ban.log
# actionunban = echo unban <ip> >> /var/log/fail2ban.log
actionban = ssh ali 'fail2ban-client set sshd banip <ip>'
actionunban = ssh ali 'fail2ban-client unban <ip>' 然后在目标 jail 里配置: [sshd]
enabled = true
banaction = remote
[jupyter]
enabled = true
backend = systemd[journalflags=1]
banaction = remote |
看起来是一种解决方案,俺研究一下 |
|
Describe the feature request
我在FRPS服务后套nginx反代端口,这种情况下frps日志中获取的访问ip是127.0.0.1,我想构建一套统一基于frps.log的fail2ban规则,想请问一下frps中有没有可能在日志中获取真实访问ip。(这是一个求助issus,不是功能请求,因为我知道这种fail2ban的用法不符合一般的规范,只是我的个人情况,合理的方案应该是对nginx日志进行分析从而执行ip ban)
Describe alternatives you've considered
No response
Affected area
The text was updated successfully, but these errors were encountered: