Remove iThemes Security Lockouts Script

I decided to create a command line PHP script that would list the current iThemes Security Logs and also allow you to remove them based on IP Address. Here is the script which I’ve called “ithemes-clearip.php” and it’s Github link, its dirty and really was made in like 15 minutes.

https://github.com/jordantrizz/wordpress-scripts

 

 

Nagios NRPE Disk Check Error on Plesk

If you’re monitoring a server with Nagios NRPE that is running Plesk, you might have run into the following issue. The disck_check command may return the following lovely error message.

DISK CRITICAL – /var/named/chroot/etc/named is not accessible: Permission denied

The fix is rather simple, you just need to modify the /etc/nagios/nrpe.cfg file and change your disk_check command to include the following

-x /var/named/chroot/etc/named -x /var/named/chroot/var/named -x /var/named/chroot/etc/named.rfc1912.zones -x /var/named/chroot/etc/rndc.key -x /var/named/chroot/usr/lib64/bind -x /var/named/chroot/etc/named.iscdlv.key -x /var/named/chroot/etc/named.root.key

Which will exclude the chrooted locations that the NRPE daemon doesn’t have access to it.

Setting up MikroTik/RouterOS with Conditional DNS Forwarding (UnoTelly/UnblockUS)

I have a MikroTik RouterOS device that has some custom DNS settings and therefore I cannot change the DNS servers it provides to clients, which is a requirement to use UnoTelly or Unblockus. Instead I found the following article very helpful, it allows you to configure Conditional DNS forwarding for specific domains.

https://www.dalemacartney.com/2012/12/29/dns-conditional-forwarders-with-mikrotik-routeros/

This works well because I use MediaHint to swap back and forth for NetFlix US and Canada, but use only the US Amazon Prime.

 

How to Disable the Displet Pop WordPress Plugin on Specific Pages

You won’t find much within the support forums in-regards to how to stop the Displet Pop plugin from loading on specific pages. However, I was able to find some pre-created code that does accomplish the task and just modified it for the Displet Pop plugin.

 

 

WordPress Plugin Wordtwit Add Twitter Account Not Working (Setup Instructions)

If you’ve recently upgraded Wordtwit, you’ll notice some changes which are specifically to address the old Twitter API being deprecated. You will need to create a Twitter Application for Wordtwit to be able to add a Twitter account.

The developer has provided some instructions on how to correctly create a Twitter application for Wordtwit:Creating a custom application for WordTwit

Make sure that you set the callback URL to your websites URL, which is what I had skipped and caused the “Add Account” button under Twitter accounts to not function at all.

 

 

Receiving Windows 7 File In Use Errors or File Locked By Process Errors

For some reason I’ve been getting issues with applications trying to update themselves, file lock errors will occur. Today it started happening with Steam, it downloaded an update and tried to run but was unable to remove the Steam.exe file stating that it was in use.

I did a bit of googling and found that this may occur if the Application Experience service is disabled, of which it was. Once I set it to “Manual” and started the service, Steam could update correctly with any file lock errors.

As for how this was disabled, I have no idea but I believe it may have been an SSD guide or a guide on how to disable non-essential Windows 7 services.

Export DHCP Leases to HTML or CSV in Windows Server 2003/2008

If you’re looking to export your DHCP leases on your Windows Server into a readable format, then the following article will help.

http://theadminguy.com/2009/10/14/export-dhcp-leases-to-html-using-powershell/

You can also simply run the following command and copy and paste it into excel and it should match the columns correctly.

 

 

OpenClinica Tomcat Error When Setting JAVA_OPTS on Ubuntu 10.04

I’ve setup OpenClinica a number of time and never really touched the JAVA_OPTS for Tomcat because I’ve never really had any issues. On the OpenClinica Installation Documentation it states that the JVM performs well when using the following JAVA_OPTS

https://docs.openclinica.com/3.1/installation/installation-linux#content-title-5460

 

However, if you’re running Ubuntu 10.04 LTS, you will receive an error when modifying the /etc/default/tomcat6 JAVA_OPTS.

 

The two options that cause this error are “-XX:+UseParallelGC -XX:ParallelGCThreads=2″, if you remove these then the errors go away. Looking into this further, I’ve found some documentation but not much. The commands are related to garbage collection, and the following article sheds some light on the above two commands as well as “-XX:+UseParNewGC”

http://stackoverflow.com/questions/2101518/difference-between-xxuseparallelgc-and-xxuseparnewgc

Upon remove the two recommended options and adding “-XX:+UseParNewGC” tomcat6 starts without error.

If anyone has any information on why this is, it would be great to know.

Apache Tomcat Native library Not Found Error on Ubuntu

Sometimes you might get the following error message in your logs for your Tomcat instance under Ubuntu.

 

To fix this issue, simply run the following command to install the appropriate library.

 

The error should go away!