Public feed #725713

Miscellany

public text v1 · immutable
Raw Edit
·published 2007-10-04 17:26 UTC
rendered paste body
# cat /usr/local/sbin/maintain_pftables                                                                                                                                                                          
#!/bin/sh

#lets clear old entries from the tables
/sbin/pfctl -t ssh_attack -T expire 1209600
/sbin/pfctl -t irc_attack -T expire 86400 

#save the ssh_attack table
/sbin/pfctl -t ssh_attack -T show > /etc/pftable_ssh_attack
#save the irc_attack table
/sbin/pfctl -t irc_attack -T show > /etc/pftable_irc_attack
#save the irc_hubs table
/sbin/pfctl -t irc_hubs -T show > /etc/pftable_irc_hubs
#save the whitelist table
/sbin/pfctl -t whitelisted_hosts -T show > /etc/pftable_whitelisted_hosts
#save the backuphost table
/sbin/pfctl -t backup_hosts -T show > /etc/pftable_backup_hosts

# crontab -l | grep pftable
@hourly /usr/local/sbin/maintain_pftables > /dev/null 2>&1