Is it possible to set a custom URL for captive portal detection in Ubuntu?
You can set the URL using the
uri parameter in the NetworkManager config file
/etc/NetworkManager/NetworkManager.conf. Add the following lines there:
The important part is that the server must return either the header
X-NetworkManager-Status with a value of
online or a body content with
NetworkManager is online.
You can also set
interval to set the check interval in seconds and
response to require a specific string in the check response. For more information see the CONNECTIVITY SECTION of the NetworkManager man page.
After that you have to restart the NetworkManager or reboot your system:
# sudo service network-manager restart