#!/bin/sh /sbin/ipfw -f flush # 刪除所有的 rules # /sbin/ipfw pipe 1 config bw 32Kbytes/s # 設定頻寬 rules /sbin/ipfw pipe 2 config bw 512Kbytes/s # /sbin/ipfw add 2000 pipe 1 ip from 88.88.88.0/24 to any # 限制某個ip的頻寬 /sbin/ipfw add 2001 pipe 2 ip from any to 88.88.88.0/24 # /sbin/ipfw deny 3000 ip from 192.168.1.100 to any MAC any 00:50:ba:04:58:e9 # 限制某個 Mac Address # /sbin/ipfw add 65000 allow ip from any to any # 讓所有 ip 通訊協定通行 any to any