|
发表于 2005-8-24 04:30:27
|
显示全部楼层
来自 中国–广东–广州
Post by windgao
match_emulate
options ipv6
options NFS
options NFS-ROOT
options MSDOSFS
options VCONSOLE
options VSERCONFING
options VISUAL_VSERCONFIG
options KTRACE
options KBD_KBD_INSTALL_CDEV
options AHC_REG_PRETTY_PRINT
options SCSI_DELAY=1500
以上去掉
options i386
cpu i686cpu
ident GENERIC
maxuser 0
----------
derice pf
device pflog
device pfsync
--------------
options ALTQ
options ALTQ_CBQ
options ALTQ_RED
options ALTQ_RIO
options ALTQ_HFSC
options ALTQ-PRIQ
-----------------
options PANIC_REBOOT_WAIT_TIME=0
options DEVICE_POLLING
options HZ=2000
options IPSTEALTH
options TCP_DROP_SYNFIN
-----------------------
options QUOTA
--------------------------------
nameserver 202.96.134.133
nameserver 202.96.128.68
--------------------------------
/etc/fstab
/usr.rm.userquota,groupquota
--------------------------------
/etc/rc.conf
gateway_enable="YES"
kern_securelevel_enable="YES"
kern_securelevel="2"
inetd_enable="YES"
inetd_flags="-l -R 1024"
syslogd_enable="YES"
syslogd_flogs="-s -s"
background_dhclient="YES"
keyrate="fast"
sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
snedmail_msp_queue_enable="NO"
clear_tmp_enable="YES"
fsck_y_enable="YES"
update_motd="NO"
tcp_drop_redirect="YES"
icmp_log_redirect="YES"
tcp_drop_synfin="YES"
log_in_vain="YES"
accounting_enable="YES"
linux_enable="YES"
ssh_enable="YES"
pf_enable="YES"
pf_rules="/etc/pf.conf"
pf_flags=""
pf_enable="YES"
pflog_logfile="/var/log/pflog"
enable_quota="YES"
----------------------------------
net.inet.ip.forwarding=1
net.inet.ip.fastforwarding=1
net.inet.tcp.drop_synfin=1
net.inet.tcp.sendspace=65536
net.inet.tcp.recvspace=65536
net.udp.sendspace=65535
net.local.stream.sendspace=65535
net.inet.tcp.rfc1323=1
net.inet.tcp.rfc1324=1
net.inet.tcp.rfc3042=1
net.inet.tcp.rfc3390=1
kern.ipc.maxsockbuf=2097152
kern.maxfiles=65536
kern.maxfilesperproc=32768
kern.polling.enable=1
kern.ipc.somaxconn=2048
kern.ipc.nmbclusters=32768
net.inet.icmp.icmplim=100
net.inet.icmplim_output=0
net.inet.tcp.drop_synfin=1
net.inet.tcp.msl=7500
net.inet.tcp.syncookies=1
net.inet.udp.blackhole=2
net.inet.raw.maxdgrom=65536
net.inet.raw.recvspace=65536
-------------------------------
pf.conf
wan_ip="192.168.0.1"
lan_ip="192.168.1.2"
wan_if="fxp0"
lan_if="fxp1"
scrub in all
block in from any to any
block out from any to any
nat on fxp0 from fxp1:network to any ->fxp0
rdr on fxp1 proto tcp from any to any port 21 ->127.0.0.1 prot 8021
block in quick proto icmp from any to $wan_if
block in quick proto {tcp,udp} from any to any port
{135><139,445,554,593,1024><1030,1068,1080,1214,1363,1364,1368,1373,1433,1434,2000,2283,2535,2745,3120<>3130,3140,4444,5554,6880<>6899,8880<>8899,9898,10000,10080,12345,17300,27347,65506}
pass in fo $wan_if proto tcp from 192.168.1.176 to 192.168.1.200 port 22 keep state
pass out on $wan_if protot tcp from any to any flags S/SA modulate state
pass ort on $wan_if proto {udp,icmp}from any to any keep state
--------------------------------------------------------------------
inter100M fxp
inter1000m em
paauxw |grep inetd killall inetd
echo"inetd_enable="\"YES"\" >> /etc/rc.conf
pw adduser username -d /home/dir -s /sbin/sh
pw adduser username -d /home/dir -s /bin/sh
edquota -u -p windgao wordgao
repquota使用情况
--------------------
pf.conf
wan_ip=202.104.106.45 外网Ip
lan_ip="192.168.1.0/24"内网IP
wan_if=fxp0
lan_if=fxp1
web_if=192.168.0.200 web server
ifconfig_fxpo="inet 192.168.1.4 netmask 255.255.255.0"
ifconfig_fxp1="inet 192.168.1.5 netmask 255.255.255.0"
ifconfig_rlo="inet 192.168.1.6 netmask 255.255.255.0"
rdr on fxp0 from fxp1:network to any ->fxp0
rdf on fxp1 proto tcp from any to any port 21 -> 127.0.0.1 prot 8021
options smp
什么意思!?能解释下吗? |
|