robotronik Posted January 14, 2010 Share Posted January 14, 2010 (edited) Hi, I have built this great little script that I use quite often. Thought it was time to give something back to the community. Effectively what it does is only let the accounts with correct permissions through preventing attacks hugely, even if your system is infected and someone gets hold of your WHMCS password. Chances are they can't get authorised to get in. How it works It uses DynDNS, noip or a similar service to detect the current IP of the hostname which if setup properly will dynamically update. Meaning anyone who does not have the hostname record configured, will not be able to access it. It also restricts what computers can log into the system. A great little lockdown method How to install This applies to each user logging into admin area. Upload the attached file (dnscron.php) to your WHMCS directory. Follow the steps below to get a dynamic hostname working. Setting up your hostname 1) Go to dyndns.com registration and setup an account. 2) Once registered go to 'My Services' tab, scroll to 'Host Services' and hit 'Add Hostname'. 3) Enter in the hostname box your desired name and a TLD to go alongside it. 4) At the 'IP Address' box, for now just hit 'Use auto detected IP address xx.xxx.xx.xxx.' 5) Scroll to the bottom of the page and click the 'Add to Cart' button. Note: This is a free service 6) The next page will load, your 'cart'. Click 'Next' then on the page after that click 'Activate Services' 7) You have now setup your hostname! But how to make it auto update? Auto Updating your Hostname Now, you have two options. 1) A lot of routers allow you to setup a DynDNS record in the admin panel usually something similar to 'DDNS', so if you can do that. Do it! All it requires is to enter your hostname, and your DynDNS.com login details. 2) If you are do not have this option (Which I believe most people should) you can download DynDNS updater here - http://cdn.dyndns.com/windows/DynUpSetup.exe. I reccomend running this as a service. Again, this will require entering your username, selecting the hostname you want to update and of course password. Now you should have dynamic DNS working! All that is left to do is edit the dnscron.php $hostnames variable and setup a cron, we recommend running this cron every 20 minutes - 1 hour. */20 * * * * php -q /home/youracc/public_html/WHMCSDIR/dnscron.php Hope this is of some value for a lot of you. dnscron.zip Edited January 14, 2010 by robotronik 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.