User Tools

Site Tools


fair_traffic_shaping_an_adsl_line_for_a_local_network_using_linux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
fair_traffic_shaping_an_adsl_line_for_a_local_network_using_linux [2018/12/06 21:55]
abeverley
fair_traffic_shaping_an_adsl_line_for_a_local_network_using_linux [2018/12/06 21:55]
abeverley
Line 49: Line 49:
 Next we need to mark traffic as required, using the principles set out earlier. The following code contains some examples. Next we need to mark traffic as required, using the principles set out earlier. The following code contains some examples.
  
 +<​code>​
  ​ #​ Set default mark for forwarded packets  ​ #​ Set default mark for forwarded packets
  ​ $IPTABLES -t mangle -A FORWARD -j MARK --set-mark 40  ​ $IPTABLES -t mangle -A FORWARD -j MARK --set-mark 40
Line 77: Line 78:
  ​ #​ packets in their own class:​  ​ #​ packets in their own class:​
  ​ $IPTABLES -t mangle -A FORWARD -o ppp0 -p tcp -m tcp --tcp-flags FIN,​SYN,​RST,​ACK ACK -m length --length :​64 -j MARK --set-mark 20  ​ $IPTABLES -t mangle -A FORWARD -o ppp0 -p tcp -m tcp --tcp-flags FIN,​SYN,​RST,​ACK ACK -m length --length :​64 -j MARK --set-mark 20
 +</​code>​
  
 Now we need to look out for all those P2P connections. We're going to find these out by looking for a client on the network making lots of connections to high port numbers, which is generally what P2P software does. This isn't foolproof of course: I have seen P2P software start to use port 80, and there could be false negatives, but on the whole it seems to work better than any other solutions out there that I have tried. Now we need to look out for all those P2P connections. We're going to find these out by looking for a client on the network making lots of connections to high port numbers, which is generally what P2P software does. This isn't foolproof of course: I have seen P2P software start to use port 80, and there could be false negatives, but on the whole it seems to work better than any other solutions out there that I have tried.
fair_traffic_shaping_an_adsl_line_for_a_local_network_using_linux.txt · Last modified: 2018/12/06 22:02 by abeverley