Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/sxzz/macos-ipv6-fixed-suffix.
Something went wrong. Try again.
Files
- Shell 100%
README.md
macOS IPv6 Fixed Suffix #
A monitoring script for macOS that automatically maintains IPv6 addresses with fixed suffixes when IPv6 prefixes change.
🚀 Installation #
Method 1: Online Installation (Recommended) #
curl -fsSL https://raw.githubusercontent.com/sxzz/macos-ipv6-fixed-suffix/refs/heads/main/install.sh | sudo bash
Method 2: Download and Install #
curl -fsSL https://raw.githubusercontent.com/sxzz/macos-ipv6-fixed-suffix/refs/heads/main/install.sh -o install.sh
chmod +x install.sh
sudo ./install.sh
✨ Features #
- ✅ Auto Start on Boot - Uses macOS LaunchDaemon system service
- ✅ Runs in Background - Automatically runs without manual intervention
- ✅ Automatic Restart - Service will restart automatically if it crashes
- ✅ Full Logging - Detailed operation logs
- ✅ Easy Management - Command-line management tool
📋 Usage #
After installation, use the following commands to manage the service:
# Check service status
ipv6-monitor status
# Start the service
ipv6-monitor start
# Stop the service
ipv6-monitor stop
# Restart the service
ipv6-monitor restart
# View real-time logs
ipv6-monitor log
To manually run the script for testing:
sudo ./run.sh
🗑️ Uninstallation #
Run the uninstall script:
sudo ./uninstall.sh
Or uninstall manually:
sudo launchctl unload /Library/LaunchDaemons/com.github.sxzz.macos-ipv6-fixed-suffix.plist
sudo rm -f /Library/LaunchDaemons/com.github.sxzz.macos-ipv6-fixed-suffix.plist
sudo rm -f /usr/local/bin/ipv6-monitor
sudo rm -rf /usr/local/bin/macos-ipv6-fixed-suffix
sudo rm -rf /var/log/macos-ipv6-fixed-suffix
⚙️ How It Works #
- Monitors system IPv6 prefix changes
- Automatically detects the primary network interface
- Uses the last segment of the IPv4 address as the IPv6 suffix
- Automatically adds new fixed-suffix addresses when the prefix changes
- Cleans up expired addresses
🙏 Acknowledgements #
Thanks to GitHub Copilot for assisting in writing this script.
Sponsors #
License #
MIT License © 2025 Kevin Deng