Skip to content

Instantly share code, notes, and snippets.

@openhoangnc
Last active August 9, 2023 17:42
Show Gist options
  • Save openhoangnc/ad570f313dd56ee9cff8c97766a61fb7 to your computer and use it in GitHub Desktop.
Save openhoangnc/ad570f313dd56ee9cff8c97766a61fb7 to your computer and use it in GitHub Desktop.
TTL65 - This file will automatically set the Time To Live (TTL) or maximum hop count of the network to 65 upon startup.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>ttl65</string>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/sysctl</string>
<string>-w</string>
<string>net.inet.ip.ttl=65</string>
<string>net.inet6.ip6.hlim=65</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
@openhoangnc
Copy link
Author

You have two options to set up the file:

  1. Simply put the file in the /Library/LaunchDaemons/ folder.
  2. Run this command to download and save the file to the folder:
curl -sSL https://tinyurl.com/ttl65 -o /Library/LaunchDaemons/ttl65.plist

This will download the file from the specified URL and save it as "ttl65.plist" in the /Library/LaunchDaemons/ folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment