Network

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
Security

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
Linux

Run X programs through ssh

A easy way to run remote X programs (from another host) on your local linux installation is to connect to it via ssh using the -Y switch. For instance if you would like to run up2date in graphical mode on a remote machine but the server doesn’t have X installed. Then this is a great […]

Read More