Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
install_22_4_coova [2024/02/07 17:57] – created systeminstall_22_4_coova [2024/02/08 18:21] (current) system
Line 2: Line 2:
  
 ===== Introduction ===== ===== Introduction =====
-  * RADIUSdesk can function perfectly without CoovaChilli. +  * RADIUSdesk can work perfectly without CoovaChilli. 
-  * CoovaChilli however is the best open source captive portal software around+  * However, CoovaChilli is the best open source captive portal software available
-  * If you want to install CoovaChilli on a machine; <wrap hi>make sure that there are at least two functional network cards present</wrap>+  *  If you want to install CoovaChilli on a computer, you must ensure that at least <wrap em>two working network cards</wrap> are present
-  * One network card will be used by CoovaChilli as the Internet connection (WAN). +  * One network card is used by CoovaChilli as the Internet connection (WAN). 
-  * The second network card will be used to run a captive portal on (LAN).  +  * The second network card is used to operate a captive portal (LAN).  
-  * This captive portal is created by the CoovaChilli program who in turn receives it'instructions from FreeRADIUS (RADIUSdesk)+  *  This captive portal is created by the CoovaChilli program, which in turn receives its instructions from FreeRADIUS (RADIUSdesk)
  
-===== Enable Packet forwarding for IPv4 ===== +===== Activate packet forwarding for IPv4 ===== 
-  * The machine running Coova Chilli will act as a router and thus needs to be configured as such. +  * The computer on which Coova Chili is running acts as a router and must therefore be configured as such. 
-  * This means that the IP packets needs to be **forwarded** from one interface to the other.+  * This means that the IP packets must be **forwarded** from one interface to another.
   * Edit the **/etc/sysctl.conf**   * Edit the **/etc/sysctl.conf**
-  * Find and uncomment **net.ipv4.ip_forward=1** line.+  *  Find the line net.ipv4.ip_forward=1 and comment it out.
  
-===== Installing CoovaChilli ===== +===== Installation of CoovaChilli ===== 
-   * The version of CoovaChilli is 1.6 as of this writing+   * The version of CoovaChilli at the time of writing is 1.6. 
-   * We will download and build the .deb package from source+   * We will download and build the .deb package from the sources
-   * First ensure the required packages to build the .deb package are installed.+    First, make sure that the required packages for creating the .deb package are installed.
  
 <code bash> <code bash>
Line 25: Line 25:
 </code> </code>
  
-   * Download the **release 1.6**'.tar.gz file of the source here: https://github.com/coova/coova-chilli/releases +   * Download the .tar.gz file of the source code of version 1.6 here: https://github.com/coova/coova-chilli/releases 
-   * Before we can build the package, we have to remove a dependency (**hasrl**) specified in the Debian control file. +   * Before we can build the package, we need to remove a dependency (**hasrl**) specified in the Debian control file. 
-   * This dependency is not required and including it causes trouble when you want to **install** the package.+    This dependency is not required and its inclusion will cause problems if you want to install the package.
  
 <code bash> <code bash>
Line 57: Line 57:
 sudo dpkg --install coova-chilli_1.6_amd64.deb sudo dpkg --install coova-chilli_1.6_amd64.deb
 </code> </code>
-   * From the output of the dpkg command you will see that CoovaChilli is by default disabledIn the next section we will configure it to become a working entity.+   * From the output of the dpkg commandyou can see that CoovaChilli is disabled by default. the next section we will configure it to work.
 <code bash> <code bash>
 Selecting previously unselected package coova-chilli. Selecting previously unselected package coova-chilli.
Line 75: Line 75:
     sudo vi /etc/default/chilli     sudo vi /etc/default/chilli
 </code> </code>
-  * Change it to look like this+  *  Change the file so that it looks like this
 <code bash> <code bash>
     START_CHILLI=1     START_CHILLI=1
Line 83: Line 83:
   * Save the file and start CoovaChilli   * Save the file and start CoovaChilli
 <code bash> <code bash>
-   #First enable the service so it will start up during boot+   #First enable the service so that it is started at boot time
    sudo systemctl enable chilli    sudo systemctl enable chilli
    # Feedback code should be...    # Feedback code should be...
Line 90: Line 90:
    sudo systemctl start chilli    sudo systemctl start chilli
 </code> </code>
-    * Check the feedback on our startup attempt.+    * Check the feedback on our start attempt.
 <code bash> <code bash>
 sudo systemctl status chilli sudo systemctl status chilli
 </code> </code>
-  * Because we have not yet configured anythingwe do get some errors. This will be fixed and Coova should run fine once we configured the program.+  * Since we have not configured anything yet, we get some errors. This will be fixed and Coova should run smoothly once we have configured the program.
 <code bash> <code bash>
 ● chilli.service - LSB: Start CoovaChilli daemon at boot time ● chilli.service - LSB: Start CoovaChilli daemon at boot time
Line 114: Line 114:
  
 </code> </code>
