-
-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
How to get the real IP of client side when using TCP proxy? #4135
Comments
Thanks a lot. As I mentioned above, I want to get the real ip from TCP client, NOT from HTTP client. It's a TCP application, NOT a HTTP application. And I run my frpc in a docker container. |
你的 TCP 客户端 需要实现 |
谢谢回复。 1、没有看到有配置参考案例,您有的话,发一个给看看 |
抱歉...我错过了一些信息。 |
嗯嗯,这个说法成立。我查查看SSHD有无这类支持。 |
In fact, I also would like to know whether the FRPS server-side log files can be configured to record the IP address of each client connections. At the same time, to check which IP is occupying each port of the frps |
Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close. |
Bug Description
Actually it's not a bug, it's a discussion. But since no place to discuss it, I have to post it here. Sorry for that.
I just can't get the real IP from client side when I deploy my services behind frp TCP proxies running in a docker container, both FRPS and FRPC. Let me describe it clearly below.
On the service side in my LAN, it's a host server runs many docker containers. Of course, I devided each service into individual container. In them, there is a frpc service running in one of them. I use this frpc to expose my ssh service to public network on frps, on which the exposed port is 31818. ( I disabled password login on the SSHD so that only authorized users can login through port 31818 with certificated private key)
Even I know it's safe now for my SSHD, but as you know there are still many illegal break-in tries everyday and everytime happen on port 31818. They all left foot marks in /var/log/secure, such as below:
And in the log file of frps side, you will look :
The IP 172.18.0.2 is the address of the frpc container. It means sshd gets no real ip of the client side but only the ip address of the frpc container.
The IP 108.179.aaa.143 and 87.107.aaa.59 are address of connection users, nothing can identify the visitions are legal or illegal.
Anybody knows how to get the real ip from client side, please let me know. I'll be appriciate.
All the best.
frpc Version
0.54.0
frps Version
0.54.0
System Architecture
linux/amd64 docker
Configurations
normally configuration. no special
Logs
No response
Steps to reproduce
...
Affected area
The text was updated successfully, but these errors were encountered: