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

Um den korrekten Betrieb des Hotspots zu überprüfen, verwenden Sie ein Smartphone oder ein Notebook und verbinden Sie sich mit dem Namen Ihres Standorts mit dem WLAN-Netz.


Das Verfahren für den Zugriff auf den Hotspot ist unterschiedlich, je nach der Art der verwendeten Vorrichtung:


  • PC/Notebook: Wird der Browser auf einer beliebigen Webseite (nicht HTTPS) geöffnet, wird automatisch zur zur Login-Seite weitergeleitet.
  • IPhone/IPad: Durch die Auswahl des WLAN-Netzwerks wird automatisch die Login-Seite geöffnet.
  • Android: Es wird eine Meldung angezeigt, die darauf hinweist, dass Sie mit einen Hotspot verbunden sind. Durch Klicken auf die Meldung werden Sie zur Login-Seite weitergeleitet.

Captive Portal


Um den Test abzuschließen, erstellen Sie auf der entsprechende Seite auf dem Hauptbildschirm der Anwendung einen registrierten Benutzer (oder eine Prepaid-Karte) und geben Sie den Benutzernamen und das Passwort des soeben erstellten Benutzers ein.