{"id":4815,"date":"2014-04-30T13:38:27","date_gmt":"2014-04-30T19:38:27","guid":{"rendered":"http:\/\/gregsowell.com\/?p=4815"},"modified":"2014-04-30T13:38:27","modified_gmt":"2014-04-30T19:38:27","slug":"how-to-setup-a-backup-radius-manager-install","status":"publish","type":"post","link":"https:\/\/gregsowell.com\/?p=4815","title":{"rendered":"How To Setup A Backup Radius Manager Install"},"content":{"rendered":"<p><a href=\"http:\/\/www.dmasoftlab.com\/cont\/home\">Radius Manager is a product from DMA softlabs<\/a> that acts as a radius authentication system for your wireless or hotspot clients.  I personally use it for my hotspot clients in Mikrotik.<\/p>\n<p>The point of this article is to show you how to add some redundancy to your configuration.  The software is licensed via a MAC address on one of your server&#8217;s NICs.  I think for the price of the software is great, so I would never advocate a method to circumvent licensing.  What I&#8217;m showing you how to do is simply setup a backup box for authentication, not administration.  When you duplicate the server as shown below the web GUI is no longer available&#8230;the box is only good for authentication; it will keep your clients working while you get the main box going again.<\/p>\n<p>Step one is to have a valid, licensed, working build.<\/p>\n<p>I, as most of you, installed my server on VMWare as a virtual guest.  Duplicate your guest VM and move it to another VMWare host.  The easiest way to do this is to browse your datastore, highlight the files, copy them, then create a new folder on the target VMWare host, and paste the files.<\/p>\n<p>Start your newly duplicated VM and tell the system you copied it.<\/p>\n<p>Edit your interface configuration in the server and give it a new IP address.<\/p>\n<p>Edit the system hostname:<br \/>\n\/etc\/sysconfig\/network  Set hostname= to your new hostname.<br \/>\n\/etc\/hosts   Set your hostname correctly to the new IP.<br \/>\nUse the hostname command from the cli to set your new hostname<\/p>\n<pre class=\"gs-code\"><code class=\"language-plaintext\">hostname my.new.hostname<\/code><\/pre>\n<p>Edit the raddb client file to allow all clients to connect.  When you use radius manager and add a new NAS, it manually updates the raddb client file, then restarts the radiusd service.  Since radius manager isn&#8217;t running on your duplicated server you either need to manually update the config file with each NAS update or put a catchall client in the list.<br \/>\n\/usr\/local\/etc\/raddb\/clients.conf<\/p>\n<pre class=\"gs-code\"><code class=\"language-plaintext\">client 0.0.0.0\/0 {\r\n\tsecret\t\t= SharedBackupPassword\r\n\tshortname\t= BackupClients\r\n}<\/code><\/pre>\n<p>Now that this is done, clients can technically authenticate off of this box&#8230;once you add additional radius servers to your hotspot that is.  One thing&#8230;there is no replication between the master radius box and this backup, so everything is stale.  Let&#8217;s fix that!<\/p>\n<p>First allow TCP 3306 in the input chain firewall on both of your servers.<br \/>\n<a href=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2014\/04\/mysqlrep.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2014\/04\/mysqlrep.png\" alt=\"mysqlrep\" width=\"543\" height=\"404\" class=\"aligncenter size-full wp-image-4820\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2014\/04\/mysqlrep.png 543w, https:\/\/gregsowell.com\/wp-content\/uploads\/2014\/04\/mysqlrep-300x223.png 300w\" sizes=\"auto, (max-width: 543px) 100vw, 543px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.0\/en\/replication-howto.html\">Configure MySQL replication<\/a>:<br \/>\n<strong>On the master server:<\/strong><br \/>\nEdit \/etc\/my.cnf and add the following to the [mysqld] section:<\/p>\n<pre class=\"gs-code\"><code class=\"language-plaintext\">log-bin=mysql-bin\r\nserver-id=1<\/code><\/pre>\n<p>Restart the mysql service: <\/p>\n<pre class=\"gs-code\"><code class=\"language-plaintext\">service mysqld restart<\/code><\/pre>\n<p>Create a replication user from the mysql CLI:<\/p>\n<pre class=\"gs-code\"><code class=\"language-plaintext\">CREATE USER &#039;replication&#039;@&#039;%.mydomain.com&#039; IDENTIFIED BY &#039;slavepass&#039;;\r\nGRANT REPLICATION SLAVE ON *.* TO &#039;replication&#039;@&#039;%.mydomain.com&#039;;<\/code><\/pre>\n<p>From the mysql CLI issue &#8220;SHOW MASTER STATUS;&#8221; and record the &#8220;file&#8221; and &#8220;position&#8221;.<\/p>\n<p><strong>On the slave server:<\/strong><br \/>\nEdit \/etc\/my.cnf and add the following to the [mysqld] section:<\/p>\n<pre class=\"gs-code\"><code class=\"language-plaintext\">server-id=2<\/code><\/pre>\n<p>From the mysql CLI issue:<\/p>\n<pre class=\"gs-code\"><code class=\"language-plaintext\">CHANGE MASTER TO\r\nMASTER_HOST=&#039;master_host_name&#039;,\r\nMASTER_USER=&#039;replication_user_name&#039;,\r\nMASTER_PASSWORD=&#039;replication_password&#039;,\r\nMASTER_LOG_FILE=&#039;recorded_log_file_name&#039;,\r\nMASTER_LOG_POS=recorded_log_position;<\/code><\/pre>\n<p>From the same CLI issue:<\/p>\n<pre class=\"gs-code\"><code class=\"language-plaintext\">slave start;<\/code><\/pre>\n<p>You can verify replication status via the CLI with:<\/p>\n<pre class=\"gs-code\"><code class=\"language-plaintext\">show slave status\\G<\/code><\/pre>\n<p>The easiest thing to do now is to reboot your secondary server.<\/p>\n<p>Any changes you make to Radius Manager on the primary box should automatically replicate to our new backup box.  If for some reason your primary box fails, clients can still authenticate off of your secondary box until you can stand the primary back up.<\/p>\n<p>Thanks and happy routing guys.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Radius Manager is a product from DMA softlabs that acts as a radius authentication system for your wireless or hotspot clients. I personally use\u2026<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,29,8,13],"tags":[],"class_list":["post-4815","post","type-post","status-publish","format-standard","hentry","category-linux","category-mysql","category-networking","category-server"],"_links":{"self":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/4815","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4815"}],"version-history":[{"count":12,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/4815\/revisions"}],"predecessor-version":[{"id":4828,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/4815\/revisions\/4828"}],"wp:attachment":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4815"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}