[Pkg-utopia-maintainers] Debian RT: New service network-test.debian.org

Javier Fernandez-Sanguino jfs at debian.org
Tue Nov 5 10:16:38 UTC 2013


(CCing NetworkManager maintainers as this might be of interest to them also)

Dear Debian Admins,

I would like to provide in Debian a tool that can be used by our users
to test network connectivity more thoroughly detecting, when a network
interface is connected, if there is a captive portal (such as the ones
used in WiFi networks).

Need
--------

Currently, the ifudown-extra package provides a 'network-test' script
[1]. This script tries to determine if the system is connected to the
Internet running basic network tests. The script is limited, however,
if it cannot "call back" to a service to test end-to-end connectivity
fully.

With this service in place, the network testing script (or a different
script) would be able to tell the user if the system is really capable
to connect to the Internet.

If Internet access is not found, based on the received answer, it
could try to determine that he needs to do something else (e.g. log in
to a captive portal) and notify him (either through syslog for
headless systems or using the desktop notification system).

Future Use of this service
-----------------------------------

This 'network-test.debian.org' service would be initially by the
scripts in the ifupdown-extra package, but could later be used by
other Debian programs.

For example:

-  Network Manager recently [2] introduced the capability to do
connectivity tests with a specific URI that needs to return a specific
response (X-NetworkManager-Status = online) [3]

- The Debian Installation system. Either through the installation
process (to ensure that the user has Internet network connectivity
before downloading packages) or right after installation to ensure the
system is configured to access the Internet properly.


Service Requirements
--------------------------------

In order to implement this, I would need

a) creation of network-test.debian.org DNS name (it could initially be
a .net service)
b) a DSA-administered server where to set this up
c) access to the web server's server to make changes as needed (i.e.
changes to the vhosts' configuration and write access to create files
in, e.g. /srv/network-test.debian.org/ )

Web server requirements:

a) provides a webserver with configurable behaviour, for example
returning specific HTTP codes (such as 204) when required
b) provides some static pages with known content
c) has a static IP address  (or within a known range)
d) can introduce some specific HTTP headers (for NetworkManager, see below)

The disk space requirements are very low ( < 1 MB) but it should be
hosted in a well connected location. In the future, if the service
gets introduced in different applications (such as the installation
system or Network Manager) it should  be able to absorb, and answer

Other similar services
------------------------------

For reference, this is a service that seems to be currently
implemented in other operating environments:

- In Ubuntu, it seems to be provided through the capnet-assist package
[4], and also during installation. They test connectivity against
http://start.ubuntu.com/connectivity-check

- In Android (4.0.1 and above) devices [5]. These connect to a
pre-defined page at Google: http://clients3.google.com/generate_204

- In iOS (6 and above) devices [6]. These connect to a pre-defined
page in Apple (http://www.apple.com//library/test/success.html)

- In Windows 7 (and 8) the "Network Awareness" [7] feature checks
against a pre-defined page (http://www.msftncsi.com/ncsi.tx) and
compares DNS results (of dns.msftncsi.com)

That's what I've found doing some basic research. This service seems
to be prevalent and is useful to end-users.

It seems that some end-user applications, such as Mozilla (see [8])
are going to implement this feature, but I would prefer to have a
standard Debian service for this.


Thank you for making this happen,

Javier Fernández-Sanguino


[1] http://manpages.debian.org/cgi-bin/man.cgi?query=network-test&apropos=0&sektion=0&manpath=Debian+unstable+sid&format=html&locale=en

[2] In april 2013, see
https://mail.gnome.org/archives/networkmanager-list/2013-April/txtWVvyYvhwYV.txt

[3]
<title><literal>connectivity</literal> section</title>
    <para>This section controls NetworkManager's optional connectivity
    checking functionality.  This allows NetworkManager to detect
    whether or not the system can actually access the internet or
    whether it is behind a captive portal.</para>

In http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/man/NetworkManager.conf.xml


[4] More information:
https://bugs.launchpad.net/elementaryos/+bug/1039042
https://launchpad.net/capnet-assist

[5] https://groups.google.com/forum/#!msg/android-platform/ATSxh0kG7cc/niuBMs05ip0J

[6] More information at:
https://supportforums.cisco.com/docs/DOC-36528
https://discussions.apple.com/thread/4317971?start=0&tstart=0
http://stackoverflow.com/questions/18891706/ios7-and-captive-portals-changes-to-apple-request-url

[7] More information at:
http://technet.microsoft.com/en-us/library/cc766017(WS.10).aspx
http://blog.superuser.com/2011/05/16/windows-7-network-awareness/
http://stackoverflow.com/questions/18118969/windows-and-detecting-captive-portals

[8] https://bugzilla.mozilla.org/show_bug.cgi?id=562917



More information about the Pkg-utopia-maintainers mailing list