<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sin ambición &#187; shorewall 4.4</title>
	<atom:link href="http://www.guero.net/tag/shorewall-4-4/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.guero.net</link>
	<description>Detalles técnicos del mundo del desarrollo web y sistemas, proyectos y opinión.</description>
	<lastBuildDate>Fri, 19 Aug 2011 16:49:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Shorewall 4.4 en Ubuntu (con QoS, IFB, Nat)</title>
		<link>http://www.guero.net/2009/11/shorewall-4-4-en-ubuntu-con-qos-ifb-nat/</link>
		<comments>http://www.guero.net/2009/11/shorewall-4-4-en-ubuntu-con-qos-ifb-nat/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 11:52:53 +0000</pubDate>
		<dc:creator>Gabriel</dc:creator>
				<category><![CDATA[Sistemas y redes]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[qos]]></category>
		<category><![CDATA[shorewall]]></category>
		<category><![CDATA[shorewall 4.4]]></category>

		<guid isPermaLink="false">http://www.guero.net/?p=92</guid>
		<description><![CDATA[En el post anterior sobre shorewall 4.2 expliqué su instalación y configuración para una red básica. Ahora voy a documentar lo mismo pero con la última versión de shorewall 4.4. La nueva versión tiene cosas muy interesantes pero la que a mi más me interesó es el soporte de flow (&#8220;flow&#8221; traffic classifier, lo explicaré [...]]]></description>
			<content:encoded><![CDATA[<p>En el <a href="http://www.guero.net/2009/09/shorewall-en-ubuntu-firewall-qos-nat/">post anterior sobre shorewall 4.2</a> expliqué su instalación y configuración para una red básica. Ahora voy a documentar lo mismo pero con la última versión de <a href="http://www1.shorewall.net/pub/shorewall/4.4/shorewall-4.4.4/releasenotes.txt">shorewall 4.4</a>. La nueva versión tiene cosas muy interesantes pero la que a mi más me interesó es el soporte de flow (<a href="http://www.shorewall.net/traffic_shaping.htm#tcclasses">&#8220;flow&#8221; traffic classifier</a>, lo explicaré en otro post).</p>
<p><strong>Definición de la red</strong></p>
<blockquote><p><strong>eth1</strong>: Interfase para conexión a internet (ip dinámica)<br />
<strong>eth2</strong>: Interfase para la red local (192.168.8.0/24)</p></blockquote>
<p><strong>Hacemos una copia de la instalación anterior y eliminamos (si existe)</strong></p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> shorewall.old <br />
<span style="color: #7a0874; font-weight: bold;">cd</span> shorewall.old<br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>shorewall<span style="color: #000000; font-weight: bold;">/*</span> .<span style="color: #000000; font-weight: bold;">/</span></div></div>
<p><strong>Descargamos e Instalamos</strong></p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> shorewall<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> shorewall<br />
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>shorewall.de<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>shorewall<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">4.4</span><span style="color: #000000; font-weight: bold;">/</span>shorewall-4.4.4<span style="color: #000000; font-weight: bold;">/</span>shorewall-4.4.4.1.tar.bz2<br />
<span style="color: #c20cb9; font-weight: bold;">tar</span> jxf shorewall-4.4.4.1.tar.bz2<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> shorewall-4.4.4.1<br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>install.sh</div></div>
<p><strong>Documentación oficial</strong><br />
En toda instalación de un firewall hay particularidades, por lo que recomiendo leer la documentación oficial de shorewall. Iré poniendo links a la documentación oficial sobre cada acción.</p>
<p><em>[DOC] <strong><a href="http://www.shorewall.net/configuration_file_basics.htm">Sobre la estructura de los ficheros de configuración</a></strong></em></p>
<p><strong>Comandos necesarios para el arranque</strong>: /etc/shorewall/init</p>
<blockquote><p>Que cargue con el <a href="http://www.shorewall.net/traffic_shaping.htm#IFB">modulo de IFB</a>, creando solo un dispositivo que será ifb0.</p></blockquote>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">qt modprobe ifb <span style="color: #007800;">numifbs</span>=<span style="color: #000000;">1</span><br />
qt <span style="color: #c20cb9; font-weight: bold;">ip link</span> <span style="color: #000000; font-weight: bold;">set</span> dev ifb0 up<br />
qt <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lock<span style="color: #000000; font-weight: bold;">/</span>subsys<span style="color: #000000; font-weight: bold;">/</span></div></div>
<p><strong>/etc/shorewall/interfaces</strong></p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#ZONE &nbsp; &nbsp; &nbsp; INTERFACE &nbsp; BROADCAST &nbsp; OPTIONS</span><br />
net &nbsp; &nbsp; eth1<br />
loc &nbsp; &nbsp; eth2&nbsp; &nbsp; &nbsp; &nbsp; detect&nbsp; &nbsp; &nbsp; dhcp</div></div>
<p><strong>/etc/shorewall/masq</strong><br />
<em>[DOC] <strong><a href="http://shorewall.net/Documentation.htm#Masq">NAT</a> &#8211; <a href="http://shorewall.net/NAT.htm">NAT2</a></strong></em></p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#INTERFACE&nbsp; &nbsp; &nbsp; SOURCE&nbsp; &nbsp; &nbsp; ADDRESS &nbsp; &nbsp; PROTO &nbsp; PORT(S) IPSEC &nbsp; MARK</span><br />
eth1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 192.168.8.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span></div></div>
<p><strong>/etc/shorewall/zones</strong><br />
<em>[DOC] <strong><a href="http://www.shorewall.net/manpages/shorewall-zones.html">Zonas bajo control</a></strong></em></p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#ZONE &nbsp; TYPE&nbsp; &nbsp; &nbsp; &nbsp; OPTIONS &nbsp; &nbsp; IN&nbsp; &nbsp; &nbsp; OUT</span><br />
fw&nbsp; firewall<br />
net ipv4<br />
loc ipv4</div></div>
<p><strong>/etc/shorewall/policy</strong><br />
<em>[DOC] <strong><a href="http://www.shorewall.net/manpages/shorewall-policy.html">Politica general</a></strong></em></p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#SOURCE &nbsp; &nbsp; DEST&nbsp; &nbsp; &nbsp; &nbsp; POLICY&nbsp; &nbsp; &nbsp; LOG LEVEL &nbsp; LIMIT:BURST</span><br />
loc &nbsp; &nbsp; net &nbsp; &nbsp; ACCEPT<br />
loc &nbsp; &nbsp; <span style="color: #007800;">$FW</span> &nbsp; &nbsp; ACCEPT<br />
<span style="color: #007800;">$FW</span> &nbsp; &nbsp; loc &nbsp; &nbsp; ACCEPT<br />
<span style="color: #007800;">$FW</span> &nbsp; &nbsp; net &nbsp; &nbsp; ACCEPT<br />
all &nbsp; &nbsp; all &nbsp; &nbsp; REJECT&nbsp; &nbsp; &nbsp; info</div></div>
<p><strong>/etc/shorewall/rules</strong><br />
<em>[DOC] <strong><a href="http://www.shorewall.net/manpages/shorewall-rules.html">Reglas</a></strong></em></p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># ACTION&nbsp; &nbsp; SOURCE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DEST&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PROTO &nbsp; &nbsp; &nbsp; DEST PORT(S)&nbsp; &nbsp; ORIGINAL DESTRATE LIMIT</span><br />
<span style="color: #666666; font-style: italic;"># Redirección de puertos</span><br />
DNAT&nbsp; &nbsp; &nbsp; &nbsp; net &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loc:192.168.8.78&nbsp; &nbsp; &nbsp; &nbsp; tcp &nbsp; &nbsp; <span style="color: #000000;">5900</span><br />
DNAT&nbsp; &nbsp; &nbsp; &nbsp; net &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loc:192.168.8.78&nbsp; &nbsp; &nbsp; &nbsp; tcp &nbsp; &nbsp; <span style="color: #000000;">8500</span>:<span style="color: #000000;">8600</span><br />
DNAT&nbsp; &nbsp; &nbsp; &nbsp; net &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loc:192.168.8.78&nbsp; &nbsp; &nbsp; &nbsp; udp &nbsp; &nbsp; <span style="color: #000000;">8500</span>:<span style="color: #000000;">8600</span><br />
<span style="color: #666666; font-style: italic;"># FROM Net TO firewall</span><br />
ACCEPT&nbsp; &nbsp; &nbsp; net &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007800;">$FW</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; icmp&nbsp; &nbsp; &nbsp; &nbsp; <br />
ACCEPT&nbsp; &nbsp; &nbsp; net &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #007800;">$FW</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tcp &nbsp; &nbsp; <span style="color: #000000;">22</span></div></div>
<p><strong>* Hasta aquí es lo básico en cuando a seguridad y NAT, con esto la red ya funciona. A partir de aquí es <a href="http://www.shorewall.net/traffic_shaping.htm">QoS o Traffic Shaping</a>.</strong></p>
<p><strong>/etc/shorewall/tcdevices</strong><br />
<em>[DOC] <strong><a href="http://www.shorewall.net/traffic_shaping.htm#tcdevices">Devices</a> &#8211; <a href="http://www.shorewall.net/traffic_shaping.htm#IFB">Redirigir el tráfico a IFB</a></strong></em></p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#NUMBER:&nbsp; &nbsp; IN-BANDWITH OUT-BANDWIDTH &nbsp; OPTIONS &nbsp; &nbsp; REDIRECTED</span><br />
<span style="color: #666666; font-style: italic;">#INTERFACE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INTERFACES</span><br />
<span style="color: #000000;">1</span>:eth1&nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 300kbit &nbsp; &nbsp; classify&nbsp; &nbsp; <br />
<span style="color: #000000;">2</span>:ifb0&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; 6000kbit&nbsp; &nbsp; &nbsp; &nbsp; classify&nbsp; &nbsp; eth1</div></div>
<p><strong>/etc/shorewall/tcclasses</strong><br />
<em>[DOC] <strong><a href="http://www.shorewall.net/traffic_shaping.htm#tcclasses">Clases</a></strong></em></p>
<blockquote><p>
Ahora es donde voy a dar mi opinion sobre como deberían ir estas clases, esto depende de la experiencia de cada uno, pero en fin, esta es la mía: </p>
<ul>
<li>Dividir en tres partes VoIP y Video IP (1:10 y 2:10) , ICMP/DNS y puertos conocidos (1:11 y 2:11) y por último tráfico desconocido (1:19 y 2:19)</li>
<li>Antes le daba mayor prioridad a SSH o ICMP y en mantenimientos he cortado llamadas y en alguna prueba de rendimiento también me quede sin teléfonos (que también puede ser un ataque DDoS u otros..)</li>
<li>La segunda clase sera para icmp y dns y tráfico conocido, y esta esta dividida en subclases con el fin de garantizar un mínimo a cada conexión</li>
<li>En mi red tengo un servidor DNS para que los equipos no vayan a buscar cada dominio en internet, de modo que al DNS le doy más prioridad que al trafico en si mismo ya que se realiza pocas veces y agiliza la navegación</li>
<li>Y ya que tengo servicios dentro de la red que son utilizados en ocasiones desde fuera de ella considero que se aplican los mismos principios para el trafico entrante</li>
<li>Sobre los porcentajes que he utilizado en este ejemplo es por el ancho de banda que tengo en esa instalación, esto cada uno lo tiene que mirar pero yo he intentado garantizar 128kbit a la voip tanto de subida como de bajada</li>
<li>Lo de enviar el tráfico desconocido a la última clase es para evitar el esfuerzo y la complicación de identificar las conexiones P2P, hay otras técnicas pero al final después de muchas pruebas esto es lo que me ha resultado más fácil de mantener</li>
</ul>
</blockquote>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#INTERFACE:CLASS&nbsp; &nbsp; MARK&nbsp; &nbsp; RATE: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CEIL&nbsp; &nbsp; &nbsp; &nbsp; PRIORITY&nbsp; &nbsp; OPTIONS</span><br />
<span style="color: #666666; font-style: italic;">##&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DMAX:UMAX</span><br />
<span style="color: #666666; font-style: italic;"># #</span><br />
<span style="color: #666666; font-style: italic;"># # eth1</span><br />
<span style="color: #666666; font-style: italic;"># #</span><br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">10</span>&nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">43</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">100</span> &nbsp; &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">9</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">10</span> &nbsp; <span style="color: #000000;">1</span> &nbsp; tcp-ack,tos-minimize-delay <span style="color: #666666; font-style: italic;"># voip</span><br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">11</span>&nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">47</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">100</span> &nbsp; &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">9</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">10</span> &nbsp; <span style="color: #000000;">2</span> &nbsp; tcp-ack,tos-minimize-delay <span style="color: #666666; font-style: italic;"># icmp / dns</span><br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">11</span>:<span style="color: #000000;">101</span>&nbsp; &nbsp; - &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">10</span> &nbsp; &nbsp; &nbsp; full&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">11</span>&nbsp; <span style="color: #666666; font-style: italic;"># openvpn</span><br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">11</span>:<span style="color: #000000;">102</span>&nbsp; &nbsp; - &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">10</span> &nbsp; &nbsp; &nbsp; full&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">12</span>&nbsp; <span style="color: #666666; font-style: italic;"># vnc</span><br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">11</span>:<span style="color: #000000;">103</span>&nbsp; &nbsp; - &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">10</span> &nbsp; &nbsp; &nbsp; full&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">13</span>&nbsp; <span style="color: #666666; font-style: italic;"># http/https</span><br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">11</span>:<span style="color: #000000;">104</span>&nbsp; &nbsp; - &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">10</span> &nbsp; &nbsp; &nbsp; full&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">14</span>&nbsp; <span style="color: #666666; font-style: italic;"># mail</span><br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">11</span>:<span style="color: #000000;">105</span>&nbsp; &nbsp; - &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">10</span> &nbsp; &nbsp; &nbsp; full&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">15</span>&nbsp; <span style="color: #666666; font-style: italic;"># irc,msn,...</span><br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">19</span>&nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">10</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">100</span> &nbsp; &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">9</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">10</span> &nbsp; <span style="color: #000000;">99</span>&nbsp; tos-minimize-cost,default<br />
<span style="color: #666666; font-style: italic;"># #</span><br />
<span style="color: #666666; font-style: italic;"># # ifb0</span><br />
<span style="color: #666666; font-style: italic;"># #</span><br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">10</span>&nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">3</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">100</span>&nbsp; &nbsp; &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">9</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">10</span> &nbsp; <span style="color: #000000;">1</span> &nbsp; tcp-ack,tos-minimize-delay <span style="color: #666666; font-style: italic;"># voip</span><br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">11</span>&nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">87</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">100</span> &nbsp; &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">9</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">10</span> &nbsp; <span style="color: #000000;">2</span> &nbsp; tcp-ack,tos-minimize-delay <span style="color: #666666; font-style: italic;"># icmp / dns</span><br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">11</span>:<span style="color: #000000;">101</span>&nbsp; &nbsp; - &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">10</span> &nbsp; &nbsp; &nbsp; full&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">11</span>&nbsp; <span style="color: #666666; font-style: italic;"># openvpn</span><br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">11</span>:<span style="color: #000000;">102</span>&nbsp; &nbsp; - &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">10</span> &nbsp; &nbsp; &nbsp; full&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">12</span>&nbsp; <span style="color: #666666; font-style: italic;"># vnc</span><br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">11</span>:<span style="color: #000000;">103</span>&nbsp; &nbsp; - &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">10</span> &nbsp; &nbsp; &nbsp; full&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">13</span>&nbsp; <span style="color: #666666; font-style: italic;"># http/https</span><br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">11</span>:<span style="color: #000000;">104</span>&nbsp; &nbsp; - &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">10</span> &nbsp; &nbsp; &nbsp; full&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">14</span>&nbsp; <span style="color: #666666; font-style: italic;"># mail</span><br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">11</span>:<span style="color: #000000;">105</span>&nbsp; &nbsp; - &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">10</span> &nbsp; &nbsp; &nbsp; full&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">15</span>&nbsp; <span style="color: #666666; font-style: italic;"># irc,msn,...</span><br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">19</span>&nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">10</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">100</span> &nbsp; &nbsp; full<span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">9</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">10</span> &nbsp; <span style="color: #000000;">99</span>&nbsp; tos-minimize-cost,default</div></div>
<p><strong>/etc/shorewall/tcfilters</strong><br />
<em>[DOC] <strong><a href="http://www.shorewall.net/traffic_shaping.htm#tcfilters">Filtros para identificar el tráfico</a></strong></em></p>
<blockquote><p>Yo he identificado estos puertos como útiles para mi red, como decía antes, cada uno sabrá lo que le es útil y lo que no.</p></blockquote>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#INTERFACE: SOURCE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DEST&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PROTO &nbsp; DEST&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SOURCE</span><br />
<span style="color: #666666; font-style: italic;">#CLASS&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PORT(S) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PORT(S)</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OUTGOING TRAFFIC</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">10</span>&nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; udp - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">4569</span>,<span style="color: #000000;">5060</span><br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">10</span>&nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tcp - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">4569</span>,<span style="color: #000000;">5060</span><br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">11</span>&nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; icmp&nbsp; &nbsp; echo-request,echo-reply<br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">11</span>&nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tcp - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">53</span>,<span style="color: #000000;">22</span><br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">11</span>&nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; udp - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">53</span><br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">101</span> &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; udp - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">1194</span><br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">101</span> &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tcp - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">1194</span><br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">102</span> &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tcp - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">5900</span><br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">103</span> &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tcp - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">80</span>,<span style="color: #000000;">443</span><br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">104</span> &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tcp - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">25</span>,<span style="color: #000000;">465</span>,<span style="color: #000000;">110</span>,<span style="color: #000000;">995</span>,<span style="color: #000000;">143</span>,<span style="color: #000000;">993</span><br />
<span style="color: #000000;">1</span>:<span style="color: #000000;">105</span> &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tcp - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">1493</span>,<span style="color: #000000;">1542</span>,<span style="color: #000000;">1863</span>,<span style="color: #000000;">1963</span>,<span style="color: #000000;">5222</span>,<span style="color: #000000;">6667</span><br />
<span style="color: #666666; font-style: italic;"># #</span><br />
<span style="color: #666666; font-style: italic;"># # &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INCOMING TRAFFIC</span><br />
<span style="color: #666666; font-style: italic;"># #</span><br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">10</span>&nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; udp <span style="color: #000000;">4569</span>,<span style="color: #000000;">5060</span><br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">10</span>&nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tcp <span style="color: #000000;">4569</span>,<span style="color: #000000;">5060</span><br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">11</span>&nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; icmp&nbsp; &nbsp; echo-request,echo-reply<br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">11</span>&nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tcp <span style="color: #000000;">53</span>,<span style="color: #000000;">22</span><br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">11</span>&nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; udp <span style="color: #000000;">53</span><br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">101</span> &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; udp <span style="color: #000000;">1194</span><br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">101</span> &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tcp <span style="color: #000000;">1194</span><br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">102</span> &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tcp <span style="color: #000000;">5900</span><br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">103</span> &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tcp <span style="color: #000000;">80</span>,<span style="color: #000000;">443</span><br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">104</span> &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tcp <span style="color: #000000;">25</span>,<span style="color: #000000;">465</span>,<span style="color: #000000;">110</span>,<span style="color: #000000;">995</span>,<span style="color: #000000;">143</span>,<span style="color: #000000;">993</span><br />
<span style="color: #000000;">2</span>:<span style="color: #000000;">105</span> &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tcp <span style="color: #000000;">1493</span>,<span style="color: #000000;">1542</span>,<span style="color: #000000;">1863</span>,<span style="color: #000000;">1963</span>,<span style="color: #000000;">5222</span>,<span style="color: #000000;">6667</span></div></div>
<p><strong>Esto es todo, ahora compilamos:</strong></p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>shorewall restart</div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.guero.net/2009/11/shorewall-4-4-en-ubuntu-con-qos-ifb-nat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

