freeRADIUS
Overview
FreeRADIUS is the most popular and the most widely deployed open source RADIUS server in the world. Now with HostBill and FreeRadius you can automatically provision user accounts in RADIUS, giving you countless possibilities. With Free Radius being used as authentication server for virtually countless services, FreeRadius module gives you multiple options to expand your business. With this module you can easily Sell VPN accounts, offer and automate VoIP services, automate Proxy provisioning or manage VPN access for your staff.
Installing FreeRADIUS
HostBill connects directly to FreeRADIUS mysql database, so you need to make sure that
- FreeRADIUS have enabled sql support
- SQL server/port on FreeRADIUS server is accessible from your HostBill
- SQL user you will use have enabled remote access from your HostBill server
If you don't have freeRADIUS installed yet you can refer to this short guide: Installing FreeRadius
Activating the module
- If the module is included in your HostBill edition you can download it from your client portal.
- If the module is not included in your HostBill edition you can purchase it from our marketplace and then download it from the client area.
- Once you download the module extract it in the main HostBill directory.
- Go to Settings → Modules → Hosting Modules, find and activate FreeRadius module.
Connecting HostBill with FreeRADIUS
- Proceed to Settings → Apps → Add new App
- From Applications list select FreeRadius
- Enter:
- Name - Name of this connection
- FreeRadius IP
- Database name
- Database user
- Database password
- Database port
4. Verify entered credentials by clicking Test Connection to check if HostBill can connect
5. Save Changes
Creating your first FreeRadius-based package
- In HostBill go to Settings → Products & Services, and Add new order page
- From Order Types select Other type
- After creating order page add new product in it, provide its name and Save changes
- From Connect with App section select FreeRadius module & app.
- Under Preconfigure tab you can add form elements automatically to collect username/password from client during order using forms
- Under User & Group Tab:
- Select group you wish to assign clients using this package to (HostBill will fetch groups directly from FreeRADIUS).
- Optionally, enter Password suffix:
- If this product have custom field for password, it will be used as user password.
- If password field is set as hidden in cart, and this field is non-empty, password will be set to username + this suffix.
- If no field is set and this field is empty - password will be random
- Select Password type that should be used for creating user
- Additionally, you can set attributes (radcheck & radreply) each user created with this package will have, ie: Simultaneous-Use:=1 .
Note, that you can use form fields values as values for attributes. Ie, if you wish to enter attribute as admin in account details before creation:- Add new form input under Components→Forms tab
- Make sure to set "variable name" under Advanced tab when creating form
- Once form is created, go back go Connect with App, and as value enter {$service.forms.variablename} - replace variablename with your variable set in step above
- Repeats steps above for each attribute you wish to set value for using forms
If you'd like to enable your clients the ability to change passwords go to Client Functions in your product config, and make sure "Change Password" function is enabled.
For more generic product configuration details including price, automation, emails settings refer to Product Configuration article.
Setting per-account custom attributes
In Product configuration you can create two, admin-only textarea components (under Components→Forms) with variable names:
- radcheck for custom radcheck attributes
- radreply for custom radreply attributes
In account details put custom attributes there, one per line in form of (Attribute) (Operator) (Value) ie:
Framed-Protocol := PPP Framed-Address = 10.0.3.1 Framed-Netmask = 255.255.255.0 Ascend-Send-Auth = Send-Auth-CHAP Ascend-Send-Secret = "kuro"
During provisioning HostBill will parse values of those fields creating custom attributes
Configuring Client Functions
In Products & Services → Your Order Page → Your Product → Client Functions you can control what features customer will have access to in client portal, by clicking Enable/Disable next to the given option.
Use Edit button to adjust function appearance in the client portal.
For Free Radius you can enable the following client functions dedicated to this module:
- Change Password
- Change Username
As well as number of standard client functions, such as
- Change Billing Cycle
- Change Label
- Change Ownership
- Edit Forms
- Graphs
- Login Details
- Manual Service Renew
- New Direct Link
- Related Services
- Service Auto Renewal
FAQ
Question: What are groups in product config and how to use them?
Answer:
- Groups are fetched from mysql table radgroupcheck of FreeRadius mysql database
- if no group is available/selected in product config - user group feature will not be used
- if group is set in configuration - it will be used to add user to radusergroup table
Question: What happens in the FreeRadius system when a customer is suspended in HostBill?
Answer: To distinguish suspended user, the user is being moved automatically to the group "HB-Suspended". HB-Suspended group is added automatically by HostBill. It's auth-type is set to reject to prevent user from login. On unsuspension, user is removed from HB-Suspended group.