<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Linux Forum &mdash; Htb неправильно шейпит]]></title>
		<link>https://linuxforum.ru/viewtopic.php?id=10352</link>
		<atom:link href="https://linuxforum.ru/extern.php?action=feed&amp;tid=10352&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Htb неправильно шейпит».]]></description>
		<lastBuildDate>Sat, 29 Jan 2011 17:42:58 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Htb неправильно шейпит]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=138352#p138352</link>
			<description><![CDATA[<p>Ну на счёт вирусов это конечно вам надо логи смотреть а чтоб их смотреть надо iptables + log делать. Для человеческого логирования rotate настраивать.<br />Инет это ток 80 и 53 порт я думаю так же почту надо.</p>]]></description>
			<author><![CDATA[null@example.com (Kettler)]]></author>
			<pubDate>Sat, 29 Jan 2011 17:42:58 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=138352#p138352</guid>
		</item>
		<item>
			<title><![CDATA[Re: Htb неправильно шейпит]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=138319#p138319</link>
			<description><![CDATA[<p>также из нутри сети чтобы вирусы сервер не забивали</p>]]></description>
			<author><![CDATA[null@example.com (astalavista)]]></author>
			<pubDate>Sat, 29 Jan 2011 16:15:15 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=138319#p138319</guid>
		</item>
		<item>
			<title><![CDATA[Re: Htb неправильно шейпит]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=138317#p138317</link>
			<description><![CDATA[<p>Все только через nat ходят ,&nbsp; для внутренней ничего не надо, только интернет.</p>]]></description>
			<author><![CDATA[null@example.com (astalavista)]]></author>
			<pubDate>Sat, 29 Jan 2011 16:09:49 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=138317#p138317</guid>
		</item>
		<item>
			<title><![CDATA[Re: Htb неправильно шейпит]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=138308#p138308</link>
			<description><![CDATA[<p>Скажи какие порты надо открыть обычным пользователям кто за nat? и какие порты нужны самому серверу.</p>]]></description>
			<author><![CDATA[null@example.com (Kettler)]]></author>
			<pubDate>Sat, 29 Jan 2011 15:46:57 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=138308#p138308</guid>
		</item>
		<item>
			<title><![CDATA[Re: Htb неправильно шейпит]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=138298#p138298</link>
			<description><![CDATA[<p>При загрузке делается это,&nbsp; +последние три правила для каждого клиента.<br /></p><div class="codebox"><pre><code>#!/bin/bash
iptables -F -t nat
iptables -F -t mangle
iptables -A POSTROUTING -t nat -s 192.168.1.2 -j SNAT --to-source 10.1.1.1
iptables -t mangle -A PREROUTING -s 192.168.1.2 -j MARK --set-mark 102
iptables -t mangle -A PREROUTING -s 192.168.1.2 -j RETURN
...</code></pre></div><p>при iptables -S выдает - можно всё<br /></p><div class="codebox"><pre><code>-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (astalavista)]]></author>
			<pubDate>Sat, 29 Jan 2011 15:22:04 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=138298#p138298</guid>
		</item>
		<item>
			<title><![CDATA[Re: Htb неправильно шейпит]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=138291#p138291</link>
			<description><![CDATA[<p>Покажи свой скрипт потом глянем.</p>]]></description>
			<author><![CDATA[null@example.com (Kettler)]]></author>
			<pubDate>Sat, 29 Jan 2011 15:09:17 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=138291#p138291</guid>
		</item>
		<item>
			<title><![CDATA[Re: Htb неправильно шейпит]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=138278#p138278</link>
			<description><![CDATA[<p>Подскажите пожалуйста какие правила еще нужно добавить в iptables, чтобы не они не мешали тому что есть и отсекали то что не нужно. Т.е. вирусы с локалки чтобы не забивали канал и не было лишней нагрузки на сервер из-за левых запросов.</p>]]></description>
			<author><![CDATA[null@example.com (astalavista)]]></author>
			<pubDate>Sat, 29 Jan 2011 14:46:19 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=138278#p138278</guid>
		</item>
		<item>
			<title><![CDATA[Re: Htb неправильно шейпит]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=137220#p137220</link>
			<description><![CDATA[<p>а кто мешает ограничить по ип? заместо&nbsp; 172.16.0.32 подставляй своё ну классы само собой.</p><p>/sbin/tc class add dev $lan parent 1:2 classid 1:08 htb rate 2048Kbit ceil 2048Kbit burst 50Kb prio 1<br />/sbin/tc qdisc add dev $lan parent 1:08 handle 08 sfq perturb 10<br />/sbin/tc filter add dev $lan parent 1:0 protocol ip prio 100 u32 match ip dst 172.16.0.32 classid 1:08</p><p>P.S не хошь так посади их в отдельную подсеть.</p>]]></description>
			<author><![CDATA[null@example.com (Kettler)]]></author>
			<pubDate>Thu, 27 Jan 2011 08:41:14 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=137220#p137220</guid>
		</item>
		<item>
			<title><![CDATA[Re: Htb неправильно шейпит]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=137215#p137215</link>
			<description><![CDATA[<p>Спасибо Kettler. Помог, всё ОК!<br />Есть такой еще вопрос. А как можно ограничить на группу. К приеру три группы, в них ип в разнобой и потому маской не получиться поделить. Надо чтобы каждая группа состоящая из нескольких адресов имела свое ограничение. К примеру 2Mbit на группу.<br />Такое возможно селать?</p>]]></description>
			<author><![CDATA[null@example.com (astalavista)]]></author>
			<pubDate>Thu, 27 Jan 2011 08:33:58 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=137215#p137215</guid>
		</item>
		<item>
			<title><![CDATA[Re: Htb неправильно шейпит]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=136763#p136763</link>
			<description><![CDATA[<p>Я вам дал выше готовые примеры. На счёт маски 192.168.1.0/32 ток вашем скрипте вы гоняете по метке а также и по фильтру.</p>]]></description>
			<author><![CDATA[null@example.com (Kettler)]]></author>
			<pubDate>Wed, 26 Jan 2011 07:36:48 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=136763#p136763</guid>
		</item>
		<item>
			<title><![CDATA[Re: Htb неправильно шейпит]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=136753#p136753</link>
			<description><![CDATA[<p>Блин... маска 192.168.1.2/32 а не 22</p>]]></description>
			<author><![CDATA[null@example.com (astalavista)]]></author>
			<pubDate>Wed, 26 Jan 2011 07:30:52 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=136753#p136753</guid>
		</item>
		<item>
			<title><![CDATA[Re: Htb неправильно шейпит]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=136704#p136704</link>
			<description><![CDATA[<p>Ну пока ток исходящую режим.</p><p>#!/bin/sh<br />lan=vlan6<br />tc=`which tc`</p><p>/sbin/tc qdisc del dev $lan root<br />/sbin/tc qdisc add dev $lan root handle 1: htb default 10</p><p>/sbin/tc class add dev $lan parent 1: classid 1:10 htb rate 100Mbit ceil 100Mbit</p><p>#/sbin/tc class add dev $lan parent 1:2 classid 1:07 htb rate 1024Kbit ceil 1024Kbit burst 50Kb prio 1<br />#/sbin/tc qdisc add dev $lan parent 1:07 handle 07 sfq perturb 10<br />#/sbin/tc filter add dev $lan parent 1:0 protocol ip prio 100 u32 match ip dst 172.16.0.32 classid 1:07</p><p>/sbin/tc class add dev $lan parent 1:2 classid 1:08 htb rate 2048Kbit ceil 2048Kbit burst 50Kb prio 1<br />/sbin/tc qdisc add dev $lan parent 1:08 handle 08 sfq perturb 10<br />/sbin/tc filter add dev $lan parent 1:0 protocol ip prio 100 u32 match ip dst 172.16.0.32 classid 1:08</p><p>Проверенно и так и так. Исходящую резать по ип не знаю честно ток если общий канал резать.</p><p>tc qdisc add dev ${IFACE} handle ffff: ingress<br />tc filter add dev ${IFACE} parent ffff: protocol ip prio 50 u32 match ip src 0.0.0.0/0 police rate ${DOWNLINK} burst 12k drop flowid :1</p>]]></description>
			<author><![CDATA[null@example.com (Kettler)]]></author>
			<pubDate>Tue, 25 Jan 2011 22:11:13 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=136704#p136704</guid>
		</item>
		<item>
			<title><![CDATA[Re: Htb неправильно шейпит]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=136702#p136702</link>
			<description><![CDATA[<p>Отписал в асю к вечеру будет просто хочу довести до ума.<br />Уверен что правильно указана маска 192.168.1.2/22 ?<br />Ещё для размышления если режишь по метке так на фига по ипи?</p>]]></description>
			<author><![CDATA[null@example.com (Kettler)]]></author>
			<pubDate>Tue, 25 Jan 2011 21:58:24 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=136702#p136702</guid>
		</item>
		<item>
			<title><![CDATA[Htb неправильно шейпит]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=136689#p136689</link>
			<description><![CDATA[<p>Люди ! Помогите.<br />Измотал меня этот htb и я понимаю что проблема не в нём.</p><div class="codebox"><pre><code>/sbin/tc qdisc del dev eth1 root
/sbin/tc qdisc add dev eth1 root handle 1 htb default 0 r2q 100

/sbin/tc qdisc del dev eth0 root
/sbin/tc qdisc add dev eth0 root handle 1 htb default 0 r2q 100

/sbin/tc class add dev eth1 parent 1: classid 1:2 htb rate 16Mbit ceil 16Mbit

/sbin/tc class add dev eth1 parent 1:2 classid 1:05 htb rate 15Mbit ceil 15Mbit
/sbin/tc qdisc add dev eth1 parent 1:05 handle 05 sfq perturb 10

/sbin/tc class add dev eth1 parent 1:2 classid 1:07 htb rate 1024Kbit ceil 1024Kbit burst 50Kb prio 1
/sbin/tc qdisc add dev eth1 parent 1:07 handle 07 sfq perturb 10
/sbin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst 192.168.1.2/22 classid 1:07

/sbin/tc class add dev eth1 parent 1:2 classid 1:08 htb rate 1024Kbit ceil 1024Kbit burst 50Kb prio 1
/sbin/tc qdisc add dev eth1 parent 1:08 handle 08 sfq perturb 10
/sbin/tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst 192.168.1.3/22 classid 1:08

/sbin/tc class add dev eth0 parent 1: classid 1:2 htb rate 16Mbit ceil 16Mbit

/sbin/tc class add dev eth0 parent 1:2 classid 1:05 htb rate 15Mbit ceil 15Mbit
/sbin/tc qdisc add dev eth0 parent 1:05 handle 05 sfq perturb 10

/sbin/tc class add dev eth0 parent 1:2 classid 1:07 htb rate 128Kbit ceil 128Kbit burst 50Kb prio 1
/sbin/tc qdisc add dev eth0 parent 1:07 handle 07 sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 200 handle 102 fw classid 1:07

/sbin/tc class add dev eth0 parent 1:2 classid 1:08 htb rate 128Kbit ceil 128Kbit burst 50Kb prio 1
/sbin/tc qdisc add dev eth0 parent 1:08 handle 08 sfq perturb 10
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 200 handle 103 fw classid 1:08</code></pre></div><p>iptables</p><div class="codebox"><pre><code>iptables -A POSTROUTING -t nat -s 192.168.1.2 -j SNAT --to-source 10.1.1.1
iptables -t mangle -A PREROUTING -s 192.168.1.2 -j MARK --set-mark 102
iptables -t mangle -A PREROUTING -s 192.168.1.2 -j RETURN

iptables -A POSTROUTING -t nat -s 192.168.1.3 -j SNAT --to-source 10.1.1.1
iptables -t mangle -A PREROUTING -s 192.168.1.3 -j MARK --set-mark 103
iptables -t mangle -A PREROUTING -s 192.168.1.3 -j RETURN</code></pre></div><p>Проблема в том, что 1024Кбит/с делит на двоих а не каждому по 1024Кбит/с.&nbsp; Надо чтобы каждому по 1024<br />В чем я ошибся??</p>]]></description>
			<author><![CDATA[null@example.com (astalavista)]]></author>
			<pubDate>Tue, 25 Jan 2011 20:31:13 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=136689#p136689</guid>
		</item>
	</channel>
</rss>
