Thursday, May 16, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 1988  / 2 Years ago, wed, may 11, 2022, 6:09:00

Is it possible to set a custom URL for captive portal detection in Ubuntu?



Ubuntu uses https://connectivity-check.ubuntu.com by default to check the connection. Is there a way to change this URL, for example to https://your.host.com/another-path?


More From » networking

 Answers
7

You can set the URL using the uri parameter in the NetworkManager config file /etc/NetworkManager/NetworkManager.conf. Add the following lines there:



[connectivity]
uri=https://your.host.com/another-path


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

[#5031] Friday, May 13, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ionash

Total Points: 214
Total Questions: 111
Total Answers: 116

Location: Sudan
Member since Thu, May 7, 2020
4 Years ago
;