Skip to main content

Run a Service On Another IP

Want to run your service on an IP other than your machine's main NX3 IP? You can do that!

All you need to do is create a dummy interface on your machine by creating 2 files in /etc/systemd/network

First up is the dummy device itself:

/etc/systemd/network/10-dummy0.netdev

[NetDev]
Name=dummy0
Kind=dummy

And then the further configuration information, just make sure to replace the address with your own:

/etc/systemd/network/20-dummy0.network

[Match]
Name=dummy0

[Network]
Address=172.24.1.2

After that, you can reload theĀ systemctl daemon, and the network configuration with the following commands:

sudo systemctl daemon-reload
sudo networkctl reload

Now that you have the network interface created, all you need to do is change the IP address the service listens on!

If you are running the Bird configuration provided earlier in this guide, the new route will automatically be picked up. If you not using that configuration, or are not using Bird at all, you may need to adjust routing information for this new IP address to be reachable by other machines.