fatedier / frp

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
Apache License 2.0
81.43k stars 12.82k forks source link

希望添加防火墙功能和来源ip记录 #1264

Closed zhu-ty closed 3 years ago

zhu-ty commented 5 years ago

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权限,因此只能开端口,没有改路由表的权限……

fatedier commented 5 years ago

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

zhu-ty commented 5 years ago

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

好的,谢谢~

kgggggb commented 4 years ago

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

0312birdzhang commented 4 years ago

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

ifu25 commented 4 years ago

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

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

0312birdzhang commented 4 years ago

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

图片

ifu25 commented 4 years ago

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

图片

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

fatedier commented 4 years ago

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

0312birdzhang commented 4 years ago

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

arugal commented 4 years ago

image

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

fatedier commented 4 years ago

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

arugal commented 4 years ago

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

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

fatedier commented 4 years ago

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

bearkr commented 4 years ago

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

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

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

bearkr commented 4 years ago

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

xqzr commented 4 years ago

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

https://github.com/fatedier/frp/blob/8668fef136baceacf974f7ef4859d108d413a42e/conf/frps_full.ini#L114

ohroy commented 4 years ago

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

xiaoxin2016 commented 3 years ago

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

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

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

L1uTongwei commented 1 year ago

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

L1uTongwei commented 1 year ago

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

kgggggb commented 1 year ago

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

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