Shaping with shorewall complex shaper not work (or I don't understand principle of operation)

Posted by strangeman on Server Fault See other posts from Server Fault or by strangeman
Published on 2013-06-27T23:05:11Z Indexed on 2013/07/01 23:07 UTC
Read the original article Hit count: 170

Filed under:
|

I have router (Debian 6) with 2 network interfaces (and 1 virtual tun interface):

  • eth0 - localnet, 192.168.1.0/24, router ip is 192.168.1.1
  • eth1 - internet
  • tun0 - openvpn to central office. openvpn network - 10.1.0.0/24, central office network - 192.168.0.0/24

I need shape all traffic, which moves 192.168.1.0/24->192.168.0.1:6666 and 192.168.1.0/24<-192.168.0.1:6666, and restrict its speed to 200kbit.

Now, I have this configuration, but its not work:

tcdevices (set up interface parameters)

#INTERFACE      IN-BANDWITH     OUT-BANDWIDTH
eth0            100mbit        100mbit
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE

tcrules (mark all traffic, which move on 6666 port)

#MARK SOURCE    DEST        PROTO PORT(S)
1     0.0.0.0/0 0.0.0.0/0   tcp   6666
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE

tcclasses (shape all marked traffic)

#INTERFACE      MARK    RATE    CEIL    PRIORITY        OPTIONS
eth0            1       200kbit 200kbit     2
eth0            255     9*full/10  full    1               default
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE

Where is my mistake?

© Server Fault or respective owner

Related posts about traffic-shaping

Related posts about shorewall