MyWiFi

Creating an Hotspot using a PC with Linux OS

My WiFi Service supports the use of a computer running Linux (Ubuntu/Debian) instead of the traditional DD-WRT/OpenWrt/Mikrotik router. The great advantage of this solution is the increased processing power offered by a computer than that of most routers on the market.
A last generation computer can support easily even thousands of simultaneous connections, against 50-100 offered by midrange routers.


Hotspot Linux PC


The computer must be equipped with two network cards (eg. Eth0 and eth1). The first will be connected to the Internet while the second will be connected to the access point that spreads the Wi-Fi signal.

The choice of the network adapters

If you want to use a desktop PC to manage the hotspot, you should use the integrated network card to connect to the Internet, while for the second network card you can opt for a PCI card or a USB Ethernet adapter (choice less powerful).


If you use a laptop, you do not need to install additional network adapters because usually all laptop computers have two network adapters: one wireless and one ethernet. In this case, the wireless network card (eth0) will be connected to the Internet while the Ethernet (eth1) must be connected to the access point.

Configuration of the network adapters and access point

The adapter connected to the Internet can be configured in either DHCP or a static IP address. In the latter case it is necessary to enter also the DNS servers in the configuration.

The second network card (eth1) must not have any IP configuration.


The access point to be connected to the eth1 must be configured as follows:


-IP Address: 10.182.0.2
-Subnet: 255.255.255.0
-Gateway: 10.182.0.1


Running the configuration script

At this point all that remains is to run the configuration script of your location. Open the Control Panel My WiFi Service in "Locations", click on "Conf. Disp." and copy the script to the clipboard.

The script text will look like:


   cd $HOME
   wget 'http://app.mywifiservice.com/script/?nasid=XXXXX' -q -O setup.sh
   chmod +x setup.sh
   sudo ./setup.sh


where in place of XXXXX will shown the location NAS ID.

Open the Linux terminal and paste the text. After rebooting PC the hotspot will be ready for use.

Hotspot Test

Pour vérifier le bon fonctionnement du hotspot, utilisez un smartphone ou un ordinateur portable et connectez-vous au réseau Wi-Fi avec le nom de notre emplacement.


La procédure pour accéder au hotspot est différente selon le type d'appareil utilisé :


  • PC/ordinateur portable : Ouvrez le navigateur et une page Web (pas https), vous êtes alors redirigé vers la page de connexion.
  • iPhone / iPad : La sélection du réseau Wi-Fi ouvre automatiquement la page de connexion.
  • Androïde : Une notification vous avertit que vous êtes connecté à un Hotspot. Cliquez sur la notification, vous serez redirigé vers la page de connexion.

Captive Portal


Pour effectuer un test, créez un utilisateur enregistré (ou un billet prépayé) sur la page appropriée de l'écran principal de l'application et insérer-y le nom d'utilisateur et le mot de passe que vous venez de créer.