-==== Modify the configuration file ====+==== Change the configuration file ====
   * CoovaChilli is configured by editing or creating certain files under the **/etc/chilli** directory.   * CoovaChilli is configured by editing or creating certain files under the **/etc/chilli** directory.
-  * Before we proceed with the config we have to touch the bit about our interfaces. +  * Before we continue with the configuration, we need to touch on our interfaces. 
-  * For CoovaChilli to work correct; there needs to be at least two network interfaces on the machine. (Excluding the loopback interface **lo**)+  * For CoovaChilli to work correctly, at least two network interfaces must be present on the computer. (With the exception of the loopback interface lo)
   * One interface will be directly connected to the Internet. We will refer to this interface as the WAN interface   * One interface will be directly connected to the Internet. We will refer to this interface as the WAN interface
-  * The other interface will be running the captive portal on top of it. We will refer to this interface as the LAN interface. +  * The captive portal will run on the other interface. We refer to this interface as the LAN interface. 
-  * With previous versions of Ubuntu, the network interfaces would have fairly predictable names  like **eth0** and **eth1**. +  * In previous versions of Ubuntu, the network interfaces had fairly predictable names such as **eth0** and **eth1**. 
-  * With the current versions of Ubuntu, the naming convention changed.  +  * In the current versions of Ubuntu, the naming convention has changed. 
-  * We would advice you to issue the **ip addr** command to see which it present.+  * We advise you to enter the command **ip addr** to see which interface is present.
 <code bash> <code bash>
  ip addr  ip addr
Line 142: Line 142:
 </code> </code>
  
-  * Using this, on our system, the WAN will be **enp0s3** and the LAN will be **enp0s8**. +  * In this way, the WAN becomes **enp0s3** and the LAN becomes **enp0s8** on our system
-  * Next lets look at how to configure CoovaChilli under **/etc/chilli**.+  * Next, let us take a look at how to configure CoovaChilli under **/etc/chili**.
  
 <panel type="default"> <panel type="default">
Line 150: Line 150:
 | **defaults** | To avoid the splash screen we have to remove one line from this file | | **defaults** | To avoid the splash screen we have to remove one line from this file |
 | **ipup.sh** | Custom firewall rules for start-up | | **ipup.sh** | Custom firewall rules for start-up |
-| **ipdown.sh** | Custom firewall rule clean-up during shut-down. |+| **ipdown.sh** | Custom firewall rules for cleanup on shutdown |
 </panel> </panel>
  
-  * Use the following /etc/chilli/config file as a guideline to configure CoovaChilli+  * Use the following /etc/chilli/config file as a guide for configuring CoovaChilli
 <code bash> <code bash>
 HS_WANIF=enp0s3              # WE ALSO Need to specify this HS_WANIF=enp0s3              # WE ALSO Need to specify this
Line 188: Line 188:
 </code> </code>
  
-  * Comment the following line out of ///etc/chilli/defaults//.+  * Comment out the following line in ///etc/chilli/defaults//.
 <code bash> <code bash>
-  Same principal goes for HS_UAMHOMEPAGE.+ The same principle applies to HS_UAMHOMEPAGE.
 #HS_UAMHOMEPAGE=http://\$HS_UAMLISTEN:\$HS_UAMPORT/www/coova.html #HS_UAMHOMEPAGE=http://\$HS_UAMLISTEN:\$HS_UAMPORT/www/coova.html
 </code> </code>
Line 216: Line 216:
  
 ===== Test it out ===== ===== Test it out =====
-  * Restart CoovaChilli for the latest changes to be effected.+  * Restart CoovaChilli so that the latest changes take effect.
 <code bash> <code bash>
 sudo systemctl stop chilli sudo systemctl stop chilli
Line 223: Line 223:
  
 </code> </code>
-  * Confirm it started fine+  * Confirm that it has started properly
 <code bash> <code bash>
 sudo systemctl status chilli sudo systemctl status chilli
Line 250: Line 250:
 </code> </code>
  
-  * Reboot the system and make sure CoovaChilli started up fine+  * Reboot the system and make sure that CoovaChilli has started properly
  
 ===== Troubleshooting tips ===== ===== Troubleshooting tips =====
-  * When things does not work is can be a bit tricky to figure out which part does not work+  * If something is not working, it can be a bit difficult to figure out which part is not working
-  * It might help if you see the captive portal as a mini router with a WAN side and a LAN side. +  * It might help if you think of the Captive Portal as a mini router with a WAN side and a LAN side. 
-  * So then there are a couple of important things to check.+  * So there are a few important things to check.
  
 ==== Are you getting an IP address ==== ==== Are you getting an IP address ====
-  * The captive portal also serve as a DHCP server and a device connecting to it with DHCP enabled should get an IP address from it.+  * The Captive Portal also serves as a DHCP server and a device connecting to it with DHCP enabled should get an IP address from it.
   * You can check both sides (server and client)   * You can check both sides (server and client)
-  * To check on the server issue the following command.+  * To check the server, enter the following command.
 <code bash> <code bash>
 sudo chilli_query list sudo chilli_query list
