Use selected iface when creating a public master.

Also use the new method to obtain an IP from a network interface.