#!/bin/sh
tc filter add dev eth2 protocol ip parent 1: prio 1 handle 1 fw classid 1:11
tc filter add dev eth2 protocol ip parent 1: prio 2 handle 2 fw classid 1:12
#!/bin/sh
tc filter add dev eth2 protocol ip parent 1: prio 1 u32 match ip sport 80 0xffff flowid 1:11
tc filter add dev eth2 protocol ip parent 1: prio 2 u32 match ip sport 22 0xffff flowid 1:12
#以上u32脚本
#!/bin/sh
/usr/sbin/iptables -t mangle -A PREROUTING -p tcp --sport 80 -j MARK --set-mark 1
/usr/sbin/iptables -t mangle -A PREROUTING -p tcp --sport 80 -j RETURN
/usr/sbin/iptables -t mangle -A PREROUTING -p tcp --sport 22 -j MARK --set-mark 2
/usr/sbin/iptables -t mangle -A PREROUTING -p tcp --sport 22 -j RETURN
#以上fwmark脚本