Category Archives: Linux
Sending mail from command line on Linux
If you need to sent a test email from a server via command line, you can use the following. This one uses PHP to send the email. Simply replace [email protected] with your own email address. php -r “mail(‘[email protected]’, ‘test’, ‘test’);” To send mail directly to the mail queue without the use of PHP, use …
Mass changes to DNS zones on a cpanel server
Let’s say you have a DNS server change, and need to update the zone records on all your domains to use the new name server “NS” records. Rather then going through each and every one of them in the WHM, you can run these 2 simple commands. cd /var/named;grep -lR ns.oldnameserver.com *.db >> fixfiles.txt for …
Common DNS syntax errors
Your Internet Address has changed since the beginning of your Mail session
How to block wordpress logins and xmlrpc with no referer
If you are getting flooded with wordpress login attempts by a suspected hacker, you can add the following rule to mod security in /usr/local/apache/conf/modsec2.user.conf This rule will block any access to wp-login.php that does not contain a referer #block wp-lgoin.php with no referer <Locationmatch “/wp-login.php”> SecRule REQUEST_METHOD “POST” “deny,status:401,id:5000130,chain,msg:’wp-login request blocked, no referer’” SecRule &HTTP_REFERER …
Some common postfix commands
Mod_security and cPanel temp URL’s
If you have a customer that is getting ModSecurity errors when accessing parts of their site using a temp URL like this: http://host.servername.com/~theirusername You may want to whitelist the rule that is blocking the page, however you can not just whitelist this on the users account itself. You need to make sure the whitelist happens …
- English Support
- 24/7 x 365
- Branded Support
- Reduced Overhead
- Linux Experts
- Friendly Staff