PHPackages                             ictsolutions/codeigniter-freeradius - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ictsolutions/codeigniter-freeradius

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ictsolutions/codeigniter-freeradius
===================================

CodeIgniter4 FreeRadius wrapper library.

v1.0.0(1y ago)512.8k↓50%1[1 issues](https://github.com/ict-solutions-dev/codeigniter-freeradius/issues)[3 PRs](https://github.com/ict-solutions-dev/codeigniter-freeradius/pulls)MITPHPPHP ^8.1CI passing

Since Aug 16Pushed 5mo agoCompare

[ Source](https://github.com/ict-solutions-dev/codeigniter-freeradius)[ Packagist](https://packagist.org/packages/ictsolutions/codeigniter-freeradius)[ RSS](/packages/ictsolutions-codeigniter-freeradius/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (7)Used By (0)

Codeigniter FreeRADIUS
======================

[](#codeigniter-freeradius)

The CodeIgniter FreeRADIUS library provides a suite of tools designed to manage and interact with a FreeRADIUS server through the CodeIgniter framework. It offers functionality for database handling, configuring FreeRADIUS tables, manipulating username realms and characteristics, modifying PPPoE group settings, and managing IP ranges for Carrier-Grade NAT (CGNAT). This library significantly simplifies the process of working with a FreeRADIUS server by offering pre-defined and easily configurable settings.

Moreover, its seamless integration with the CodeIgniter framework makes it an exemplary toolset for developers requiring remote authentication and accounting in their PHP applications. This allows developers to focus more on their application's core features, assured in the knowledge that their FreeRADIUS server interaction is handled proficiently by this library.

[![PHP](https://camo.githubusercontent.com/d6aac44f81cb2e6f4e71f098a1cb4a71992f24f7bfb424f6670db8313c9a855c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e312d626c7565)](https://camo.githubusercontent.com/d6aac44f81cb2e6f4e71f098a1cb4a71992f24f7bfb424f6670db8313c9a855c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e312d626c7565)[![CodeIgniter](https://camo.githubusercontent.com/8867c0cb2bfb4e11f527658f45d11bea936efb5a06e66b10e576912cf40874e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f646549676e697465722d253545342e332d626c7565)](https://camo.githubusercontent.com/8867c0cb2bfb4e11f527658f45d11bea936efb5a06e66b10e576912cf40874e5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f646549676e697465722d253545342e332d626c7565)

Installation
------------

[](#installation)

Installation is done through Composer.

```
composer require ictsolutions/codeigniter-freeradius
```

Configuration
-------------

[](#configuration)

Tables: The FreeRADIUS tables are named as radacct, radcheck, radgroupcheck, radgroupreply, radreply, radusergroup, radpostauth, nas, nasreload, and userinfo. These are typically created when installing and configuring a FreeRADIUS server and are used to manage RADIUS accounts, user groups, authentication, and servers.

usernameRealm: The realm that's used to construct usernames is set to null by default, meaning that there's no realm added to the username.

usernameCharacters &amp; usernameLength: Usernames are generated using the characters '0-9' and 'A-Z' and they have a length of 6 characters.

passwordCharacters &amp; passwordLength: Passwords are generated using the characters '0-9' and 'A-Z' and they have a length of 12 characters.

pppoeGroupName &amp; pppoeGroupPriority: The default Point-to-Point Protocol over Ethernet (PPPoE) group name is 'PPPoE' and it has a priority of 0.

ipStart &amp; ipEnd: The IP address range for Carrier-Grade NAT (CGNAT) starts from '100.64.0.0' to '100.64.63.255'.

Enumerations
------------

[](#enumerations)

### Attribute Enumeration

[](#attribute-enumeration)

The Attribute enumeration consists of the following Enums, representing different RADIUS protocol attributes that can be used within this CodeIgniter FreeRADIUS Library:

```
namespace IctSolutions\CodeIgniterFreeRadius\Enums;

enum Attribute: string
{
    case CleartextPassword = 'Cleartext-Password';
    case FallThrough = 'Fall-Through';
    case SimultaneousUse = 'Simultaneous-Use';
    case ServiceType = 'Service-Type';
    case FramedIPAddress = 'Framed-IP-Address';
    case FramedIPNetmask = 'Framed-IP-Netmask';
    case FramedProtocol = 'Framed-Protocol';
    case FramedMTU = 'Framed-MTU';
    case CiscoAVPair = 'Cisco-AVPair';
    case CiscoNASPort = 'Cisco-NAS-Port';
    case CiscoFramedRoute = 'Cisco-Framed-Route';
}
```

Each Enum accompanies a comment, describing its purpose or function in the RADIUS protocol.

### Operator Enumeration

[](#operator-enumeration)

The Operator enumeration consists of different operators that can be applied to the CodeIgniter FreeRADIUS Library attributes:

```
namespace IctSolutions\CodeIgniterFreeRadius\Enums;

enum Operator: string
{
    case Equals = '=';
    case Assign = ':=';
    case Check = '==';
    case Add = '+=';
    case NotEquals = '!=';
    case Greater = '>';
    case GreaterEquals = '>=';
    case Less = 'bindUser(Attribute::FramedIPAddress, Operator::Equals, $attributeValue);
```

This will bind the user to the provided IP address using the RADIUS protocol attribute for framed IP.

### Check User's Binding

[](#check-users-binding)

You can also check the user's binding status:

```
$status = $freeRadiusLibrary->checkUserBinding(Attribute::FramedIPAddress, $attributeValue);
```

This method will check if the user has the 'Framed-IPAddress' correctly bound with the provided value.

### Other Features

[](#other-features)

There are other features that allow you to work with FreeRADIUS server's advanced configurations. Set fall-through behavior, allow simultaneous logins, set service type, and other configurations via a simple syntax:

```
$config = [
    Attribute::FallThrough => ['operator' => Operator::NotEquals, 'value' => 'YES'],
    Attribute::SimultaneousUse => ['operator' => Operator::LessEquals, 'value' => 1],
    Attribute::ServiceType => ['operator' => Operator::Equals, 'value' => 'Framed-User'],
];

$freeRadiusLibrary->applyConfigs($config);
```

This will configure the FreeRADIUS server to not allow fall-through, limit simultaneous logins to one, and set the service type to 'Framed-User'.

Please note that for actual deployment, all attribute value, operator, user details etc. should be carefully managed and sanitized.

Example: Creating a CodeIgniter Project with FreeRADIUS
-------------------------------------------------------

[](#example-creating-a-codeigniter-project-with-freeradius)

### Step 1: Create New CodeIgniter Project

[](#step-1-create-new-codeigniter-project)

Start by creating a new CodeIgniter project if you haven't already. You can initiate a project using Composer:

```
composer create-project codeigniter4/appstarter myProject
```

Navigate to the newly created project:

```
cd myProject
```

### Step 2: Install CodeIgniter FreeRADIUS library

[](#step-2-install-codeigniter-freeradius-library)

Add the FreeRADIUS library to your project:

```
composer require ictsolutions/codeigniter-freeradius
```

### Step 3: Run the Migration

[](#step-3-run-the-migration)

Now you can run your migration. This will create the necessary tables in your database for the FreeRADIUS to work:

```
php spark migrate
```

Check your database to verify that the tables were created.

### Step 5: Using the Library in Your Code

[](#step-5-using-the-library-in-your-code)

After the setup, you can utilize the FreeRadius library in the CodeIgniter project. For example, in your controller:

```
use IctSolutions\CodeIgniterFreeRadius\Enums\Attribute;
use IctSolutions\CodeIgniterFreeRadius\Enums\Operator;

public function index(){
    $freeRadius = \IctSolutions\CodeIgniterFreeRadius\Config\Services::freeradius();

    // Let's bind a user 'john' with a Cleartext-Password
    $freeRadius->bindUser('john', Attribute::CleartextPassword, Operator::Equals, 'JohnsPassword123');
}
```

Please, ensure you replace 'JohnsPassword123' with a safe and hashed version of the password in a real-life scenario.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance55

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

447d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8ab17386c6bc38ac565499e5595bb46c1cfd7f40ba8a655c55be32bd17f21b1b?d=identicon)[jozefrebjak](/maintainers/jozefrebjak)

---

Top Contributors

[![jozefrebjak](https://avatars.githubusercontent.com/u/36922215?v=4)](https://github.com/jozefrebjak "jozefrebjak (54 commits)")[![matusbarany04](https://avatars.githubusercontent.com/u/58101335?v=4)](https://github.com/matusbarany04 "matusbarany04 (6 commits)")[![jakubnitsch](https://avatars.githubusercontent.com/u/78874880?v=4)](https://github.com/jakubnitsch "jakubnitsch (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

codeignitercodeigniter4freeradius

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ictsolutions-codeigniter-freeradius/health.svg)

```
[![Health](https://phpackages.com/badges/ictsolutions-codeigniter-freeradius/health.svg)](https://phpackages.com/packages/ictsolutions-codeigniter-freeradius)
```

###  Alternatives

[codeigniter4/settings

Settings library for CodeIgniter 4

93499.3k24](/packages/codeigniter4-settings)[codeigniter4/devkit

Development toolkit for CodeIgniter libraries and projects

68187.1k82](/packages/codeigniter4-devkit)[tatter/alerts

Lightweight user alerts for CodeIgniter 4

4072.4k6](/packages/tatter-alerts)[tatter/patches

Automated project updates for CodeIgniter 4

3588.4k3](/packages/tatter-patches)[michalsn/codeigniter4-uuid

UUID and ULID package for CodeIgniter 4 with support for Model.

4728.7k4](/packages/michalsn-codeigniter4-uuid)[kenjis/ci3-to-4-upgrade-helper

Help upgrade from CodeIgniter3 to CodeIgniter4

695.9k](/packages/kenjis-ci3-to-4-upgrade-helper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
