mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #1639] 请问下能否在日志里面追踪到通过frp来访问内网服务的用户的源IP #1299
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#1299
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @starsliao on GitHub (Feb 5, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/1639
frps和frpc都是安装的0.31.1的版本
frps和frpc的日志级别都开到了trace。
使用场景是这样的:
frps部署在阿里云的服务器。frpc部署在内网,通过frps来访问内网的一个socks5服务。这样外网用户就可以通过这个socks5代理来访问整个内网的服务了。
目前的问题是:
现在有人通过socks5连接内网的一台服务器的ssh,然后我在socks5的日志找到了请求源,是10.118.71.232:37369,然后我在frpc的日志中localConn(l[10.118.71.232:37369]部分也找到了一样的信息,但是我在frps的日志里面却无法找到是哪个外网源IP发起了10.118.71.232:37369的请求?
请问下能否找到访问我内网服务器ssh服务的外网用户的源IP?
我看了很多issues ,但是我使用的socks5访问danted 好像不支持PROXY protocol 。所以才想从日志里来想办法。或者有没有能推荐一款socks5服务端
@fatedier commented on GitHub (Feb 12, 2020):
frps 的 Debug 级别的日志中,会有一条
join connections的日志,其中 workConn 的 r 就是表示用户请求的 IP 地址。PROXY protocol 只是一种协议,如果你有能力,你也可以自己写程序解析这个协议,去掉这部分之后再转发给 socks5 服务端。
@starsliao commented on GitHub (Feb 16, 2020):
这个IP我看到了是用户的外网IP,但是没法关联上对应的到内网的请求,也就没法知道是哪个外网用户请求内网对应的服务。
@fatedier commented on GitHub (Feb 16, 2020):
如果你一定要和你的请求对应上,建议还是使用 PROXY protocol 协议,然后自己解析。