-
Notifications
You must be signed in to change notification settings - Fork 273
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
autonat/README: Document DOS attack prevention #369
Conversation
Document that peers MUST NOT dial addresses that are not based on the IP addresses the requesting node is observed as. Corresponding logic in Golang implementation: https://github.com/libp2p/go-libp2p-autonat/blob/1247ac6d9fa798e7032127878a6f3d0b9eb487c6/svc.go#L133-L147
autonat/README.md
Outdated
@@ -52,6 +52,23 @@ Upon receiving this message, the peer starts to dial these addresses. It MAY | |||
dial all of them in parallel. The peer MAY use a different IP and peer ID than | |||
it uses for its regular libp2p connection to perform these dial backs. | |||
|
|||
In order to prevent attacks like the one described below, implementations | |||
MUST NOT dial any multiaddress unless it is based on the IP address the | |||
requesting node is observed as. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requesting node is observed as. | |
requesting node is observed as, as described in [RFC 3489, Section 12.1.1](https://www.rfc-editor.org/rfc/rfc3489#section-12.1.1): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a bit confused. Is the full citation of the paragraph + the link below not enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the confusion. I'd prefer to have the link above, not below. If you accept this suggestion, please remove the link below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 314ae0e with a slight rewording. Let me know what you think @marten-seemann.
d806703
to
314ae0e
Compare
Sorry for the force-push. I missed that the |
Document that peers MUST NOT dial addresses that are not based on the IP
addresses the requesting node is observed as.
Corresponding logic in Golang implementation:
https://github.com/libp2p/go-libp2p-autonat/blob/1247ac6d9fa798e7032127878a6f3d0b9eb487c6/svc.go#L133-L147
(Pointed out by @marten-seemann.)