RADIUSdesk

logo

This is an old revision of the document!


OpenVPN Bridges

Enable Packet forwarding for IPv4

  • The machine running CoovaChilli will act as a router and thus needs to be configured as such.
  • This means that the IP packets needs to be forwarded from one interface to the other.
  • Edit the /etc/sysctl.conf.
  • Find and uncomment net.ipv4.ip_forward=1 line.

Building and Installing Coova Chilli

  • The version of CoovaChilli is 1.6 as of this writing.
  • We will download and build the .deb package from source.
  • First ensure the required packages to build the .deb package are installed.
sudo apt-get install build-essential libssl-dev libjson-c-dev gengetopt
sudo apt install devscripts debhelper
  • Download the release 1.6's .tar.gz file of the source 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.
  • This dependency is not required and including it causes trouble when you want to install the package.
# If you downloaded with wget
tar -xzvf 1.6.tar.gz
# If you downloaded with the browser 
tar -xzvf coova-chilli-1.6.tar.gz
cd coova-chilli-1.6/
 
vi debian/control
#Look for this part
#------
#Depends:
# ${shlibs:Depends},
# iptables,
# haserl,
# adduser,
#------
#------ CHANGE TO THIS (remove haserl as a dependency)
#------
#Depends:
# ${shlibs:Depends},
# iptables,
# adduser,
#-----
 
debuild -i -us -uc -b
cd ..
sudo dpkg --install coova-chilli_1.6_amd64.deb
  • From the output of the dpkg command you will see that CoovaChilli is by default disabled. In the next section we will configure it to become a working entity.
Selecting previously unselected package coova-chilli.
(Reading database ... 125842 files and directories currently installed.)
Preparing to unpack coova-chilli_1.6_amd64.deb ...
Unpacking coova-chilli (1.6) ...
Setting up coova-chilli (1.6) ...
Chilli default off. Look at /etc/default/chilli
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for systemd (245.4-4ubuntu3.6) ...
Processing triggers for man-db (2.9.1-1) ...

Configuring Coova Chilli

Enable CoovaChilli

  • Edit the following file
sudo vi /etc/default/chilli
  • Change it to look like this
START_CHILLI=1
CONFFILE="/etc/chilli.conf"
HS_USER="chilli"
  • Save the file.

Create the main config file

  • Create a file called /etc/chilli/config and use the following as reference:
/etc/chilli/config
HS_WANIF=eth1            # WAN Interface toward the Internet
HS_DNS1=4.4.4.4
HS_DNS2=8.8.8.8
HS_RADIUS=198.27.111.78
HS_RADIUS2=198.27.111.78
HS_RADSECRET=testing123    # Set to be your RADIUS shared secret
HS_UAMSECRET=greatsecret     # Set to be your UAM secret
HS_UAMALIASNAME=chilli
HS_UAMSERVER=$HS_UAMLISTEN
HS_UAMFORMAT=http://198.27.111.78/cake2/rd_cake/dynamic_details/chilli_browser_detect/
HS_UAMHOMEPAGE=http://\$HS_UAMLISTEN:\$HS_UAMPORT/www/coova.html
HS_MODE=hotspot
HS_TYPE=coovachilli
HS_WWWDIR=/etc/chilli/www
HS_WWWBIN=/etc/chilli/wwwsh
HS_PROVIDER=Coova
HS_PROVIDER_LINK=http://coova.github.io/
HS_LOC_NAME="My HotSpot"           # WISPr Location Name and used in portal
  • Create the VLAN config directories
#Here you will need **ifconfig** to be installed
sudo su
cd /etc/chilli
./newmulti.sh br0.101
./newmulti.sh br0.102
  * Create the three VLAN configs
./newmulti.sh br0.103
  • Create the three VLAN configs
/etc/chilli/br0.101/config
HS_LANIF=br0.101            # WAN Interface toward the Internet
HS_NETWORK=10.101.0.0      # HotSpot Network (must include HS_UAMLISTEN)
HS_NETMASK=255.255.0.0   # HotSpot Network Netmask
HS_UAMLISTEN=10.101.0.1  # HotSpot IP Address (on subscriber network)
HS_UAMPORT=3990            # HotSpot UAM Port (on subscriber network)
HS_UAMUIPORT=4990          # HotSpot UAM "UI" Port (on subscriber network, for embedded portal)
 
HS_DYNIP=10.101.1.1
HS_DYNIP_MASK=255.255.0.0
HS_STATIP=10.101.0.1
HS_STATIP_MASK=255.255.255.0
# HS_DNS_DOMAIN=
 
HS_NASID=rd-vlan101
HS_SSID=rd-vlan101-ssid
/etc/chilli/br0.102/config
HS_LANIF=br0.102            # WAN Interface toward the Internet
HS_NETWORK=10.102.0.0      # HotSpot Network (must include HS_UAMLISTEN)
HS_NETMASK=255.255.0.0   # HotSpot Network Netmask
HS_UAMLISTEN=10.102.0.1  # HotSpot IP Address (on subscriber network)
HS_UAMPORT=3991            # HotSpot UAM Port (on subscriber network)
HS_UAMUIPORT=4991          # HotSpot UAM "UI" Port (on subscriber network, for embedded portal)
 
HS_DYNIP=10.102.1.1
HS_DYNIP_MASK=255.255.0.0
HS_STATIP=10.102.0.1
HS_STATIP_MASK=255.255.255.0
# HS_DNS_DOMAIN=
 
HS_NASID=rd-vlan102
HS_SSID=rd-vlan102-ssid
/etc/chilli/br0.103/config
HS_LANIF=br0.103            # WAN Interface toward the Internet
HS_NETWORK=10.103.0.0      # HotSpot Network (must include HS_UAMLISTEN)
HS_NETMASK=255.255.0.0   # HotSpot Network Netmask
HS_UAMLISTEN=10.103.0.1  # HotSpot IP Address (on subscriber network)
HS_UAMPORT=3992            # HotSpot UAM Port (on subscriber network)
HS_UAMUIPORT=4992          # HotSpot UAM "UI" Port (on subscriber network, for embedded portal)
 
HS_DYNIP=10.103.1.1
HS_DYNIP_MASK=255.255.0.0
HS_STATIP=10.103.0.1
HS_STATIP_MASK=255.255.255.0
# HS_DNS_DOMAIN=
 
HS_NASID=rd-vlan103
HS_SSID=rd-vlan103-ssid