controlling the bandwidth using tc
- by Supratik
Hi
I have two NIC etho is connected to the internet and eth1 is connected to the LAN.
I want to restrict the download limit using iptables and linux tc.
So I wrote a test script to verify if it is working.
My iptables configuration is as below.
iptables -t mangle -N INBOUND
iptables -t mangle -I PREROUTING -i eth0 -j INBOUND
iptables -t mangle -A INBOUND -j MARK --set-mark 60
My ingress configuration is as below.
tc qdisc add dev eth0 handle 1: ingress
tc filter add dev eth0 parent 1: protocol ip prio 1 handle 60 fw police rate 100kbit burst 20kbit drop flowid :1
Can you please tell me what I am missing here ?