Freesco, NND, CDN, EOS http://forum.freesco.pl/ |
|
Jak skonfigurować HTB (zciecha) http://forum.freesco.pl/viewtopic.php?f=22&t=5305 |
Strona 1 z 1 |
Autor: | prezesk [ piątek, 3 września 2004, 10:57 ] |
Tytuł: | Jak skonfigurować HTB (zciecha) |
Witam, Męcze się z tym HTB i nimoge wszytkiego pojąć. mam firewall Zciecha. Ściągnołem konfigurator Zciecha. i uruchomiłem go i niedziała tak jakbym chciał każdy ma dostęp do pełnego łącza (czyli jakby niedziałoło to HTB) podspodem daje muj plik rc.htb nieweim czy jeszcze gdzies należy wykonać jakies zmieny. Proszę o pomoc. P.S. czytałem juz posty i niemoge znaleść u siebie błędu. P.S.2 Chciałemn abym mógł bałwan jestem zę ktoś ma dostęp 128 a ktos 256. I mam jeszcze server samby(czy to blokuje dostęp do niego tzn spowalnia??) #!/bin/bash # rc.htb 0.3.3-stable-0.2-Zciech-19.08.2004, (C)PriSM 2oo3, GNU GPL # <http://www.rc.htb.prv.pl/> # wygenerowano: 09/02/04 17:07:54 # 0.2 Poprawki Zciech VER=0.3.3-stable-0.2-Zciech-19.08.2004 stop() { /usr/sbin/rchtb_tc qdisc del root dev eth0 2> /dev/null /usr/sbin/rchtb_tc qdisc del root dev eth1 2> /dev/null } start() { stop # dla bezpieczeństwa # INTERFEJS ETH1 (ruch przychodzący) /usr/sbin/rchtb_tc qdisc add dev eth1 root handle 1:0 htb default 3 r2q 1 # Główna klasa dla eth1 /usr/sbin/rchtb_tc class add dev eth1 parent 1:0 classid 1:1 htb rate 90000kbit ceil 90000kbit # Podział na pasmo dla łącza internetowego i resztę /usr/sbin/rchtb_tc class add dev eth1 parent 1:1 classid 1:2 htb rate 506kbit ceil 506kbit /usr/sbin/rchtb_tc class add dev eth1 parent 1:1 classid 1:3 htb rate 89494kbit ceil 89494kbit prio 9 /usr/sbin/rchtb_tc qdisc add dev eth1 parent 1:3 esfq perturb 10 hash dst # pasmo priorytetowe dla ICMP, TOS 0x10 (min. delay) oraz wybranego portu 22 /usr/sbin/rchtb_tc class add dev eth1 parent 1:2 classid 1:20 htb rate 72kbit ceil 72kbit prio 1 quantum 1500 /usr/sbin/rchtb_tc qdisc add dev eth1 parent 1:20 esfq perturb 10 hash dst /usr/sbin/rchtb_tc filter add dev eth1 protocol ip prio 3 parent 1:0 u32 match ip sport 22 0xffff flowid 1:20 /usr/sbin/rchtb_tc filter add dev eth1 protocol ip prio 2 parent 1:0 u32 match ip tos 0x10 0xff flowid 1:20 /usr/sbin/rchtb_tc filter add dev eth1 protocol ip prio 2 parent 1:0 u32 match ip protocol 1 0xff flowid 1:20 # Kama /usr/sbin/rchtb_tc class add dev eth1 parent 1:2 classid 1:21 htb rate 72kbit ceil 506kbit prio 2 quantum 1500 /usr/sbin/rchtb_tc qdisc add dev eth1 parent 1:21 esfq perturb 10 hash dst /usr/sbin/rchtb_tc filter add dev eth1 protocol ip prio 5 parent 1:0 u32 match ip dst 192.168.1.3 flowid 1:21 # Kiju /usr/sbin/rchtb_tc class add dev eth1 parent 1:2 classid 1:22 htb rate 72kbit ceil 506kbit prio 2 quantum 1500 /usr/sbin/rchtb_tc qdisc add dev eth1 parent 1:22 esfq perturb 10 hash dst /usr/sbin/rchtb_tc filter add dev eth1 protocol ip prio 5 parent 1:0 u32 match ip dst 192.168.1.2 flowid 1:22 # Komputer_5 /usr/sbin/rchtb_tc class add dev eth1 parent 1:2 classid 1:23 htb rate 72kbit ceil 506kbit prio 2 quantum 1500 /usr/sbin/rchtb_tc qdisc add dev eth1 parent 1:23 esfq perturb 10 hash dst /usr/sbin/rchtb_tc filter add dev eth1 protocol ip prio 5 parent 1:0 u32 match ip dst 192.168.1.5 flowid 1:23 # Komputer_6 /usr/sbin/rchtb_tc class add dev eth1 parent 1:2 classid 1:24 htb rate 72kbit ceil 506kbit prio 2 quantum 1500 /usr/sbin/rchtb_tc qdisc add dev eth1 parent 1:24 esfq perturb 10 hash dst /usr/sbin/rchtb_tc filter add dev eth1 protocol ip prio 5 parent 1:0 u32 match ip dst 192.168.1.6 flowid 1:24 # Komputer_7 /usr/sbin/rchtb_tc class add dev eth1 parent 1:2 classid 1:25 htb rate 72kbit ceil 506kbit prio 2 quantum 1500 /usr/sbin/rchtb_tc qdisc add dev eth1 parent 1:25 esfq perturb 10 hash dst /usr/sbin/rchtb_tc filter add dev eth1 protocol ip prio 5 parent 1:0 u32 match ip dst 192.168.1.7 flowid 1:25 # Robert /usr/sbin/rchtb_tc class add dev eth1 parent 1:2 classid 1:26 htb rate 72kbit ceil 506kbit prio 2 quantum 1500 /usr/sbin/rchtb_tc qdisc add dev eth1 parent 1:26 esfq perturb 10 hash dst /usr/sbin/rchtb_tc filter add dev eth1 protocol ip prio 5 parent 1:0 u32 match ip dst 192.168.1.4 flowid 1:26 # transfer serwer->LAN /usr/sbin/rchtb_tc filter add dev eth1 protocol ip prio 1 parent 1:0 handle 1 fw flowid 1:3 # INTERFEJS ETH0 (ruch wychodzący) /usr/sbin/rchtb_tc qdisc add dev eth0 root handle 2:0 htb default 11 r2q 1 # główna klasa /usr/sbin/rchtb_tc class add dev eth0 parent 2:0 classid 2:1 htb rate 115kbit ceil 115kbit # klasa priorytetowa ACK /usr/sbin/rchtb_tc class add dev eth0 parent 2:1 classid 2:10 htb rate 25kbit ceil 25kbit prio 1 quantum 1500 /usr/sbin/rchtb_tc qdisc add dev eth0 parent 2:10 esfq perturb 10 hash dst /usr/sbin/rchtb_tc filter add dev eth0 parent 2:0 protocol ip prio 2 u32 match ip protocol 6 0xff \ match u8 0x05 0x0f at 0 match u16 0x0000 0xffc0 at 1 match u8 0x10 0xff at 33 flowid 2:10 # ACK # klasa priorytetowa TOS 0x10 oraz ICMP /usr/sbin/rchtb_tc class add dev eth0 parent 2:1 classid 2:9 htb rate 6kbit ceil 84kbit prio 2 quantum 1500 /usr/sbin/rchtb_tc qdisc add dev eth0 parent 2:9 esfq perturb 10 hash dst /usr/sbin/rchtb_tc filter add dev eth0 parent 2:0 protocol ip prio 1 u32 match ip tos 0x10 0xff flowid 2:9 # TOS 0x10 /usr/sbin/rchtb_tc filter add dev eth0 parent 2:0 protocol ip prio 2 u32 match ip dport 22 0xffff flowid 2:9 # port 22 /usr/sbin/rchtb_tc filter add dev eth0 parent 2:0 protocol ip prio 1 u32 match ip protocol 1 0xff flowid 2:9 # ICMP # ruch serwerowy (pasmo dla gości z zewnątrz) /usr/sbin/rchtb_tc class add dev eth0 parent 2:1 classid 2:11 htb rate 3kbit ceil 84kbit prio 2 quantum 1500 /usr/sbin/rchtb_tc qdisc add dev eth0 parent 2:11 esfq perturb 10 hash dst /usr/sbin/rchtb_tc filter add dev eth0 parent 2:0 protocol ip prio 3 handle 1 fw flowid 2:11 # Kama /usr/sbin/rchtb_tc class add dev eth0 parent 2:1 classid 2:12 htb rate 13kbit ceil 84kbit prio 2 quantum 1500 /usr/sbin/rchtb_tc qdisc add dev eth0 parent 2:12 esfq perturb 10 hash dst /usr/sbin/rchtb_tc filter add dev eth0 parent 2:0 protocol ip prio 5 handle 2 fw flowid 2:12 # Kiju /usr/sbin/rchtb_tc class add dev eth0 parent 2:1 classid 2:13 htb rate 13kbit ceil 84kbit prio 2 quantum 1500 /usr/sbin/rchtb_tc qdisc add dev eth0 parent 2:13 esfq perturb 10 hash dst /usr/sbin/rchtb_tc filter add dev eth0 parent 2:0 protocol ip prio 5 handle 3 fw flowid 2:13 # Komputer_5 /usr/sbin/rchtb_tc class add dev eth0 parent 2:1 classid 2:14 htb rate 13kbit ceil 84kbit prio 2 quantum 1500 /usr/sbin/rchtb_tc qdisc add dev eth0 parent 2:14 esfq perturb 10 hash dst /usr/sbin/rchtb_tc filter add dev eth0 parent 2:0 protocol ip prio 5 handle 4 fw flowid 2:14 # Komputer_6 /usr/sbin/rchtb_tc class add dev eth0 parent 2:1 classid 2:15 htb rate 13kbit ceil 84kbit prio 2 quantum 1500 /usr/sbin/rchtb_tc qdisc add dev eth0 parent 2:15 esfq perturb 10 hash dst /usr/sbin/rchtb_tc filter add dev eth0 parent 2:0 protocol ip prio 5 handle 5 fw flowid 2:15 # Komputer_7 /usr/sbin/rchtb_tc class add dev eth0 parent 2:1 classid 2:16 htb rate 13kbit ceil 84kbit prio 2 quantum 1500 /usr/sbin/rchtb_tc qdisc add dev eth0 parent 2:16 esfq perturb 10 hash dst /usr/sbin/rchtb_tc filter add dev eth0 parent 2:0 protocol ip prio 5 handle 6 fw flowid 2:16 # Robert /usr/sbin/rchtb_tc class add dev eth0 parent 2:1 classid 2:17 htb rate 13kbit ceil 84kbit prio 2 quantum 1500 /usr/sbin/rchtb_tc qdisc add dev eth0 parent 2:17 esfq perturb 10 hash dst /usr/sbin/rchtb_tc filter add dev eth0 parent 2:0 protocol ip prio 5 handle 7 fw flowid 2:17 /usr/sbin/rchtb_tc filter add dev eth0 parent 2:0 protocol ip prio 9 u32 match ip dst 0/0 flowid 2:11 } echo "rc.htb 0.3.3-stable-0.2-Zciech-19.08.2004, (C)PriSM 2oo3. Na licencji GNU GPL." echo "Strona projektu: http://www.rc.htb.prv.pl/" case "$1" in 'start') echo -n "Uruchamianie kolejkowania..." start echo " wykonano." ;; 'stop') echo -n "Zatrzymywanie kolejkowania..." stop echo " wykonano." ;; 'restart') echo -n "Restartowanie kolejkowania: stop" stop echo -n " start" start echo " wykonano." ;; 'status') echo "Klasy na interfejsie eth1" echo "================================" tc class show dev eth1 | grep root tc class show dev eth1 | grep -v root | sort | nl echo "Klasy na interfejsie eth0" echo "===================================" tc class show dev eth0 | grep root tc class show dev eth0 | grep -v root | sort | nl ;; *) echo -e "\nUżycie: rc.htb start|stop|restart|status" ;; esac |
Autor: | jarekjarek [ piątek, 3 września 2004, 11:15 ] |
Tytuł: | |
widze ze masz stare htb juz jest nowsze a poza tym jednoczesnie kazdy ma dostęp do pełnego jezeli bałwan jestem sam jezeli nikt nic procz niego nie sciąga jak zacznie ssac 2 to podzieli nowe htb http://reliserv.homelinux.org/nnd/ zmien pliki rc.htb i pobiez rchtb.configure a dodałeś rc.htb do plików startowych ? |
Autor: | prezesk [ piątek, 3 września 2004, 11:34 ] |
Tytuł: | |
Tzn uruchomiłem usługe. do plików startowych?? (niejestem pewnie o co chodzi czy o rc.local jeżeli tak to jeszcze nie ale nierobiłem restatu servera) Jeżeli to coś innego to porszę o inforamcje o co chodzi. |
Autor: | jarekjarek [ piątek, 3 września 2004, 11:43 ] |
Tytuł: | |
ja ten nowy htb mam w rc.router #start htb if [ -x /etc/rc.d/rc.htb ]; then . /etc/rc.d/rc.htb fi a restart htb "/usr/src/rchtb/ready/rc.htb restart >/var/www/zzz" status "/usr/src/rchtb/ready/rc.htb status >/var/www/zzs" i podaj mi IP zobacze albo daj GG moze pomoge |
Strona 1 z 1 | Strefa czasowa UTC+2godz. |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |