This content was contributed by @sktripamer on GitHub: Support for static IP address · Issue #567 · canonical/multipass · GitHub
I’ve made a quick little utility NPM package for MacOS to route Multipass instance names to permanently accessible local domains.
npm install -g @sktripamer/unifypass
sudo unifypass start
Now you can access http://multipass-instance-name.multipass
By default it works with 80 and 443 with SSL passthrough. You can add more ports with:
sudo unifypass start --ports 8010,8020,8030
It works by creating a DNS server for the .multipass domain and forwarding it to the loopback address (127.0.0.1) where we have a reverse proxy getting the local network IP with ‘multipass list’, meaning it’s very responsive to any changes on the DHCP leases or any changes to multipass instances.
Sudo is needed to create the DNS server and listen on ports 80 and 443.
Haven’t tested all the features, but the basic start and stopping with the --ports flags seems to work, and I needed it for my own work, so deciding to publish now. Feel free to try to use and come back with any issues.