A TEXT POST

WHMCS FreeRADIUS on GitHub

The WHMCS FreeRADIUS files can now be found on GitHub. Please star the project, spread the news, fork it and make it better. If you are not into code, please make a feature suggestion and maybe someone can eventually get to it.
 
This project is still a passion of mine, but I want it to do more.
 
Starting and ISP/WISP is hard enough without expensive billing and management tools. I hope this, my small little contribution to changing that, does just that.
 
Please be aware that this project’s code was taken from the private project to remove features that were paid for by clients. Those changes have not been tested. I have no dev or paid for WHMCS license or server, nor the budget for them.
 

A TEXT POST

New WHMCS Freeradius template files

If you bought a previous version and like what you see here, your upgrade is, as always, free. Just drop me a mail.


There are resellers of the module. Contact me for a list. You’ll get it cheaper through them :) They have SLA’s, development contracts and all that other stuff…


So lets get too it… what’s exactly change. Well, pretty much everything.

The product config has been striped of everything that could easily be set in a radius group.

The usage checking/capping scripts are back. Redone to keep your WHMCS as safe as possible, no remote database access required, or no need to mess with your Freeradius dictionary files.

Mainly, your users can pretty much choose thier own product limits on signup and change them at any point in time and get billed accordingly. Like so:

Client Ordering

I know, pretty cool and not that difficult to do either. Also, uncase you not so keen on that idea, you don’t have to configure your products like this at all.

You can set package defaults that will only be overridden IF the config options are present and not set to 0

Product Admin

Note the little red circle there, matches the usage limit in the clients product screen, also a new feature by the way. Yes, you can leave this setting blank or 0 for unlimited accounts. Same with the Rate Limit setting.

Client product admin

See, the config option is 0 so the package default, 1 GB, is used. If a config option is set though, it will be used

Client product admin

These details are also in the fully customizable client area template

Client area

Client area code

Oh yes…

Just incase you’re wondering how the example product’s config options in the screenshots were done:

Config options

Rate Limit

Usage Limit

A TEXT POST

The great Skype migration of 2012

Skype

Brand spanking new Skype name: eksoverzero

A TEXT POST

WHMCS on PHPFog with MailGun

So here we’ll hook up mail to WHMCS on PHPFog using MailGun. After seeing the MailGun interface, if you haven’t before, you’ll be like Grate Monkey what? I was.

This is the part when you should read the last 2 WHMCS & PHPFog Articles, if you haven’t already.

So if you know what PHPFog is I assume you know your way around the interface. So once you’ve enabled the MailGun Addon you’ll get some pretty convenient Environment Variables. This is the quickest way to your SMTP details:

So I took these…

 

… and put them here (in WHMCS)…

Yes that’s right. I blurred some stuff out of the email address. Just because my little testing WHMCS can’t afford to send money to Nigerian Princes, doesn’t mean they’re going to stop emailing and asking.

Yay, you have outbound mail. The inbound mail is just as easy.

In PHPFog, under Addons, click manage MailGun and you’ll get to the MailGun admin interface.

Here you can add mailboxes for all your WHMCS departments…

… and then create your WHMCS departments with those settings…

 

You’ll also notice this…

You will have to add that second line to a cronjob like in the “WHMCS on PHPFog II” article

The End

Donations accepted in beer ONLY! :)

A TEXT POST

WHMCS on PHPFog II, The Cron

I completely forgot to mention how to sort out the cron job required by WHMCS.

As per the PHPFrog documentation cron jobs can be done using two providers:

The latter didn’t load for me, probably just my fantastic internet connection.

So I went and got an account at mywebcron-com.loopiasecure.com. Fantastically simple signup, just linked it to my Google account (but they have other linking options too).

The system is really everything you need. Nothing flashy, it works and it’s free.

So…

WHMCS’s “cron.php” is located at “WHMCSROOT/admin/cron.php”. So the URL would be like “http://app.phpfrog.com/admin/cron.php” and set it to run once a day.

… and you’re done.

A TEXT POST

New WHMCS Freeradius Template

The custom WHMCS Freeradius Server module always starts from a template and the features you need are added.

I’ve got a new template with updated code and this:

Let you customers choose their own bandwidth & speed limits

-

Drop me a line if you’re curious. steven@secondimpression.net or on skype: “steven_eksteen_si3”

A TEXT POST

WHMCS on PHPFog

Well, this is how I did it…

PHPFog makes me almost like PHP again or rather like working with PHP. Managing  infrastructure is, for me at least, like sitting in a room full of Man United fans after they have just won a game, painful. Maybe PaaS has just made me lazy.

With WHMCS & PHPFog you can get going for about $16 for WHMCS & $30 for PHPFog Per Month. You could use PHPFog’s free shared cloud for testing.

-

I’ve created my app…

Before cloning your assigned git repo and while you’re still on the PHPFog interface, just add the WHMCS permissions quick. Like so…

You can now clone your repo.

Once you have a local copy delete the “index.php” and copy the WHMCS files in.

Rename the “configuration.php.new” file to “configuration.php”. Yes, it’s supposed to be a blank file.

You can now go ahead and send the files to your app…

$ git .

$ git commit -am “Fresh WHMCS install files”

$ git push origin master

You will now need your MySQL settings that PHPFog created for you with your app

You can now just goto your app URL and install WHMCS like normal.

Once installed you will be prompted to delete the install directory. You can delete or rename it, it doesn’t matter.

Done? Then you will need to make sure your blank “configuration.php” file does not overwrite your configured on on the server.

$ touch .gitignore

$ vi .gitignore

You can then add configuration.php to the file and save. My file looks like this…



You will then have to tell git to stop tracking the configuration.php file, and the others

git rm —cached configuration.php

You can now push again to remove/rename the install directory on the server

$ git add .

$ git commit -am “Rename install directory”

$ git push origin master

-

The local copy

The following is not at all a requirement. I just find it most helpful.

Since the “configuration.php” in you local copy is still blank. You could rename the install directory back to install, or copy it in again and run a local WHMCS install. Just don’t push your changes until you’re done and removed/renamed the install directory again.

With a working local copy of WHMCS you can create your templates and modules and just push your repo to send then to the server having tested them first instead of doing it blind. Remember, there is no FTP access to your files so you will have to use git to push and pull files.