[GH-ISSUE #1264] 希望添加防火墙功能和来源ip记录 #1002

Closed
opened 2026-05-05 12:38:40 -06:00 by gitea-mirror · 21 comments
Owner

Originally created by @zhu-ty on GitHub (May 28, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1264

Issue is only used for submitting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)

Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST

What version of frp are you using (./frpc -v or ./frps -v)?
0.25.3

What operating system and processor architecture are you using (go env)?
Ubuntu16.04

Configures you used:

Steps to reproduce the issue:
1.2.3.
Describe the results you received:
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
Can you point out what caused this issue (optional)

This IS A FEATURE REQUEST:
1.希望能添加每个客户端自由配置的防火墙功能,比如一个frps下有两个frpc,每个frpc有自己的白名单iplist,只有该list的ip能通过frps访问这个frpc
2.frps的log我有点看不太懂……,似乎只写了frpc的ip而不是访问frps的ip,希望log能记录一下访问frps的源ip

近期感觉自己挂出来的windows 远程桌面有被黑客破解的大量记录(无数的重复connection),不知道怎么处置最为科学?我没有frps所在服务器的sudo权限,因此只能开端口,没有改路由表的权限……

Originally created by @zhu-ty on GitHub (May 28, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1264 Issue is only used for submitting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. (为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。) Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST **What version of frp are you using (./frpc -v or ./frps -v)?** 0.25.3 **What operating system and processor architecture are you using (`go env`)?** Ubuntu16.04 **Configures you used:** **Steps to reproduce the issue:** 1.2.3. **Describe the results you received:** **Describe the results you expected:** **Additional information you deem important (e.g. issue happens only occasionally):** **Can you point out what caused this issue (optional)** This IS A FEATURE REQUEST: 1.希望能添加每个客户端自由配置的防火墙功能,比如一个frps下有两个frpc,每个frpc有自己的白名单iplist,只有该list的ip能通过frps访问这个frpc 2.frps的log我有点看不太懂……,似乎只写了frpc的ip而不是访问frps的ip,希望log能记录一下访问frps的源ip 近期感觉自己挂出来的windows 远程桌面有被黑客破解的大量记录(无数的重复connection),不知道怎么处置最为科学?我没有frps所在服务器的sudo权限,因此只能开端口,没有改路由表的权限……
gitea-mirror 2026-05-05 12:38:40 -06:00
Author
Owner

@fatedier commented on GitHub (Jun 4, 2019):

以后会考虑通过插件的方式来开放接入这些功能的能力,但是近期不会直接实现这样的功能。

<!-- gh-comment-id:498511917 --> @fatedier commented on GitHub (Jun 4, 2019): 以后会考虑通过插件的方式来开放接入这些功能的能力,但是近期不会直接实现这样的功能。
Author
Owner

@zhu-ty commented on GitHub (Jun 6, 2019):

以后会考虑通过插件的方式来开放接入这些功能的能力,但是近期不会直接实现这样的功能。

好的,谢谢~

<!-- gh-comment-id:499467131 --> @zhu-ty commented on GitHub (Jun 6, 2019): > 以后会考虑通过插件的方式来开放接入这些功能的能力,但是近期不会直接实现这样的功能。 好的,谢谢~
Author
Owner

@kgggggb commented on GitHub (Jul 23, 2019):

开放本地API就很强了啊,我倒是希望可以出一个修改默认404页面的插件

<!-- gh-comment-id:514348490 --> @kgggggb commented on GitHub (Jul 23, 2019): 开放本地API就很强了啊,我倒是希望可以出一个修改默认404页面的插件
Author
Owner

@0312birdzhang commented on GitHub (Jan 3, 2020):

最近发现不管是ssh还是rdp都被扫了,关键是看不到来源ip,相当尴尬

<!-- gh-comment-id:570477084 --> @0312birdzhang commented on GitHub (Jan 3, 2020): 最近发现不管是ssh还是rdp都被扫了,关键是看不到来源ip,相当尴尬
Author
Owner

@ifu25 commented on GitHub (Mar 24, 2020):

最近发现不管是ssh还是rdp都被扫了,关键是看不到来源ip,相当尴尬

同样的问题,windows 系统日志中出现大量登录失败的记录,来源ip看着就想哭,全是 127.0.0.1~

<!-- gh-comment-id:603032156 --> @ifu25 commented on GitHub (Mar 24, 2020): > 最近发现不管是ssh还是rdp都被扫了,关键是看不到来源ip,相当尴尬 同样的问题,windows 系统日志中出现大量登录失败的记录,来源ip看着就想哭,全是 127.0.0.1~
Author
Owner

@0312birdzhang commented on GitHub (Mar 24, 2020):

@ifu25 看看我的😂,准备用二步认证工具了

图片

<!-- gh-comment-id:603037111 --> @0312birdzhang commented on GitHub (Mar 24, 2020): @ifu25 看看我的😂,准备用二步认证工具了 ![图片](https://user-images.githubusercontent.com/1762041/77393894-06f0da00-6dd9-11ea-9218-48d13b971fcc.png)
Author
Owner

@ifu25 commented on GitHub (Mar 24, 2020):

@ifu25 看看我的😂,准备用二步认证工具了

图片

哈哈,就是这个样子,有什么好用的工具分享下哈~

<!-- gh-comment-id:603039526 --> @ifu25 commented on GitHub (Mar 24, 2020): > @ifu25 看看我的😂,准备用二步认证工具了 > > ![图片](https://user-images.githubusercontent.com/1762041/77393894-06f0da00-6dd9-11ea-9218-48d13b971fcc.png) 哈哈,就是这个样子,有什么好用的工具分享下哈~
Author
Owner

@fatedier commented on GitHub (Mar 24, 2020):

服务端插件的功能已经开放,近期会基于插件的能力实现一个简单的防火墙的能力。
后续可以关注 https://github.com/gofrp/plugin 这个 repo。

<!-- gh-comment-id:603040845 --> @fatedier commented on GitHub (Mar 24, 2020): 服务端插件的功能已经开放,近期会基于插件的能力实现一个简单的防火墙的能力。 后续可以关注 https://github.com/gofrp/plugin 这个 repo。
Author
Owner

@0312birdzhang commented on GitHub (Mar 24, 2020):

@ifu25 之前用duo security, 有时候网络不好二步认证弹不出来。现在也在找其他的方法。
或者曲线救国,用netstat -tn 找出尝试连接的ip,然后iptables drop掉。

<!-- gh-comment-id:603042576 --> @0312birdzhang commented on GitHub (Mar 24, 2020): @ifu25 之前用duo security, 有时候网络不好二步认证弹不出来。现在也在找其他的方法。 或者曲线救国,用netstat -tn 找出尝试连接的ip,然后iptables drop掉。
Author
Owner

@rainbend commented on GitHub (Apr 1, 2020):

image

@fatedier 我在我fork的仓库上拓展了服务端插件, 支持记录访问代理的源IP, 截图中的TraceAccessIp就是通过我拓展的功能实现的。不知道对于你有没有意义?我可以发起一个合并请求reviewy一下代码 :)

<!-- gh-comment-id:607265522 --> @rainbend commented on GitHub (Apr 1, 2020): ![image](https://user-images.githubusercontent.com/26432832/78144869-c3464200-7462-11ea-8e6b-f8f7974bea47.png) @fatedier 我在我fork的仓库上拓展了服务端插件, 支持记录访问代理的源IP, 截图中的TraceAccessIp就是通过我拓展的功能实现的。不知道对于你有没有意义?我可以发起一个合并请求reviewy一下代码 :)
Author
Owner

@fatedier commented on GitHub (Apr 2, 2020):

@arugal 欢迎贡献相关的代码,不过我们最好另外开一个 feature issue,经过充分讨论和设计后再开始编码,避免之后意见不一致需要频繁改动。

<!-- gh-comment-id:607594537 --> @fatedier commented on GitHub (Apr 2, 2020): @arugal 欢迎贡献相关的代码,不过我们最好另外开一个 feature issue,经过充分讨论和设计后再开始编码,避免之后意见不一致需要频繁改动。
Author
Owner

@rainbend commented on GitHub (Apr 2, 2020):

@arugal 欢迎贡献相关的代码,不过我们最好另外开一个 feature issue,经过充分讨论和设计后再开始编码,避免之后意见不一致需要频繁改动。

好的,在这几天我会开一个相关的ISSUSE,描述以下大概的实现逻辑

<!-- gh-comment-id:607596576 --> @rainbend commented on GitHub (Apr 2, 2020): > @arugal 欢迎贡献相关的代码,不过我们最好另外开一个 feature issue,经过充分讨论和设计后再开始编码,避免之后意见不一致需要频繁改动。 好的,在这几天我会开一个相关的ISSUSE,描述以下大概的实现逻辑
Author
Owner

@fatedier commented on GitHub (Apr 2, 2020):

@arugal 如果可以的话,feature issue 尽量用英文,可以让更多的人参与进来。

<!-- gh-comment-id:607602031 --> @fatedier commented on GitHub (Apr 2, 2020): @arugal 如果可以的话,feature issue 尽量用英文,可以让更多的人参与进来。
Author
Owner

@bearkr commented on GitHub (Apr 14, 2020):

@ifu25 看看我的joy,准备用二步认证工具了
图片

哈哈,就是这个样子,有什么好用的工具分享下哈~

我使用的stcp方式,不存在你们说的问题!

<!-- gh-comment-id:613458292 --> @bearkr commented on GitHub (Apr 14, 2020): > > @ifu25 看看我的joy,准备用二步认证工具了 > > ![图片](https://user-images.githubusercontent.com/1762041/77393894-06f0da00-6dd9-11ea-9218-48d13b971fcc.png) > > 哈哈,就是这个样子,有什么好用的工具分享下哈~ 我使用的stcp方式,不存在你们说的问题!
Author
Owner

@bearkr commented on GitHub (Apr 14, 2020):

也可以试试frp的stcp方式加TV的LAN呼入,提高安全性和远程体验!

<!-- gh-comment-id:613459840 --> @bearkr commented on GitHub (Apr 14, 2020): 也可以试试frp的stcp方式加TV的LAN呼入,提高安全性和远程体验!
Author
Owner

@xqzr commented on GitHub (Apr 15, 2020):

开放本地API就很强了啊,我倒是希望可以出一个修改默认404页面的插件

8668fef136/conf/frps_full.ini (L114)

<!-- gh-comment-id:613819967 --> @xqzr commented on GitHub (Apr 15, 2020): > 开放本地API就很强了啊,我倒是希望可以出一个修改默认404页面的插件 https://github.com/fatedier/frp/blob/8668fef136baceacf974f7ef4859d108d413a42e/conf/frps_full.ini#L114
Author
Owner

@ohroy commented on GitHub (Apr 23, 2020):

mark, 今天同遇这个问题。静待进一步的解决方案

<!-- gh-comment-id:618191579 --> @ohroy commented on GitHub (Apr 23, 2020): mark, 今天同遇这个问题。静待进一步的解决方案
Author
Owner

@xiaoxin2016 commented on GitHub (Jul 3, 2020):

日志开在debug模式下,假定放在/var/log/frps.log中。

cat /var/log/frps.log | grep "get a user connection" | grep -v "127.0.0.1"

最后面中括号里的就是IP和端口信息。

<!-- gh-comment-id:653514352 --> @xiaoxin2016 commented on GitHub (Jul 3, 2020): 日志开在debug模式下,假定放在/var/log/frps.log中。 `cat /var/log/frps.log | grep "get a user connection" | grep -v "127.0.0.1"` 最后面中括号里的就是IP和端口信息。
Author
Owner

@L1uTongwei commented on GitHub (Jul 31, 2022):

@fatedier @arugal 想问下防火墙这个问题解决了吗,是如何解决的

<!-- gh-comment-id:1200337206 --> @L1uTongwei commented on GitHub (Jul 31, 2022): @fatedier @arugal 想问下防火墙这个问题解决了吗,是如何解决的
Author
Owner

@L1uTongwei commented on GitHub (Jul 31, 2022):

我可以用fail2ban根据日志生成一个IP禁止列表,问题是能否直接禁止某个IP访问
我穿透的服务可以正常识别真实IP 只是禁止IP访问这里有问题
不想装nginx之类的web服务器进行反向代理,因为其配置麻烦还不易管理

<!-- gh-comment-id:1200337364 --> @L1uTongwei commented on GitHub (Jul 31, 2022): 我可以用fail2ban根据日志生成一个IP禁止列表,问题是能否直接禁止某个IP访问 我穿透的服务可以正常识别真实IP 只是禁止IP访问这里有问题 不想装nginx之类的web服务器进行反向代理,因为其配置麻烦还不易管理
Author
Owner

@kgggggb commented on GitHub (Aug 26, 2022):

也可以试试frp的stcp方式加TV的LAN呼入,提高安全性和远程体验!

增加个锤子远程体验,我移动端不要用吗😅

<!-- gh-comment-id:1229049254 --> @kgggggb commented on GitHub (Aug 26, 2022): > 也可以试试frp的stcp方式加TV的LAN呼入,提高安全性和远程体验! 增加个锤子远程体验,我移动端不要用吗😅
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#1002
No description provided.