openbsd+pf配置

http://tech.ddvip.com   2006年08月28日    社区交流

本文详细介绍openbsd+pf配置

  /etc/pf/shellpf1如下

  pfctl -d

  pfctl -e

  pfctl -f /etc/pf/pf1.conf

  /etc/pf/shellpf2如下

  pfctl -d

  pfctl -e

  pfctl -f /etc/pf/pf2.conf

  crontab如下 /var/cron/tabs/root

  # $OpenBSD: crontab,v 1.9 2001/09/11 19:03:55 millert Exp $
# $Id: crontab-nomail,v 1.1 2002/04/15 01:03:20 jmates Exp $
#
# JAM 2002-04-14 Disabled mailings from root.
#
# /var/cron/tabs/root - root's crontab
#
SHELL=/bin/sh
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/etc/pf
HOME=/var/log
#
#minute hour mday month wday command
#
*/10 18 * * * /etc/pf/shellpf2
*/50 7 * * * /etc/pf/shellpf1
#
# sendmail clientmqueue runner
#
# rotate log files every hour, if necessary
0 * * * * /usr/bin/newsyslog
# send log file notifications, if necessary
#1-59 * * * * /usr/bin/newsyslog -m
#
# do daily/weekly/monthly maintenance
30 1 * * * /bin/sh /etc/daily 1>/var/log/daily.out 2>&1
30 3 * * 6 /bin/sh /etc/weekly 1>/var/log/weekly.out 2>&1
30 5 1 * * /bin/sh /etc/monthly 1>/var/log/monthly.out 2>&1

  每天7:50执行脚本shellpf1,18:10执行shellpf2

  对于mac与ip绑定,可写一脚本,防止有人改ip上网(会改mac地址的除外)

  arp -s 192.168.1.4 00:0c:76:84:52:f0 pub

  arp -s 192.168.1.5 00:0c:76:2f:dd:2c pub

责编:豆豆技术应用

正在加载评论...