Running a WebSite is a PAIN
Just some things, i am doing to optimise my website and stop it getting DDOS.
- Run OWASP Top 10 / Web Exploite Kit Scan
- https://www.perpetual-beta.org/weblog/security-headers.html
- Google SEO Guide – https://static.googleusercontent.com/media/www.google.com/en//webmasters/docs/search-engine-optimization-starter-guide.pdf
- Mobile Check – https://testmysite.thinkwithgoogle.com/ https://www.google.com.au/webmasters/tools/mobile-friendly/?url=unitycloud.com
- SEO Check – http://seositecheckup.com/seo-audit/unitycloud.com
- Check AWSTATS and block IP address that are crawling websites – https://www.siteground.com/tutorials/cpanel/ip_deny_manager.htm
- Block bots
- Send Bots Home
[source]
RewriteCond %{HTTP_USER_AGENT} ^.*(Ahrefs|Baidu|BlogScope|Butterfly|DCPbot|discoverybot|domain|Ezooms|ImageSearcherFree).*$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*(ips-agent|linkdex|MJ12|Netcraft|NextGenSearchBot|SISTRIX|Sogou|soso|TweetmemeBot|Unwind|Yandex).*$ [NC]
RewriteRule ^/?.*$ "http\:\/\/127\.0\.0\.1" [R,L]
[/source]
- Install ZBBock
- Country Block rouge nations that are not your customers. (Ukraine,etc.)
- Reduce Crawl rate for known bots
[source]
User-agent: msnbot
Crawl-delay: 1
No crawl delay set – Normal
1 – Slow
5 – Very Slow
10 – Extremely Slow
[/source]
- Sent Rouge Bots back home
[source]
RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
RewriteCond %{HTTP_USER_AGENT} (bot|crawl|robot)
RewriteCond %{HTTP_USER_AGENT} !(bing|Google|msn|MSR|Twitter) [NC]
RewriteRule ^/?.*$ "http\:\/\/127\.0\.0\.1" [R,L]
[/source]
[source]
<Limit GET HEAD POST>
order deny,allow
deny from all
allow from 103.51.61.0/24
</Limit>
[/source]
- Disable Joomla User registration
[source]
<p class="p1"></p>
<p class="p1"><span class="s1">administrator/index2.php?option=com_users&task=view&limit=1000</span></p>
<p class="p3"><span class="s1">DELETE FROM `sgj_users` WHERE </span><span class="s2"><b>WHERE</b></span> <span class="s4">`name`</span><span class="s3"> <a href="https://secure290.sgcpanel.com:2083/cpsess2361581801/3rdparty/phpMyAdmin/url.php?url=http%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.6%2Fen%2Fstring-comparison-functions.html%23operator_not-like&token=ef685e82a572e349ffa84ebb4a973a89"><span class="s2"><b>NOT</b></span> <span class="s2"><b>LIKE</b></span></a> </span><span class="s4">’Administrator’</span></p>
[/source]
- Install Captcha on FORMs
- Set Google Crawl Rate – https://support.google.com/webmasters/answer/48620?hl=en
- Block Countries – http://incredibill.me/htaccess-block-country-ips
- www.ip2locations.com
- https://httpd.apache.org/docs/2.4/rewrite/access.html#blocking-of-robots
- http://www.thesitewizard.com/apache/block-bots-with-htaccess.shtml
- http://torquemag.io/2016/03/wordpress-sites-hacked/
- Password Protect Administrator and User Login Directoroes
- index.php/using-joomla/extensions/components/users-component/login-form
- /administrator
- [source]</li>
<li>RewriteEngine On
RewriteCond %{REQUEST_URI} using-joomla/extensions/components/users-component/login-form$ [NC]
RewriteRule ^.*$ – [F,L]</li>
<li>[/source]
- Block unknown Bots
- In order to block all bots from accessing your site, you should create a robots.txt file with the following content:User-agent: *
Disallow: /To block all bots from accessing a specific folder, you should create a robots.txt file with the following content:User-agent: *
Disallow: /folder/ - https://www.plagiarismtoday.com/2010/06/10/blocking-bad-bots-with-robots-txt/
- http://www.javascriptkit.com/howto/htaccess13.shtml
- In order to block all bots from accessing your site, you should create a robots.txt file with the following content:User-agent: *
- Decrease Crawl Rates
- Reduce Excutions
- Block scans for database files
- https://perishablepress.com/scanning-for-backup-files/
- Scan offline for content (
wget -m -k -K -E -l 7 -t 6 -w 5 http://www.website.com
- Blackhole
-
Server-Side Security
-
Use HTTPS exclusively, at the very least for authentication and authenticated content
Honestly, you should use HTTPS exclusively and always redirect HTTP content to HTTPS, preventing a user being tricked into providing credentials or other PII over HTTP
Ensure Secure flag is enabled on cookies, preventing HTTPS cookies from leaking over HTTP
When loading remote Javascript resources, use the Subresource Integrity script tag attribute
Use HSTS to prevent HTTPS downgrade attacks
- Block unknown Bots
- http://incredibill.me/htaccess-block-user-agent
- [sourcecode]</li>
<li># BLOCK USER AGENTS
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} xenu [NC,OR]
RewriteCond %{HTTP_USER_AGENT} nutch [NC,OR]
RewriteCond %{HTTP_USER_AGENT} curl [NC,OR]
RewriteCond %{HTTP_USER_AGENT} larbin [NC,OR]
RewriteCond %{HTTP_USER_AGENT} heritrix [NC,OR]
RewriteCond %{HTTP_USER_AGENT} wget [NC]
RewriteRule !^robots\.txt$ – [F]# BLOCK BLANK USER AGENTS
RewriteCond %{HTTP_USER_AGENT} ^-?$
RewriteRule ^ – [F]</li>
<li>[/sourcecode]