Difference between revisions of "FreeRadius Addon Module"
(→FAQ's) |
(→FAQ's) |
||
Line 31: | Line 31: | ||
==FAQ's== | ==FAQ's== | ||
− | #Does this module work with PostgreSQL? | + | #'''Does this module work with PostgreSQL?''' |
#*At this time the module only works with MySQL. As the module is provided as plain source code, you may however modify the code so that it works with a PostgreSQL system instead. | #*At this time the module only works with MySQL. As the module is provided as plain source code, you may however modify the code so that it works with a PostgreSQL system instead. | ||
− | #I can't see a users stats when logged into the admin area? | + | #'''I can't see a users stats when logged into the admin area?''' |
#*The stats are only shown on the client area side. You'll need to 'Login as...' to view the stats for a particular account. | #*The stats are only shown on the client area side. You'll need to 'Login as...' to view the stats for a particular account. | ||
− | #I keep getting this error - "FreeRadius Database Query Error: Access denied for user 'vivieqsg_whmcs'@'localhost' to database 'radius'". | + | #'''I keep getting this error - "FreeRadius Database Query Error: Access denied for user 'vivieqsg_whmcs'@'localhost' to database 'radius'".''' |
#*The MySQL user does not have permissions to access your FreeRADIUS database. If you're hosting WHMCS and FreeRADIUS on different system (which isn't unusual), then you must make sure the MySQL user and host from which the MySQL user is connecting from, have permissions to access the database. | #*The MySQL user does not have permissions to access your FreeRADIUS database. If you're hosting WHMCS and FreeRADIUS on different system (which isn't unusual), then you must make sure the MySQL user and host from which the MySQL user is connecting from, have permissions to access the database. | ||
− | #I keep getting this error - "ERROR 2003 (HY000): Can't connect to MySQL server on 'ip.add.res.s' (110)". | + | #'''I keep getting this error - "ERROR 2003 (HY000): Can't connect to MySQL server on 'ip.add.res.s' (110)".''' |
#*This usually means MySQL is not set to listen to outside connections or there is a firewall blocking the connections. Please ensure the IP address from which the module is connecting from is whitelisted in your firewall or that MySQL is set to allow external connections to it. | #*This usually means MySQL is not set to listen to outside connections or there is a firewall blocking the connections. Please ensure the IP address from which the module is connecting from is whitelisted in your firewall or that MySQL is set to allow external connections to it. | ||
− | #I get this error when trying to use the Module Commands - "FreeRadius Database Query Error: Table 'radius.usergroup' doesn't exist". | + | #'''I get this error when trying to use the Module Commands - "FreeRadius Database Query Error: Table 'radius.usergroup' doesn't exist".''' |
#*This means the module is trying to get or put data into your FreeRADIUS MySQL database, but the table either doesn't exist or is named something else. If this happens, you should get a list of the tables in your FreeRADIUS database and compare them with the error you've gotten. It may be necessary at this point to review and adjust the code of the module so that the module uses the names of tables in your database. | #*This means the module is trying to get or put data into your FreeRADIUS MySQL database, but the table either doesn't exist or is named something else. If this happens, you should get a list of the tables in your FreeRADIUS database and compare them with the error you've gotten. It may be necessary at this point to review and adjust the code of the module so that the module uses the names of tables in your database. | ||
− | #How does the module configure usernames? | + | #'''How does the module configure usernames?''' |
#*The module will provision accounts and setup usernames based on the email address of the client. It will attempt to use the full email address as the username though if the username is already in use it will use the email address plus some numbers so each username is unique. | #*The module will provision accounts and setup usernames based on the email address of the client. It will attempt to use the full email address as the username though if the username is already in use it will use the email address plus some numbers so each username is unique. | ||
− | #How can I sync the name and contact information between WHMCS and FreeRADIUS? | + | #'''How can I sync the name and contact information between WHMCS and FreeRADIUS?''' |
#*This information can be synced between WHMCS and FreeRADIUS by uncommenting line 167 through line 173 of the module. This will allow the name and contact details of the client in WHMCS to sync over to the users FreeRADIUS account. | #*This information can be synced between WHMCS and FreeRADIUS by uncommenting line 167 through line 173 of the module. This will allow the name and contact details of the client in WHMCS to sync over to the users FreeRADIUS account. | ||
− | #How do I specify additional radius configuration parameters for new accounts? | + | #'''How do I specify additional radius configuration parameters for new accounts?''' |
#*To apply additional radius parameters to new accounts, simply duplicate lines 153 to 159 in the freeradius.php file within the freeradius_CreateAccount function, adjusting the values given for the attribute, value and op in the MySQL query on the first of those lines as required for your additional configuration parameter. | #*To apply additional radius parameters to new accounts, simply duplicate lines 153 to 159 in the freeradius.php file within the freeradius_CreateAccount function, adjusting the values given for the attribute, value and op in the MySQL query on the first of those lines as required for your additional configuration parameter. |
Revision as of 17:59, 17 June 2015
FreeRADIUS is the popular open source RADIUS server solution and is the most widely deployed RADIUS server in the world. It supports all common authentication protocols, and the server comes with a PHP-based web user administration tool, called dialupadmin. It is the basis for many commercial RADIUS products and services, like embedded systems, RADIUS appliances that support Network Access Control and WiMAX. (Description taken from http://en.wikipedia.org/wiki/FreeRADIUS)
Typically we find users of WHMCS utilising FreeRadius to offer Dial Up Internet & Broadband Services. And so an addon module has been created to integrate with FreeRadius that supports automatic account creations, suspensions, unsuspension, terminations, password resets and upgrading/downgrading of accounts on the FreeRadius Server. Usage stats for the current billing period are also displayed within the WHMCS client area.
Buying the Addon
The FreeRadius Addon Module is available for $150 and can be purchased via the link below.
https://www.whmcs.com/members/cart.php?a=add&pid=160
Installing & Using FreeRadius with WHMCS
Once you've purchased the FreeRadius addon, you will receive an email once activated directing you where to download the addon from. Once downloaded, the freeradius module folder simply needs to be uploaded to the /modules/servers/ folder of your WHMCS installation.
This FreeRadius module interacts directly with the Radius database system and so once installed, you then need to go to Setup > Servers and create a server for the FreeRadius accounts entering the details as follows:
- Name - Anything you choose
- IP Address - SQL Hostname
- Server Type - Freeradius
- Username - SQL Username
- Password - SQL Password
- Access Hash - SQL Database Name
Next it's time to create a product, this is done under Setup > Products & Services as with any product in WHMCS. From there select the Add New Product option, specify a name, description & pricing, etc... all as desired, and then on the Module Settings tab, select the Freeradius module option and enter the Group Name defined in Radius to control the permissions/limitations of the account this product should setup.
That's all there is to it. You can then begin using the module in WHMCS as with any module, either manually invoking via the Module Command buttons displayed on a clients instance of the product, using the automated setup options of instantly upon order, after first payment or after manual admin review, and with the automated actions of overdue suspension, reactivations, late terminations, etc...
FAQ's
- Does this module work with PostgreSQL?
- At this time the module only works with MySQL. As the module is provided as plain source code, you may however modify the code so that it works with a PostgreSQL system instead.
- I can't see a users stats when logged into the admin area?
- The stats are only shown on the client area side. You'll need to 'Login as...' to view the stats for a particular account.
- I keep getting this error - "FreeRadius Database Query Error: Access denied for user 'vivieqsg_whmcs'@'localhost' to database 'radius'".
- The MySQL user does not have permissions to access your FreeRADIUS database. If you're hosting WHMCS and FreeRADIUS on different system (which isn't unusual), then you must make sure the MySQL user and host from which the MySQL user is connecting from, have permissions to access the database.
- I keep getting this error - "ERROR 2003 (HY000): Can't connect to MySQL server on 'ip.add.res.s' (110)".
- This usually means MySQL is not set to listen to outside connections or there is a firewall blocking the connections. Please ensure the IP address from which the module is connecting from is whitelisted in your firewall or that MySQL is set to allow external connections to it.
- I get this error when trying to use the Module Commands - "FreeRadius Database Query Error: Table 'radius.usergroup' doesn't exist".
- This means the module is trying to get or put data into your FreeRADIUS MySQL database, but the table either doesn't exist or is named something else. If this happens, you should get a list of the tables in your FreeRADIUS database and compare them with the error you've gotten. It may be necessary at this point to review and adjust the code of the module so that the module uses the names of tables in your database.
- How does the module configure usernames?
- The module will provision accounts and setup usernames based on the email address of the client. It will attempt to use the full email address as the username though if the username is already in use it will use the email address plus some numbers so each username is unique.
- How can I sync the name and contact information between WHMCS and FreeRADIUS?
- This information can be synced between WHMCS and FreeRADIUS by uncommenting line 167 through line 173 of the module. This will allow the name and contact details of the client in WHMCS to sync over to the users FreeRADIUS account.
- How do I specify additional radius configuration parameters for new accounts?
- To apply additional radius parameters to new accounts, simply duplicate lines 153 to 159 in the freeradius.php file within the freeradius_CreateAccount function, adjusting the values given for the attribute, value and op in the MySQL query on the first of those lines as required for your additional configuration parameter.