Jump to content

can we secure cron.php?


awardle

Recommended Posts

Hi,

 

Is it possible to secure the cron.php file? to prevent anyone going to that url and running a cron job? i.e. if it could check if localhost executed it?

 

For example my cron runs every day at 8am, however at 11:50 the cron job has been ran again by what looks like a bot.

 

HTTP/1.0 ia_archiver+(+http://www.alexa.com/site/help/webmasters;+crawler@alexa.com)

 

I'm still looking into why or how the bot found this cron page but was also thinking any user who knows that a website is running whmcs could also execute the cron when ever they like.

 

Which is a complete pain as my customers have been sent two reminders in just one day :(

 

Thanks Aaron.

Link to comment
Share on other sites

You could (and probably should) restrict access to the admin area to certain IPs, as well as renaming it to prevent anything "finding" that directory accidentally.

 

Order Deny,Allow
Deny from all
Allow from ip.address.goes.here

 

I should think you could also rename it, just make sure you change your cron entry to the new name.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated