Table of Contents

Advanced configuration of the Mikrotik RB751

Introduction

Although the instructions on this page makes use of the RB751, the same principles should also apply to other Mikrotik Routerboards.
The following advanced configurations will be covered in this document:


Central Dynamic Login pages

Include PAP support on Hotspot

Fetch Replacement Login Pages

#From a Linux machine with git client installed
sudo git clone https://git.code.sf.net/p/radiusdesk/git rd_code

Add a dynamic key to a Dynamic login page entry

  • As of 2022 we recommend changing to serving the login pages over HTTPS.
  • This will require valid SSL certificates on the server as well as the Mikrotik
$(if error == '')
<html>
    <head><title>...</title></head>
    <body>
        $(if chap-id)
        <noscript>
            <center><b>JavaScript required. Enable JavaScript to continue.</b></center>
        </noscript>
        $(endif)
        <center>If you are not redirected in a few seconds, click 'continue' below<br>
        <form name="redirect" action="https://YOUR_RADIUSDESK_SERVER_IP/cake3/rd_cake/dynamic-details/mikrotik-browser-detect" method="post">
            <input type="hidden" name="loginlink" value="$(link-login-only)">
            <input type="hidden" name="nasid" value="$(identity)">
            <input type="hidden" name="link_status" value="$(link-status)">
            <input type="hidden" name="link_login_only" value="$(link-login-only)">
            <input type="hidden" name="link_logout" value="$(link-logout)">
            <input type="hidden" name="mac" value="$(mac-esc)">
            <input type="hidden" name="type" value="mikrotik">
            <input type="hidden" name="ssid" value="Gauteng">
            <input type="submit" value="continue">
        </form>
        <script language="JavaScript">
        <!--
           document.redirect.submit();
        //-->
        </script>
        </center>
    </body>
</html>
$(else)
$(var)({
	'logged_in' 	    : '$(logged-in)', 	
	'link_login_only' 	: '$(link-login-only)',
	'error_orig'		: '$(error-orig)',
	'error'			: '$(error)'
})
$(endif)

When you are done editing the login.html page and also added the Dynamic key to the Dynamic login page which you want to serve on the Mikrotik; you can copy the replacement pages to the Mikrotik router.

Enable HTTPs support on Mikrotik

Install a valid SSL Certificate

Add an entry to the Mikrotik Walled Garden

Replace the existing pages on the Mikrotik