Не могу понять, почему трафик уходит в класс по дефолту и не попадает в нужные таблицы? Подскажите возможные ошибки.
#!/bin/bash
#wan-eth0
#lan-eth1
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -F
iptables -F -t nat
iptables -F -t mangle
iptables -X
iptables -t nat -X
iptables -t mangle -X
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -d 127.0.0.0/8 -j REJECT --reject-with icmp-port-unreachable
iptables -A INPUT -s 10.0.0.0/24 -p tcp -m tcp --dport 22 -j ACCEPT
iptables -A INPUT -s 192.168.0.0/16 -p tcp -m tcp --dport 22 -j ACCEPT
iptables -A INPUT -i eth1 -j ACCEPT
iptables -A OUTPUT -o eth1 -j ACCEPT
iptables -A FORWARD -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
iptables -A FORWARD -s 192.168.100.0/24 -d 10.0.0.2 -p udp -m udp --dport 53 -j ACCEPT
iptables -A FORWARD -d 192.168.0.0/16 -j ACCEPT
iptables -t nat -A POSTROUTING -s 192.168.100.0/24 -j SNAT --to-source 10.0.0.1
tc qdisc del dev eth1 root handle 1: htb default 113
tc qdisc del dev eth0 root handle 1: htb default 113
tc qdisc add dev eth1 root handle 1: htb default 113
tc qdisc add dev eth0 root handle 1: htb default 113
tc class add dev eth1 parent 1: classid 1:1 htb rate 100Mbit ceil 100Mbit
tc class add dev eth0 parent 1: classid 1:1 htb rate 100Mbit ceil 100Mbit
tc class add dev eth1 parent 1:1 classid 1:10 htb rate 50Mbit ceil 90Mbit
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 50Mbit ceil 90Mbit
tc class add dev eth1 parent 1:1 classid 1:11 htb rate 30Mbit ceil 50Mbit
tc class add dev eth0 parent 1:1 classid 1:11 htb rate 30Mbit ceil 50Mbit
tc class add dev eth1 parent 1:1 classid 1:12 htb rate 20Mbit ceil 40Mbit
tc class add dev eth0 parent 1:1 classid 1:12 htb rate 20Mbit ceil 40Mbit
tc class add dev eth1 parent 1:1 classid 1:13 htb rate 15Mbit ceil 20Mbit
tc class add dev eth0 parent 1:1 classid 1:13 htb rate 15Mbit ceil 20Mbit
tc class add dev eth1 parent 1:10 classid 1:110 htb rate 10Mbit ceil 50Mbit prio 1
tc class add dev eth0 parent 1:10 classid 1:110 htb rate 10Mbit ceil 50Mbit prio 1
tc class add dev eth1 parent 1:11 classid 1:111 htb rate 3Mbit ceil 30Mbit prio 2
tc class add dev eth0 parent 1:11 classid 1:111 htb rate 3Mbit ceil 30Mbit prio 2
tc class add dev eth1 parent 1:12 classid 1:112 htb rate 2Mbit ceil 20Mbit prio 3
tc class add dev eth0 parent 1:12 classid 1:112 htb rate 2Mbit ceil 20Mbit prio 3
tc class add dev eth1 parent 1:13 classid 1:113 htb rate 1Mbit ceil 15Mbit prio 4
tc class add dev eth0 parent 1:13 classid 1:113 htb rate 1Mbit ceil 15Mbit prio 4
tc qdisc add dev eth1 parent 1:110 handle 110: sfq perturb 10
tc qdisc add dev eth0 parent 1:110 handle 110: sfq perturb 10
tc qdisc add dev eth1 parent 1:111 handle 111: sfq perturb 10
tc qdisc add dev eth0 parent 1:111 handle 111: sfq perturb 10
tc qdisc add dev eth1 parent 1:112 handle 112: sfq perturb 10
tc qdisc add dev eth0 parent 1:112 handle 112: sfq perturb 10
tc qdisc add dev eth1 parent 1:113 handle 113: sfq perturb 10
tc qdisc add dev eth0 parent 1:113 handle 113: sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip u32
tc filter add dev eth0 parent 1:0 protocol ip u32
tc filter add dev eth1 parent 1:0 handle 10: protocol ip u32 divisor 256
tc filter add dev eth0 parent 1:0 handle 10: protocol ip u32 divisor 256
tc filter add dev eth1 parent 1:0 handle 11: protocol ip u32 divisor 256
tc filter add dev eth1 parent 1:0 handle 12: protocol ip u32 divisor 256
tc filter add dev eth1 parent 1:0 handle 13: protocol ip u32 divisor 256
tc filter add dev eth0 parent 1:0 handle 11: protocol ip u32 divisor 256
tc filter add dev eth0 parent 1:0 handle 12: protocol ip u32 divisor 256
tc filter add dev eth0 parent 1:0 handle 13: protocol ip u32 divisor 256
tc filter add dev eth0 parent 1:0 protocol ip u32 ht 800:: match ip src 0.0.0.0/0 hashkey mask 0xff000000 at 12 link 10:
tc filter add dev eth1 parent 1:0 protocol ip u32 ht 800:: match ip dst 0.0.0.0/0 hashkey mask 0xff000000 at 16 link 10:
tc filter add dev eth0 parent 1:0 protocol ip u32 ht 10:c0: match ip src 192.0.0.0/8 hashkey mask 0xff0000 at 12 link 11:
tc filter add dev eth1 parent 1:0 protocol ip u32 ht 10:c0: match ip dst 192.0.0.0/8 hashkey mask 0xff0000 at 16 link 11:
tc filter add dev eth0 parent 1:0 protocol ip u32 ht 11:a8: match ip src 192.168.0.0/16 hashkey mask 0xff00 at 12 link 12:
tc filter add dev eth1 parent 1:0 protocol ip u32 ht 11:a8: match ip dst 192.168.0.0/16 hashkey mask 0xff00 at 16 link 12:
tc filter add dev eth0 parent 1:0 protocol ip u32 ht 12:64: match ip src 192.168.100.0/24 hashkey mask 0xff at 12 link 13:
tc filter add dev eth1 parent 1:0 protocol ip u32 ht 12:64: match ip dst 192.168.100.0/24 hashkey mask 0xff at 16 link 13:
tc filter add dev eth0 parent 1:0 protocol ip prio 2 u32 ht 13:2: match ip src 192.168.100.2/32 flowid 1:111
tc filter add dev eth1 parent 1:0 protocol ip prio 2 u32 ht 13:2: match ip dst 192.168.100.2/32 flowid 1:111
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 ht 13:3: match ip src 192.168.100.3/32 flowid 1:110
tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 ht 13:3: match ip dst 192.168.100.3/32 flowid 1:110
tc filter add dev eth0 parent 1:0 protocol ip prio 3 u32 ht 13:4: match ip src 192.168.100.4/32 flowid 1:112
tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 ht 13:4: match ip dst 192.168.100.4/32 flowid 1:112