iptables -A INPUT -p tcp --dport 22 -m recent --set --name ssh --rsource
iptables -A INPUT -p tcp --dport 22 -m recent ! --rcheck --seconds 60 --hitcount 4 --name ssh --rsource -j ACCEPT
The first rule says to record the IP of the sender whenever someone tries to connect to port 22. The second rule checks to see if the source has attempted t connect 4 or more times in the last 60 seconds. If not, allow the packet (since my policy is DROP, this is the only way the packet can get through).
iptables-save #to save it
Sunday, 9 September 2007
Wednesday, 18 July 2007
Saturday, 14 July 2007
wlan ubuntu hack
#! /bin/sh
# /etc/init.d/blah
#
echo 1 > /sys/bus/usb/devices/usb1/1-1/bConfigurationValue
/etc/init.d/networking restart
ifup wlan0
# /etc/init.d/blah
#
echo 1 > /sys/bus/usb/devices/usb1/1-1/bConfigurationValue
/etc/init.d/networking restart
ifup wlan0
Wednesday, 11 July 2007
Subscribe to:
Comments (Atom)