Improve IPv6 handling and add support for the REST command.