# 一、 网络环境 1、主机A: 安装freebsd6.0,安装两块网卡rl0和gem0。rl0为对外网卡,IP:x.x.x.x ISP为我提供的IP地址,gem0为对内服务提供区域网卡,IP:192.168.80.1。
2、其他工作站N台。
# 二、编译内核 1、编译过程
cd /sys/sparc64/conf cp GENERIC proxy cd ../../compile/proxy make kepend make make install 2、编辑proxy,加入一下选项:
options IPFILTER options IPFILTER_LOG options IPFILTER_DEFAULT_BLOCK 3、开始编译
#/usr/sbin/config proxy # cd ../../compile/proxy # make kepend # make # make install 4、编辑/etc/rc.rc.conf,打开以下选项:
ipfilter_enable=”YES” # Start ipf firewall ipfilter_rules=”/etc/ipf.rules” # loads rules definition text file ipmon_enable=”YES” # Start IP monitor log ipmon_flags=”-Ds” # D = start as daemon # s = log to syslog # v = log tcp window, ack, seq # n = map IP & port to names gateway_enable=”YES” # Enable as LAN gateway ipnat_enable=”YES” # Start ipnat function ipnat_rules=”/etc/ipnat.