Only attempt to set TTL for IPv4, FreeBSD at least complains for v6.#660
Closed
DanielO wants to merge 1 commit into
Closed
Only attempt to set TTL for IPv4, FreeBSD at least complains for v6.#660DanielO wants to merge 1 commit into
DanielO wants to merge 1 commit into
Conversation
skuhl
added a commit
to skuhl/sshuttle
that referenced
this pull request
Jul 12, 2021
Previously, it was possible to run sshuttle locally without using ssh and connecting to a remote server. In this configuration, traffic was redirected to the sshuttle server running on the localhost. However, the firewall needed to distinguish between traffic leaving the sshuttle server and traffic that originated from the machine that still needed to be routed through the sshuttle server. The TTL of the packets leaving the sshuttle server were manipulated to indicate to the firewall what should happen. The TTL was adjusted for all packets leaving the sshuttle server (even if it wasn't necessary because the server and client were running on different machines). Changing the TTL caused trouble and some machines, and the --ttl option was added as a workaround to change how the TTL was set for traffic leaving sshuttle. All of this added complexity to the code for a feature (running the server on localhost) that is likely only used for testing and rarely used by others. This commit updates the associated documentation, but doesn't fully fix the ipfw method since I am unable to test that. This change will also make sshuttle fail to work if -r is used to specify a localhost. Pull request sshuttle#610 partially addresses that issue. For example, see: sshuttle#240, sshuttle#490, sshuttle#660, sshuttle#606.
Member
|
I think this is redundant now #661 was merged. Regardless, thanks for you contribution. |
Author
|
Thanks, I tested after you merged #661 and it works on FreeBSD (unsurprisingly!) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Without this any TCPv6 connection going to my FreeBSD machine causes sshuttle to crash:
Where line 589 is "outsock.setsockopt(socket.SOL_IP, socket.IP_TTL, 63)".