- 论坛徽章:
- 0
|
这个规则适合:web+SSH+ftp+sendmail 的用户
######## TCP ##################
ipfw add 0005 deny tcp from any to any in tcpflags syn,fin
######### www ssh ftp ##########
ipfw add 10002 allow tcp from any to me 80 in
ipfw add 10003 allow tcp from any to me 22 in
ipfw add 10004 allow tcp from any to me 21 in
ipfw add 10005 allow tcp from any to me 20 in
ipfw add 10006 allow tcp from any to me 25 in
################################
ipfw add 19008 allow tcp from me to any out setup keep-state
ipfw add 19009 allow all from me to any out
ipfw add 20000 allow udp from any 53 to me #dns for ping wwwsohu.com
######### ICMP #################
ipfw add 30000 allow icmp from any to any icmptypes 3
ipfw add 30001 allow icmp from any to any icmptypes 4
ipfw add 30002 allow icmp from any to any icmptypes 8 out
ipfw add 30003 allow icmp from any to any icmptypes 0 in |
|