Changes

From SME Server
Jump to navigationJump to search
1,737 bytes added ,  09:43, 5 September 2008
no edit summary
Line 74: Line 74:     
**Dhcp is disabled on the router
 
**Dhcp is disabled on the router
**Lan ports and wlan interface are bridged
+
**Lan ports and wireless interface are bridged
 
**Connect a lan port to eth2
 
**Connect a lan port to eth2
   Line 120: Line 120:  
*RedirectToChilli: a list of IP address which will be redirected to your server. By default, InternalIP and ExternalIP are already redirected to your server. But in some situation (like if your Public IP isn't the same as ExternalIP), this setting can be usefull
 
*RedirectToChilli: a list of IP address which will be redirected to your server. By default, InternalIP and ExternalIP are already redirected to your server. But in some situation (like if your Public IP isn't the same as ExternalIP), this setting can be usefull
 
  db configuration setprop chilli RedirectToChilli 1.2.3.4,5.6.7.8
 
  db configuration setprop chilli RedirectToChilli 1.2.3.4,5.6.7.8
 +
 +
*guestAccess: enabled/disabled. If enabled, a radius user will be added with name = guest, password = guest, and a button will be displayed on the login page so guests only have to click on it to get logged in.
 +
 +
*guestDownLink: if guestAccess is enabled, this will limit the downlink bandwidth for the guest (in kbps)
 +
 +
*guestUpLink: if guestAccess is enabled, this will limit the uplink bandwidth for the guest (in kbps)
    
After you've changed the configuration, just run the command  
 
After you've changed the configuration, just run the command  
Line 127: Line 133:  
== The login page ==
 
== The login page ==
   −
For the login page, I used part of the project daloradius because it is the easiest to change that I have found.
+
The login page is a mix of the CGI provided with chillispot and some modifications of other login pages.
You can customize pages, and your changes won't be lost on upgrades.
+
You can customize it.
 +
 
 +
*/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98chilli  : This file is the template for apache, you can create a custom-template if you want to modify it (add php support, etc...)
 +
 
 +
*/opt/chilli/cgi-bin/hotspot-login.cgi  : This is the main CGI, you can customize it, it won't be overriden on upgrades.
 +
 
 +
*/opt/chilli/hotspotlogin-conf.pl    : This file contains some configuration for the hotspot (domain name, contact info, uamsecret, guestaccess). This file is templetized, so if you need to make some change, you should create a custom-template for /etc/e-smith/templates-custom/opt/chilli/hotspotlogin-conf.pl
 +
 
 +
*/opt/chilli/lang    : This directory contains language files. English and French are provided, but you can add other if you want (contact me if you make a new translation, I'll integrate it in the package). You can edit all the language file, they won't be overriden on upgrades.
 +
 
   −
(This will change in futur release, I'll try to make a CGI like the login page of the server-manager, any help would be appreciated as I'm not a PHP nor a CGI expert)
      
== The authorized group(s) ==
 
== The authorized group(s) ==
Line 150: Line 164:  
*Now, you can edit it. By default it looks like this:
 
*Now, you can edit it. By default it looks like this:
   −
  (
+
  {
  if ($ chilli ( 'status') eq' enabled ') (
+
  if ((($chilli{'status'} || 'disabled) eq 'enabled') &&
    OUT = $ <<END;
+
        ($chilli{'guestAccess'} || disabled) eq 'enabled'){
   
+
        my $downlink = $chilli{'guestDownLink'} || '400';
 +
        my $uplink = $chilli{'guestUpLink'} || '64';
 +
        $downlink = $downlink * 1000;
 +
        $uplink = $uplink * 1000;
 +
        $OUT =<<END;
 +
  guest NAS-Identify == "chilli", Auth-Type: = Local User-Password == 'guest'
 +
      WISPr-Bandwidth-Max-Down = $downlink, WISPr-Bandwidth-Max-Up = $uplink
 +
END
 +
if (($chilli{'status'} || 'disabled') eq' enabled ') {
 +
    $OUT = <<END;
 
  DEFAULT Group == "chilli", NAS-Identify == "chilli", Auth-Type: = unix
 
  DEFAULT Group == "chilli", NAS-Identify == "chilli", Auth-Type: = unix
 
  # WISPr-Bandwidth-Max-Down = 512000, WISPr-Bandwidth-Max-Up = 128000
 
  # WISPr-Bandwidth-Max-Down = 512000, WISPr-Bandwidth-Max-Up = 128000
 
   
 
   
  DEFAULT Group! = "Chilli", NAS-Identify == "chilli", Auth-Type: Reject =
+
  DEFAULT Group! = "chilli", NAS-Identify == "chilli", Auth-Type: Reject =
 
         Reply Message = "Your are not allowed member of the group"
 
         Reply Message = "Your are not allowed member of the group"
   
  END
 
  END
  )
+
  }
  )
+
  }
    
*If you want to replace the group "chilli" with "wifi" you only have to change Group == "chilli" by Group == "wifi". Same for Group! = "Chilli"
 
*If you want to replace the group "chilli" with "wifi" you only have to change Group == "chilli" by Group == "wifi". Same for Group! = "Chilli"
   −
*If you want to add a guest account without account SME:
+
  {
 
+
  if ((($chilli{'status'} || 'disabled) eq 'enabled') &&
  (
+
        ($chilli{'guestAccess'} || disabled) eq 'enabled'){
  if ($ chilli ( 'status') eq' enabled ') (
+
        my $downlink = $chilli{'guestDownLink'} || '400';
    $ OUT = <<END;
+
        my $uplink = $chilli{'guestUpLink'} || '64';
   
+
        $downlink = $downlink * 1000;
''' guest NAS-Identify == "chilli", Auth-Type: = Local User-Password == 'guest''''
+
        $uplink = $uplink * 1000;
        '''WISPr-Bandwidth-Max-Down = 400000, WISPr-Bandwidth-Max-Up = 64000'''
+
        $OUT =<<END;
+
  guest NAS-Identify == "chilli", Auth-Type: = Local User-Password == 'guest'
  DEFAULT Group == "chilli", NAS-Identify == "chilli", Auth-Type: = unix
+
      WISPr-Bandwidth-Max-Down = $downlink, WISPr-Bandwidth-Max-Up = $uplink
 +
END
 +
if (($chilli{'status'} || 'disabled') eq' enabled ') {
 +
    $OUT = <<END;
 +
  DEFAULT Group == "'''wifi'''", NAS-Identify == "chilli", Auth-Type: = unix
 
  # WISPr-Bandwidth-Max-Down = 512000, WISPr-Bandwidth-Max-Up = 128000
 
  # WISPr-Bandwidth-Max-Down = 512000, WISPr-Bandwidth-Max-Up = 128000
+
  DEFAULT Group! = "'''wifi'''", NAS-Identify == "chilli", Auth-Type: Reject =
  DEFAULT Group! = "Chilli", NAS-Identify == "chilli", Auth-Type: Reject =
   
         Reply Message = "Your are not allowed member of the group"
 
         Reply Message = "Your are not allowed member of the group"
   
  END
 
  END
  )
+
  }
  )
+
  }
   −
This will add a user "guest" , with password "guest" and bandwidth will be restricted to 400kbps (downlink) and 64kbps (uplink)
      
== What authenticated users have access to ? ==
 
== What authenticated users have access to ? ==
Line 191: Line 214:  
By default, not much.
 
By default, not much.
   −
Basically once autenticated, users have access to
+
Basically once authenticated, users have access to
    
  *DNS outside (udp port 53)
 
  *DNS outside (udp port 53)

Navigation menu