Sharing Ilmu

Sharing for useful things

Freeradius Integration for Hotspot user Mikrotik (Ubuntu server 16.04)

Hello everyone, in this tutorial I’ll discuss about hotspot integration with freeradius. Freeradius is a opensource software that can used for server authentication and support for mikrotik.  for this tutorial I’m using ubuntu server 16.04 for radius server.

This is topologi are used

First you must doing default configuration on mikrotik so that the router can be distribute internet connection for your network.

Then configure ip address for ethernet that connected to freeradius server and network hotspot.

Configure Network for ubuntu server. make sure you know what the name of interface lan at your server

Conguration IP Address :

Configuration IP DNS :

After that, reboot your system.

Then make sure your server can be connected to internet.


Install freeradius packages

# apt-get install freeradius freeradius-utils freeradius-mysql

Configuration freeradius in /etc/freeradius/radiusd.conf

# nano /etc/freeradius/radiusd.conf

Make sure  $INCLUDE clients.conf  command is active (not have # command in begin)


Configuration freeradius client in /etc/freeradius/clients.conf

# nano /etc/freeradius/clients.conf

Add new config for client with ip (ip router) and secret for secure radius connection.

Then add new user for test connection in hotspot. add 2 new user in /etc/freeradius/users

in this tutorial I have add user1 with secret pwd1 and user2 with secret pwd2

Test radius user connection with radtest command

# radtest youruser yourpassworduser localhost 1812 testing123

if you showing Accept Packet status that mean the connection was successfully.


Make sure you have configure hotspot server on your router


Configuration Radius in your router in RADIUS menu. add new config with service hotspot. address is ip address for radius server and secret is the secret that has create before

Test configuration on your hotspot network

Hotspot connection with radius server was successfully


Leave a Reply

Your email address will not be published. Required fields are marked *.

You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>