On Mon, 21 Jun 2004 11:19:02 +0200, Goblin wrote
na dzien dzisiejszy pelen zestaw regolek per host wyglada np. tak: /sbin/tc class add dev eth1 parent 1:3 classid 1:1310 htb rate 1kbit ceil 768kbit burst 2k /sbin/tc qdisc add dev eth1 parent 1:1310 handle 1310: sfq perturb 10 /sbin/tc filter add dev eth1 protocol ip parent 1:0 prio 4 u32 match ip sport 80 0xffff match ip dst 192.168.5.20 flowid 1:131 /sbin/tc filter add dev eth1 protocol ip parent 1:0 prio 4 u32 match ip sport 20 0xffff match ip dst 192.168.5.20 flowid 1:131 /sbin/tc filter add dev eth1 protocol ip parent 1:0 prio 4 u32 match ip sport 21 0xffff match ip dst 192.168.5.20 flowid 1:131 /sbin/tc filter add dev eth1 protocol ip parent 1:0 prio 4 u32 match ip sport 53 0xffff match ip dst 192.168.5.20 flowid 1:131 /sbin/tc class add dev eth1 parent 1:4 classid 1:2310 htb rate 1kbit ceil 256kbit burst 2k /sbin/tc qdisc add dev eth1 parent 1:2310 handle 2310: sfq perturb 10 /sbin/tc filter add dev eth1 protocol ip parent 1:0 prio 4 u32 match ip dst 192.168.5.20 flowid 1:2310 /sbin/tc class add dev eth0 parent 1:4 classid 1:2310 htb rate 1kbit ceil 128kbit burst 2k /sbin/tc qdisc add dev eth0 parent 1:2310 handle 2310: sfq perturb 10 /sbin/tc filter add dev eth0 protocol ip parent 1:0 prio 4 handle 2310 fw flowid 1:2310 /usr/sbin/iptables -t mangle -A PREROUTING -i eth1 -s 192.168.5.20/32 -j MARK --set-mark 2310 /sbin/tc class add dev eth0 parent 1:3 classid 1:1310 htb rate 1kbit ceil 256kbit burst 2k /sbin/tc qdisc add dev eth0 parent 1:1310 handle 1310: sfq perturb 10 /sbin/tc filter add dev eth0 protocol ip parent 1:0 prio 4 handle 1310 fw flowid 1:1310 /usr/sbin/iptables -t mangle -A PREROUTING -i eth1 -p tcp -s 192.168.5.20/32 --dport 80 -j MARK --set-mark 1310 /usr/sbin/iptables -t mangle -A PREROUTING -i eth1 -p tcp -s 192.168.5.20/32 --dport 20:22 -j MARK --set-mark 1310 /usr/sbin/iptables -t filter -A FORWARD -s 192.168.5.20 -j ACCEPT /usr/sbin/iptables -t filter -A FORWARD -d 192.168.5.20 -j ACCEPT /usr/sbin/iptables -t nat -A POSTROUTING -s 192.168.5.20 -j MASQUERADE
Nic dziwnego, że potrzebujesz dual-athlon :)
Goblin
Pozdrawiam Tomasz Chiliński