Multi-IPSIX is a powerful, configuration-driven tool for managing multiple IPv6 addresses on Linux network interfaces. It is designed for advanced networking scenarios where precise control over source address selection is critical. The core feature of Multi-IPSIX is its ability to assign a “priority” IPv6 address to an interface while gracefully “deprecating” all other IPv6 addresses on that same interface.
This ensures that only the priority IP is used for initiating new outbound connections (e.g., curl
, ssh
, git
), while the deprecated addresses can still receive incoming traffic. This project was born from the need to control outgoing traffic source IPs in multi-homed or complex IPv6 environments.
atpajah.yaml
).preferred_lft
to 0
. They are not removed and can still be used for incoming connections.systemd
service to run automatically on boot.systemd
and the iproute2
toolset.sudo
.git clone https://github.com/kelvinzer0/Multi-IPSIX.git
cd Multi-IPSIX
Customize the configuration:
Before installing, open atpajah.yaml
and configure your interfaces, addresses, and priority IPs according to your needs.
sudo
. It will build the binary, move it to /usr/local/bin
, copy the configuration, and set up the systemd
service.
sudo bash install.sh
The service is now enabled and will start automatically on boot. You can also start it manually:
sudo systemctl start multi-ipsix
To remove the application and all its components, run the uninstallation script:
sudo bash uninstall.sh
This will stop the service, remove the binary, and delete the systemd
service file. It will ask for confirmation before deleting the configuration directory /etc/multi-ipsix
.
The tool operates in a straightforward sequence:
/etc/multi-ipsix/atpajah.yaml
to get the list of interfaces and their desired IP configurations.ip addr add
command. If an address already exists, it continues without error.priority_ip
for that interface, it uses the ip addr change
command to set its preferred_lft
(preferred lifetime) to 0
.This preferred_lft 0
setting is the key. The Linux kernel will not select a deprecated address as the source for new outgoing connections unless an application explicitly binds to it.
This tool is a foundational step towards more dynamic and intelligent IPv6 management. We welcome contributions! Feel free to open an issue or submit a pull request.
Disclaimer: Network configuration is sensitive. Always test in a safe environment before deploying to production systems.