Line 267: Line 267:
 </code> </code>
   * You can read more about the **chilli_query** command here: [[https://coova.github.io/CoovaChilli/chilli_query(1).html|Chilli Query]]   * You can read more about the **chilli_query** command here: [[https://coova.github.io/CoovaChilli/chilli_query(1).html|Chilli Query]]
-  * After consulting the documentation we can conclude that the captive portal has two clients connected but none has been authenticated.+  * After reading the documentationwe can see that two clients are connected to the captive portal, but neither of them has been authenticated.
   * This means that they 'should' be redirected to a login page.   * This means that they 'should' be redirected to a login page.
-  * If you are not redirected to a login page we can try the following procedure which basically comes down to two things that is not working as intended. +  * If you are not redirected to a login pagewe can try the following procedurewhich essentially boils down to two things not working as intended. 
-        * The routing between the LAN and WAN is not working correct+        * The routing between the LAN and the WAN is not working properly
-        * The DNS on the setup is not working correct.+        * The DNS on the setup is not working properly.
  
-==== Forcing the login page to display ==== +==== Forcing the login page to be displayed ==== 
-  * CoovaChilli has a special URL which will log you out and redirect you to the login page.+  * CoovaChilli has a special URL that logs you out and redirects you to the login page.
   * The URL is http://1.0.0.0   * The URL is http://1.0.0.0
-  * If you do get a login page you can next try to test the routing and the DNS.+  *  If you get a login page, the next thing you can try is to test the routing and DNS.
  
 ==== Test the routing  ==== ==== Test the routing  ====
Line 292: Line 292:
 08-00-27-8C-D3-32 10.1.0.2 dnat 157706713900000001 0 08-00-27-8C-D3-32 0/0 0/0 0/0 0/0 0 0 0/0 0/0 - 08-00-27-8C-D3-32 10.1.0.2 dnat 157706713900000001 0 08-00-27-8C-D3-32 0/0 0/0 0/0 0/0 0 0 0/0 0/0 -
 </code> </code>
-  * On the client you can now try to go to an IP Address that is reachable on the WAN side. I tried to get to the IP Address of my DSL router (192.168.1.1) and could reach it. This means that the traffic flow between the LAN of my captive portal to the LAN of the captive portal is fine. +  * On the clientyou can now try to get to an IP address that is reachable on the WAN side. I tried to reach the IP address of my DSL router (192.168.1.1) and was able to reach it. This means that the traffic flow between the LAN of my captive portal and the LAN of the captive portal is fine. 
-  * I can now again log this client off using the chilli_query command+  * I can now log off this client again with the chilli_query command
 <code bash> <code bash>
 sudo chilli_query logoff ip 10.1.0.3 sudo chilli_query logoff ip 10.1.0.3
Line 304: Line 304:
  
 ==== Test the DNS  ==== ==== Test the DNS  ====
-  * DNS traffic has to flow regardless of a client being authurised (pass) or not (dnat). +  * DNS traffic must flow regardless of whether a client is authorized (pass) or not (dnat). 
-  * In order for the client to magically pop up the login page, DNS has also to work correct+  * In order for the client to magically access the login page, DNS must also work correctly
-  * A common problem is that sometimes the client has their own DNS servers specified and then (depending on the configuration settings of CoovaChilli) it might not allow the DNS traffic to those server through. (Leaving things broken). +  * A common problem is that sometimes the client has specified its own DNS servers and then (depending on the configuration settings of CoovaChilli) does not allow DNS traffic through to these server. (This causes disruptions). 
-  * After you confirmed that the client does not have any hard defined DNS servers you can try a ping test. +  * Once you have confirmed that the client does not have any fixed DNS serversyou can perform a ping test. 
-  * With a ping test you just want to test and confirm that the DNS is working correct on the client. +  * With a ping testyou only want to test and confirm that the DNS is working correctly on the client. 
-  * You can try and ping any known FQDN and see if the system resolve that to an IP address. +  * You can try to ping any known FQDN and see if the system resolves it to an IP address. 
-  * Here I try to ping www.radiusdesk.com. As you can see the name resolution worked correct, but since I am not yet authorized (still in dnat state) the pings are not going through which is fine.+  * Here I am trying to ping www.radiusdesk.com. As you can seethe name resolution worked correctly, but since I am not yet authorized (still in dnat status)the pings are not going throughwhich is fine.
 <code bash> <code bash>
 ping www.radiusdesk.com ping www.radiusdesk.com
Line 320: Line 320:
  
 ==== Conclusion  ==== ==== Conclusion  ====
-  * By using these check points on the captive portal setup, you can now point to a component which does not work as intended and try to resolve it.+  * Using these checkpoints for the captive portal setup, you can now point to a component that is not working as intended and try to resolve the issue.
         * Be it the login page.         * Be it the login page.
         * The routing between WAN and LAN.         * The routing between WAN and LAN.
         * The DNS service.         * The DNS service.
  • install_22_4_coova.1707321457.txt.gz
  • Last modified: 2024/02/07 17:57
  • by system