Skip to content
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

Easy to DoS? #324

Open
kchiem opened this issue Jan 18, 2024 · 2 comments
Open

Easy to DoS? #324

kchiem opened this issue Jan 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@kchiem
Copy link

kchiem commented Jan 18, 2024

Describe the bug

I had a tunnel where requests through it were very slow and timing out at times. Noticed a bunch of these errors on the server side rathole instance:

2024-01-18T12:16:37.565691Z ERROR rathole::server: Failed to do transport handshake: Failed to do noise handshake: IO error: Connection reset by peer (os error 104): Connection reset by peer (os error 104)                                   
2024-01-18T12:16:37.565910Z ERROR rathole::server: Failed to do transport handshake: Failed to do noise handshake: IO error: early eof: early eof     

Changed the port the server was listening on and the errors and problems went away. It seems just a little bit of unauthorized traffic to the rathole server port was enough to really mess up performance.

To Reproduce
Steps to reproduce the behavior:

  1. establish tunnel
  2. hit the bind_addr on the server with random traffic

Configuration
Configuration used to reproduce the behavior:

server.toml:

bind_addr = "0.0.0.0:1234"

[server.transport]
type = "noise"

[server.transport.noise]
local_private_key = "<priv key>"

[server.services.service]
token = "<token>"
bind_addr = "0.0.0.0:2345"

client.toml:

[client]
remote_addr = "host:1234"

[client.transport]
type = "noise"

[client.transport.noise]
remote_public_key = "<public key>"

[client.services.service]
token = "<token>"
local_addr = "127.0.0.1:3456"

Logs
Posted above.

Environment:

  • OS: Debian 9.13 on the server, Debian 12 on the client
  • rathole --version output: Build Version: 0.5.0 on both
  • CPU architecture: x86_64
@kchiem kchiem added the bug Something isn't working label Jan 18, 2024
@fernvenue
Copy link
Contributor

I suggest testing your application on the client side without rathole, it seems that your application is actively refusing the connection.

@kchiem
Copy link
Author

kchiem commented Jan 18, 2024

I did that. Spent a few hours trying other things before I got down to trying a different server port for rathole. Then the rathole errors went away and the application being tunneled was responsive again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants