-
-
Notifications
You must be signed in to change notification settings - Fork 13.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
Can check ssh connection failed in frps log? #2470
Comments
frp do not parse traffic content between your ssh server and client. So it can't judge if the connection is failed or normal closed. |
Or can add a flag to tell server or client, if use this module it will send the real ip for proxy, and it will show in the ssh client log, not show from 127.0.0.1, port xxx. |
For ssh, Does that mean I should add
|
Yes, you should write your own service before ssh server to parse Proxy Protocol to get real ip. |
Ok, I will try nginx or python to analyzethe Proxy Protocol. |
Hi, bro I found the Proxy Protocol in sshd log file such like So, |
I try to use nginx or other python proxy-protocol to handle the tcp connect from server to ssh client. But I only can send data to ssh port which will occur the error msg: So how can I send tcp data to sshd? Can you show me some tips, I am going crazy. |
Hi, @fatedier I have found the solution to obtain the real ip from frp by using Proxy Protocol and go-mmproxy. It's now working for linux and I have no other OS system to try. Here are steps: 1. Frpc with proxy protocol:In this step, you can add FRPC config:
2. Set up for go-mmproxy:You can build it from go-mmproxy github main page or download the x86_64 binary which I build on my Ubuntu 20.04 with go version go1.16.5 linux/amd64 from the following url: go-mmproxy.zip, and move it to somepath where you want. For me, I move it to /usr/local/bin. 3. Start frp and mmproxy from systemd service:You need to create two service file to start frp and go-mmproxy from systemd control service. go-mmproxy.service: note:
frpc.service
4. Start service:
Now try you own real ip frp proxy!
|
Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close. |
@MikoyChinese Thank you, it work for me. |
Hi,
These days I found a lot of ssh connection in my frp client, but I just obtain 127.0.0.1 connection log in my ssh log file, and I check my frp server which only can show the real ip connect but no checking it failed or not.
Here is frp server log:
Can I check if this ip try to brute-force attack my client, and use the fail2ban tool to forbiden it? If you can add the failed message in the frps log file, or show the real ip in the client log file, I think it will work well.
Thanks.
The text was updated successfully, but these errors were encountered: