Freesco, NND, CDN, EOS
http://forum.freesco.pl/

squid markowanie i niceshaper0.6rc02
http://forum.freesco.pl/viewtopic.php?f=24&t=14372
Strona 1 z 1

Autor:  geberit [ czwartek, 21 grudnia 2006, 23:14 ]
Tytuł:  squid markowanie i niceshaper0.6rc02

witam mam proklem po wprowadzeniu markowania :
: [/] [] ()
#!/bin/bash

i="/usr/sbin/iptables"

#markowanie

$i -t mangle -A PREROUTING -j CONNMARK --restore-mark

#ping
$i -t mangle -A PREROUTING -p icmp -j MARK --set-mark 0x800
#DNS
$i -t mangle -A PREROUTING -p udp --dport 53 -j MARK --set-mark 0x900
#SSH
$i -t mangle -A PREROUTING -p tcp --dport 22 -j MARK --set-mark 0x700
#p2p
$i -t mangle -A PREROUTING -m ipp2p --ipp2p -j MARK --set-mark 0x999
#SQUID
$i -t mangle -A PREROUTING -m string --string 'X-Cache: HIT ' -j MARK --set-mark 0x8888

$i -t mangle -A PREROUTING -j CONNMARK --save-mark


oraz dopisaniu sobie odpowiednich class w pliku class

: [/] [] ()
class download eth1 ping
    match mark 0x800 dstip 192.168.111.0/24
    do-not-shape
class upload eth0 ping
    match mark 0x800 srcip 192.168.111.0/24
    do-not-shape

class download eth1 p2p
    match mark 0x999 dstip 192.168.111.0/24
    do-not-shape
class upload eth0 p2p
    match mark 0x999 srcip 192.168.111.0/24
    do-not-shape

class download eth1 dns
    match mark 0x900 dstip 192.168.111.0/24
    do-not-shape
class upload eth0 dns
    match mark 0x900 srcip 192.168.111.0/24
    do-not-shape

class download eth1 ssh
    match mark 0x700 dstip 192.168.111.0/24
    do-not-shape
class upload eth0 ssh
    match mark 0x700 srcip 192.168.111.0/24
    do-not-shape

class download eth1 squid
    match mark 0x8888 dstip 192.168.111.0/24
    do-not-shape


squid pracuje jako transparentny
po wydaniu komendy /etc/rc.d/niceshaper0.6 stats nie wyswietla mi tych o to class czyli tak jakby nie chodzilo
jak to moznaj jeszcze sprawdzic albo co skopalem

dzieki wszystkom za pomoc jetescie wielcy :oops:

Autor:  -MW- [ piątek, 22 grudnia 2006, 03:00 ]
Tytuł: 

Cytuj:
SQUID
$i -t mangle -A PREROUTING -m string --string 'X-Cache: HIT ' -j MARK --set-mark 0x8888

: [/] [] ()
class download eth1 squid
    match mark 0x8888 dstip 192.168.111.0/24
    do-not-shape


nie zaglebiajac sie w szeczoly nice - bo juz go nie lubie.
nie ten lancuch i nie w ten sposob :)

Strona 1 z 1 Strefa czasowa UTC+2godz.
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/