Skip to content

Instantly share code, notes, and snippets.

@mueslimak3r
Last active September 4, 2023 15:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mueslimak3r/cef6518161b0bfe70cb767dcfc6316d6 to your computer and use it in GitHub Desktop.
Save mueslimak3r/cef6518161b0bfe70cb767dcfc6316d6 to your computer and use it in GitHub Desktop.
ttl mods for mangling TTL behind an LTE modem
# iptables rules for mangling ipv4 and ipv6 traffic
# prerouting rules appear to prevent leaks to the ISP
iptables -t mangle -I PREROUTING 1 -j TTL --ttl-set 65
ip6tables -t mangle -I PREROUTING 1 -j HL --hl-set 65
# postrouting rules do the heavy lifting
iptables -t mangle -I POSTROUTING 1 -j TTL --ttl-set 65
ip6tables -t mangle -A POSTROUTING 1 -j HL --hl-set 65
# modem decrements TTL from 65 to 64, which is what the ISP sees :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment