Linux

Resize and watermark images using Imagemagick

This is a modified version of my Resize of images in a folder with imagemagick post back in February. Only difference this time is that i strips out EXIF tags and the script has been cleaned up a bit. Click on the image to see the result in full size. #!/bin/bash # Description: # Script […]

Read More
Linux

Limit ssh access by MAC-address using iptables

This is a simple iptables rule to allow ssh access to a specific MAC-address iptables -A INPUT -p tcp –destination-port 22 -m mac –mac-source XX:XX:XX:XX:XX:XX -j ACCEPT This is a nice rule to allow only your laptop ssh access on your servers no matter what IP-address you may have while you are on the road. […]

Read More
Linux

Allow NFS through iptables

This is one way to determine the ports needed to open in your iptables rules to get NFS to work properly. First we need to determine the ports NFS uses rpcinfo -p | awk -F ” ” ‘{print $3 “, ” $4 “, ” $5}’ | sort | uniq Notice! Since portmap assigns ports on […]

Read More
Linux

Determine false positive from rkhunter

I’ve installed rkhunter, a rootkit checking script, on a Ubuntu 7.10 (Gutsy Gibbons) distro and today it mailed a message saying that 3 files had their properties changed. The files were /usr/bin/chattr, /usr/bin/lsattr and /usr/bin/perlBefore doing anything I tried to update rkhunter to see if there had been any updates to fix this message rkhunter –update […]

Read More