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

Security: limit TTL=1 #26

Open
rozhuk-im opened this issue Jul 27, 2021 · 0 comments
Open

Security: limit TTL=1 #26

rozhuk-im opened this issue Jul 27, 2021 · 0 comments

Comments

@rozhuk-im
Copy link

It will be nice to see that udpxy set by default TTL for multicast and unicast sockets to 1, to not allow use it outside LAN.
And nice to see option to able to increase it.

For unicast sockets:

int ttl = 1;		     /*	max = 255 */
setsockopt(s, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl));

This for multicast:

u_char ttl = 1;     /*	range: 0 to 255, default = 1 */
setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant