Would you like to learn how to configure Mikrotik to use Freeradius as the authentication server?In this tutorial, we are going to show you how to authenticate Mikrotik users using a Freeradius server installed on a computer running Ubuntu Linux.

MikroTik Tutorial:

On this page, we offer quick access to a list of tutorials related to MikroTik.

Tutorial – FreeRadius Server Installation on Ubuntu Linux

• IP – 192.168.15.10.
• Operacional System – Ubuntu 19.10
• Hostname – UBUNTU

On the Linux console, use the following commands to install the FreeRadius service.

Copy to Clipboard

Now, we need to add FreeRadius clients to the clients.conf;.

Locate and edit the clients.conf.

Copy to Clipboard

Add the following lines at the end of the clients.conf file.

Copy to Clipboard

In our example, we are adding 1 client device:

The client device was named MIKROTIK and has the IP address 192.168.15.20.

Now, we need to add FreeRadius users to the USERS configuration file.

Locate and edit the Freeradius users configuration file.

Copy to Clipboard

Add the following lines at the end of the file

Copy to Clipboard

Edit the FreeRadius dictionary file.

Copy to Clipboard

Add the following lines at the end of the dictionary file

Copy to Clipboard

The default Freeradius installation comes with a dictionary file named dictionary.mikrotik that includes all the feature required to enable the Mikrotik installation.

Here is the content of the dictionary.mikrotik file that will be included on the Freeradius dictionary file.

Copy to Clipboard

Restart the Freeradius server.

Copy to Clipboard

Test your radius server configuration file.

Copy to Clipboard

You have finished the Freeradius installation on Ubuntu Linux.

Tutorial – MikroTik Radius Authentication

• IP – 192.168.15.20.
• Operacional System – RouterOS 6.45.7
• Hostname – MikroTik

On the Mikrotik router console, use the following command to

Perform the following Radius configuration:

• Radius IP address – 192.168.15.10
• Radius Shared Secret – The Radius Client shared secret (kamisama123)

You need to change IP address of the Radius server to reflect your Radius server IP address.

You need to change the Shared secret to reflect your Radius client shared secret.

Copy to Clipboard

Here is the command output:

Copy to Clipboard

Enable the local user authorization to use Radius.

Copy to Clipboard

Here is the command output:

Copy to Clipboard

Congratulations! You have configured the Mikrotik authentication to use the FreeRadius database.

Tutorial MikroTik – Radius Authentication Test

Now, you need to test the Mikrotik Radius authentication.

Download the PUTTY software and try to authentication on the Mikrotik using the SSH protocol.

mikrotik ssh radius

If you authenticate using the account named bruno you will have read-only permissions.

If you authenticate using the account named administrator you will have read-write permissions.

mikrotik radius client authentication

Congratulations! You have tested the Mikrotik radius authentication.