<?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>Linux 360° &#124; Italia &#187; Mikrotik</title>
	<atom:link href="http://www.linux360.it/category/mikrotik/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linux360.it</link>
	<description>Notizie, guide e tutorial per il mondo Linux a 360°</description>
	<lastBuildDate>Tue, 16 Dec 2014 14:03:33 +0000</lastBuildDate>
	<language>it-IT</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>Mikrotik Site to Site IPsec VPN</title>
		<link>http://www.linux360.it/2014/10/20/mikrotik-site-to-site-ipsec-vpn/</link>
		<comments>http://www.linux360.it/2014/10/20/mikrotik-site-to-site-ipsec-vpn/#comments</comments>
		<pubDate>Mon, 20 Oct 2014 08:45:34 +0000</pubDate>
		<dc:creator><![CDATA[Paolo Daniele]]></dc:creator>
				<category><![CDATA[Mikrotik]]></category>
		<category><![CDATA[Wireless & Networking]]></category>
		<category><![CDATA[ipsec]]></category>
		<category><![CDATA[mikrotik]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[vpn]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://www.paolodaniele.it/?p=2005</guid>
		<description><![CDATA[<p>Ciao Ragazzi, dopo qualche giorno di pausa si ritorna alla carica! Oggi vi spiego come mettere su una VPN tra due siti che utilizzano come punto di accesso alla rete. Una VPN (Virtual Private Network) è una rete che permette a due punti, connessi ad internet, distanti fisicamente tra loro di apparire come se fossero ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/10/20/mikrotik-site-to-site-ipsec-vpn/">Mikrotik Site to Site IPsec VPN</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Ciao Ragazzi,</p>
<p>dopo qualche giorno di pausa si ritorna alla carica!</p>
<p>Oggi vi spiego come mettere su una VPN tra due siti che utilizzano come punto di accesso alla rete.</p>
<p><a href="http://www.paolodaniele.it/wp-content/uploads/2014/10/mikrotik_vpn.jpg"><img class="alignnone wp-image-2008" src="http://www.paolodaniele.it/wp-content/uploads/2014/10/mikrotik_vpn.jpg" alt="mikrotik_vpn" width="725" height="279" /></a></p>
<p>Una <strong>VPN</strong> (Virtual Private Network) è una rete che permette a due punti, connessi ad internet, distanti fisicamente tra loro di apparire come se fossero sulla stessa rete fisica.</p>
<p>Generalmente questo tipo di tunnel viene cifrato per evitare lo &#8220;sniffing&#8221; dei pacchetti dalla rete.</p>
<p>Esistono diversi sistemi per realizzare VPN sui dispositivi Mikrotik ognuno con vantaggi e svantaggi, ma quello più diffuso è sicuramente IPSec.</p>
<p>Nella figura sopra possiamo vedere come le due rete private abbiano indirizzi ip di classi diverse, <strong>192.168.1.0/24</strong> e <strong>192.168.2.0/24</strong> questo <strong>non è fondamentale ma è preferibile</strong> per evitare conflitti IP tra le due sedi remote.</p>
<p>Gli indirizzi 1.1.1.1 e 2.2.2.2 sono invece gli IP Pubblici con i quali le due sedi &#8220;escono&#8221; su Internet.</p>
<p>Quello che dobbiamo configurare principalmente sono 3 cose:</p>
<p>- Policy IPSec;</p>
<p>- Peers IPSec;</p>
<p>- NAT Firewall per permettere il passaggio dei pacchetti</p>
<p>Iniziamo!</p>
<p><strong> SITO 1</strong></p>
<p>IP Pubblico: 1.1.1.1</p>
<p>IP privato: 192.168.1.0/24</p>
<p>Configurazione Indirizzi IP:</p>
<div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><pre class="powershell" style="font-family:monospace;"><span class="sy0">/</span>ip address
add address<span class="sy0">=</span>192.168.1.1<span class="sy0">/</span><span class="nu0">24</span> interface<span class="sy0">=</span>ether1<span class="sy0">-</span>local network<span class="sy0">=</span>192.168.1.0</pre></div></div>
<p>Aggiungiamo le regole di NAT per permettere il traffico VPN da e verso le antenne:</p>
<div id="wpshdo_2" class="wp-synhighlighter-outer"><div id="wpshdt_2" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_2"></a><a id="wpshat_2" class="wp-synhighlighter-title" href="#codesyntax_2"  onClick="javascript:wpsh_toggleBlock(2)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_2" onClick="javascript:wpsh_code(2)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_2" onClick="javascript:wpsh_print(2)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_2" class="wp-synhighlighter-inner" style="display: block;"><pre class="powershell" style="font-family:monospace;"><span class="sy0">/</span>ip firewall nat
add chain<span class="sy0">=</span>srcnat comment<span class="sy0">=</span><span class="st0">&quot;Nat Bypass VPN&quot;</span> dst<span class="sy0">-</span>address<span class="sy0">=</span>192.168.0.0<span class="sy0">/</span><span class="nu0">16</span>
add action<span class="sy0">=</span>masquerade chain<span class="sy0">=</span>srcnat out<span class="sy0">-</span>interface<span class="sy0">=</span>pppoe<span class="sy0">-</span>out1</pre></div></div>
<p>&nbsp;</p>
<p>Come avrete notato come dst-address ho usato una <strong>/16</strong> questo perchè le due subnet sono differenti, quindi così sono sicuro di inglobare entrambe.</p>
<p>Fatto questo possiamo creare il tunnell VPN con IPSec:</p>
<div id="wpshdo_3" class="wp-synhighlighter-outer"><div id="wpshdt_3" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_3"></a><a id="wpshat_3" class="wp-synhighlighter-title" href="#codesyntax_3"  onClick="javascript:wpsh_toggleBlock(3)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_3" onClick="javascript:wpsh_code(3)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_3" onClick="javascript:wpsh_print(3)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_3" class="wp-synhighlighter-inner" style="display: block;"><pre class="powershell" style="font-family:monospace;"><span class="sy0">/</span>ip ipsec peer
add address<span class="sy0">=</span>2.2.2.2<span class="sy0">/</span><span class="nu0">32</span> dpd<span class="sy0">-</span>interval<span class="sy0">=</span>disable<span class="sy0">-</span>dpd enc<span class="sy0">-</span>algorithm<span class="sy0">=</span>3des hash<span class="sy0">-</span>algorithm<span class="sy0">=</span>md5 nat<span class="sy0">-</span>traversal<span class="sy0">=</span>no secret<span class="sy0">=!</span>mys3cr3t
&nbsp;
<span class="sy0">/</span>ip ipsec policy
add dst<span class="sy0">-</span>address<span class="sy0">=</span>192.168.0.0<span class="sy0">/</span><span class="nu0">16</span> sa<span class="sy0">-</span>dst<span class="sy0">-</span>address<span class="sy0">=</span>2.2.2.2 sa<span class="sy0">-</span>src<span class="sy0">-</span>address<span class="sy0">=</span>1.1.1.1 src<span class="sy0">-</span>address<span class="sy0">=</span>192.168.1.0<span class="sy0">/</span><span class="nu0">24</span> tunnel<span class="sy0">=</span>yes</pre></div></div>
<p>Per il Sito 1 abbiamo finito&#8230;passiamo al Sito 2</p>
<p><strong>SITO 2</strong></p>
<p>IP Pubblico: 2.2.2.2</p>
<p>IP privato: 192.168.2.0/24</p>
<p>Configurazione Indirizzi IP:</p>
<div id="wpshdo_4" class="wp-synhighlighter-outer"><div id="wpshdt_4" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_4"></a><a id="wpshat_4" class="wp-synhighlighter-title" href="#codesyntax_4"  onClick="javascript:wpsh_toggleBlock(4)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_4" onClick="javascript:wpsh_code(4)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_4" onClick="javascript:wpsh_print(4)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_4" class="wp-synhighlighter-inner" style="display: block;"><pre class="powershell" style="font-family:monospace;"><span class="sy0">/</span>ip address
add address<span class="sy0">=</span>192.168.2.1<span class="sy0">/</span><span class="nu0">24</span> interface<span class="sy0">=</span>ether1<span class="sy0">-</span>local network<span class="sy0">=</span>192.168.2.0</pre></div></div>
<p>Aggiungiamo le regole di NAT per permettere il traffico VPN da e verso le antenne:</p>
<div id="wpshdo_5" class="wp-synhighlighter-outer"><div id="wpshdt_5" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_5"></a><a id="wpshat_5" class="wp-synhighlighter-title" href="#codesyntax_5"  onClick="javascript:wpsh_toggleBlock(5)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_5" onClick="javascript:wpsh_code(5)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_5" onClick="javascript:wpsh_print(5)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_5" class="wp-synhighlighter-inner" style="display: block;"><pre class="powershell" style="font-family:monospace;"><span class="sy0">/</span>ip firewall nat
add chain<span class="sy0">=</span>srcnat comment<span class="sy0">=</span><span class="st0">&quot;Nat Bypass VPN&quot;</span> dst<span class="sy0">-</span>address<span class="sy0">=</span>192.168.0.0<span class="sy0">/</span><span class="nu0">16</span>
add action<span class="sy0">=</span>masquerade chain<span class="sy0">=</span>srcnat out<span class="sy0">-</span>interface<span class="sy0">=</span>pppoe<span class="sy0">-</span>out1</pre></div></div>
<p>Anche per il Sito 2 come dst-address ho usato una <strong>/16</strong> questo perchè le due subnet sono differenti, quindi così sono sicuro di inglobare entrambe.</p>
<p>Fatto questo possiamo creare il tunnell VPN con IPSec:</p>
<div id="wpshdo_6" class="wp-synhighlighter-outer"><div id="wpshdt_6" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_6"></a><a id="wpshat_6" class="wp-synhighlighter-title" href="#codesyntax_6"  onClick="javascript:wpsh_toggleBlock(6)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_6" onClick="javascript:wpsh_code(6)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_6" onClick="javascript:wpsh_print(6)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_6" class="wp-synhighlighter-inner" style="display: block;"><pre class="powershell" style="font-family:monospace;"><span class="sy0">/</span>ip ipsec peer
add address<span class="sy0">=</span>1.1.1.1<span class="sy0">/</span><span class="nu0">32</span> dpd<span class="sy0">-</span>interval<span class="sy0">=</span>disable<span class="sy0">-</span>dpd enc<span class="sy0">-</span>algorithm<span class="sy0">=</span>3des hash<span class="sy0">-</span>algorithm<span class="sy0">=</span>md5 nat<span class="sy0">-</span>traversal<span class="sy0">=</span>no secret<span class="sy0">=!</span>mys3cr3t
&nbsp;
<span class="sy0">/</span>ip ipsec policy
add dst<span class="sy0">-</span>address<span class="sy0">=</span>192.168.0.0<span class="sy0">/</span><span class="nu0">16</span> sa<span class="sy0">-</span>dst<span class="sy0">-</span>address<span class="sy0">=</span>1.1.1.1 sa<span class="sy0">-</span>src<span class="sy0">-</span>address<span class="sy0">=</span>2.2.2.2 src<span class="sy0">-</span>address<span class="sy0">=</span>192.168.2.0<span class="sy0">/</span><span class="nu0">24</span> tunnel<span class="sy0">=</span>yes</pre></div></div>
<p>Il gioco è fatto!</p>
<p>Enjoy!</p>
<p>&nbsp;</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/10/20/mikrotik-site-to-site-ipsec-vpn/">Mikrotik Site to Site IPsec VPN</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/10/20/mikrotik-site-to-site-ipsec-vpn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrade e Downgrade Mikrotik da Linea di Comando</title>
		<link>http://www.linux360.it/2014/10/01/upgrade-e-downgrade-mikrotik-da-linea-di-comando/</link>
		<comments>http://www.linux360.it/2014/10/01/upgrade-e-downgrade-mikrotik-da-linea-di-comando/#comments</comments>
		<pubDate>Wed, 01 Oct 2014 14:00:11 +0000</pubDate>
		<dc:creator><![CDATA[Francesco Gabriele]]></dc:creator>
				<category><![CDATA[Mikrotik]]></category>
		<category><![CDATA[MikrotikDowngrade]]></category>
		<category><![CDATA[MikrotikUpgrade]]></category>

		<guid isPermaLink="false">http://www.ubuntuserver.it/?p=769</guid>
		<description><![CDATA[<p>Può capitare che dobbiamo effettuare l&#8217;upgrade o il downgrade di una routerboard da linea di comando, magari collegati ad ex. in ssh. Qui ci viene incontro il comando fetch, di seguito alcuni esempi: 1) Upgrade all&#8217;ultima versione, che alla stesura di questo post è la 6.20. Ovviamente scarichiamo la versione in base all&#8217;architettura della nostra ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/10/01/upgrade-e-downgrade-mikrotik-da-linea-di-comando/">Upgrade e Downgrade Mikrotik da Linea di Comando</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Può capitare che dobbiamo effettuare l&#8217;upgrade o il downgrade di una routerboard da linea di comando, magari collegati ad ex. in ssh.<br />
Qui ci viene incontro il comando fetch, di seguito alcuni esempi:</p>
<p><strong>1) Upgrade all&#8217;ultima versione, che alla stesura di questo post è la 6.20.</strong><br />
Ovviamente scarichiamo la versione in base all&#8217;architettura della nostra routerboard che in questo esempio è la &#8220;mipsbe&#8221; (mipsbe CRS series, RB4xx series, RB7xx series, RB9xx series, RB2011 series, SXT, OmniTik, Groove, METAL, SEXTANT)</p>
<p>Di seguito le altre serie</p>
<p>&#8220;powerpc&#8221; (RB3xx series, RB600 series, RB800 series, RB1xxx series)</p>
<p>&#8220;mipsle&#8221; (RB1xx series, RB5xx series, RB Crossroads)</p>
<p>&#8220;tile&#8221; (CCR series)</p>
<p>&#8220;x86&#8243; (PC / X86, RB230 series)</p>
<div id="wpshdo_7" class="wp-synhighlighter-outer"><div id="wpshdt_7" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_7"></a><a id="wpshat_7" class="wp-synhighlighter-title" href="#codesyntax_7"  onClick="javascript:wpsh_toggleBlock(7)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_7" onClick="javascript:wpsh_code(7)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_7" onClick="javascript:wpsh_print(7)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_7" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="sy0">/</span>tool fetch <span class="re2">url</span>=<span class="st0">&quot;http://download2.mikrotik.com/routeros/6.20/routeros-mipsbe-6.20.npk&quot;</span> <span class="re2">mode</span>=http</pre></div></div>
<p>&nbsp;</p>
<p>Appena vediamo uscire la scritta <strong> “status: finished”</strong> possiamo fare un bel reboot e dopo troveremo la nostra routerboard alla 6.20.</p>
<p><strong>2) Downgrade all&#8217;ultima versione rilasciata della serie 5 che nel dettaglio è la 5.26</strong></p>
<p><strong><div id="wpshdo_8" class="wp-synhighlighter-outer"><div id="wpshdt_8" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_8"></a><a id="wpshat_8" class="wp-synhighlighter-title" href="#codesyntax_8"  onClick="javascript:wpsh_toggleBlock(8)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_8" onClick="javascript:wpsh_code(8)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_8" onClick="javascript:wpsh_print(8)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_8" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="sy0">/</span>tool fetch <span class="re2">url</span>=<span class="st0">&quot;http://download2.mikrotik.com/routeros/5.26/routeros-mipsbe-5.26.npk&quot;</span> <span class="re2">mode</span>=http</pre></div></div></strong></p>
<p>Qui invece di effettuare il reboot dobbiamo dirgli di fare il downgrade e lo facciamo in questo modo:</p>
<p><strong>system package downgrade;</strong></p>
<p>Questo comando esegue in automatico un reboot ed effettua il downgrade dei pacchetti al primo avvio.</p>
<p>Spero sia utile a molti</p>
<p>&#8212;-<br />
Frank<strong>                  </strong></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/10/01/upgrade-e-downgrade-mikrotik-da-linea-di-comando/">Upgrade e Downgrade Mikrotik da Linea di Comando</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/10/01/upgrade-e-downgrade-mikrotik-da-linea-di-comando/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configurazione MultiSid + Vlan tra Ubiquiti UniFi e Mikrotik CRS-125</title>
		<link>http://www.linux360.it/2014/08/29/configurazione-multisid-vlan-tra-ubiquiti-unifi-e-mikrotik-crs-125/</link>
		<comments>http://www.linux360.it/2014/08/29/configurazione-multisid-vlan-tra-ubiquiti-unifi-e-mikrotik-crs-125/#comments</comments>
		<pubDate>Fri, 29 Aug 2014 14:32:19 +0000</pubDate>
		<dc:creator><![CDATA[Francesco Gabriele]]></dc:creator>
				<category><![CDATA[Mikrotik]]></category>
		<category><![CDATA[Mikrotik Vlan]]></category>
		<category><![CDATA[Mikrotik Vlan Switch]]></category>
		<category><![CDATA[MikrotikCRS]]></category>
		<category><![CDATA[ubiquiti unifi]]></category>
		<category><![CDATA[UniFi Vlan]]></category>

		<guid isPermaLink="false">http://www.ubuntuserver.it/?p=655</guid>
		<description><![CDATA[<p>Le RouterBoard si sono evolute molto come hardware negli ultimi anni, Mikrotik sta rilasciando vari modelli per la distribuzione di grande potenza di calcolo, questi modelli vengono classificati nella serie CCR (Cloud Core RouterOS). Ma Mikrotik non si è limitata solo alla serie CCR, ma ha introdotto dei modelli definiti CRS (Cloud Router Switch) per ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/08/29/configurazione-multisid-vlan-tra-ubiquiti-unifi-e-mikrotik-crs-125/">Configurazione MultiSid + Vlan tra Ubiquiti UniFi e Mikrotik CRS-125</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.ubuntuserver.it/wp-content/uploads/2014/08/UBIQUITI_UNIFI.jpg"><img class="alignnone size-medium wp-image-658" src="http://www.ubuntuserver.it/wp-content/uploads/2014/08/UBIQUITI_UNIFI-300x138.jpg" alt="UBIQUITI_UNIFI" width="300" height="138" /></a></p>
<p>Le RouterBoard si sono evolute molto come hardware negli ultimi anni, Mikrotik sta rilasciando vari modelli<br />
per la distribuzione di grande potenza di calcolo, questi modelli vengono classificati nella<br />
serie CCR (Cloud Core RouterOS).<br />
Ma Mikrotik non si è limitata solo alla serie CCR, ma ha introdotto dei modelli definiti CRS (Cloud Router Switch)<br />
per venire incontro all&#8217;esigenza di chi cercava uno switch avanzato ed affidabile.</p>
<p>La cosa interessante dei CRS e che avendo abbordo sempre RouterOS può essere utilizzato siamo come Router che<br />
come Switch in Layer 3.<br />
Proprio di quest&#8217;ultima funzionalità, nel software è disponibile un menu speciale dedicato a tutte le operazioni<br />
di configurazioni tipiche di uno switch entry level eccone alcune di esempio:</p>
<p><strong>• Configure ports as switch, or for routing</strong><br />
<strong> • Trunk Ports with optional &#8220;Native&#8221; VLAN</strong><br />
<strong> • Allow us a &#8220;VLAN&#8217;s&#8221; section of the cli / Winbox where we define VLANs for the switch</strong><br />
<strong> something like / switch vlans add name=&#8221;VLAN Name&#8221; vlan-id=1234 S-VLAN=yes/no</strong><br />
<strong> • Use the VLAN&#8217;s defined to then add to a trunk port with the VLAN&#8217; on it like we add channel</strong><br />
<strong> scan into wireless</strong><br />
<strong> • Allow VLAN Groups like frequency scan groups to easily make regular trunks</strong><br />
<strong> for deployment (like we have 3 VLANS we deploy on most ports)</strong><br />
<strong> • Port Mirroring</strong><br />
<strong> • Ethernet, Fiber, or 4G (with optional USB modem) gateway connection to Internet</strong><br />
<strong> • RouterOS gateway/firewall/VPN router</strong><br />
<strong> • Up to twenty-five gigabit switch ports (1xSFP and 24xRJ45)</strong></p>
<p>In questo articolo vedremo come figurare un Access Point Unifi con 3 network su uno<br />
Switch Mikrotik CRS usando il Vlan Tagging ed ogni network avrà sil suo DHCP Server.</p>
<p>Nel precedente articolo avevo mostrato come fare la stessa configurazione con una Mikrotik  1000</p>
<p>http://ww.ubuntuserver.it/configurazione-multisid-vlan-tra-ubiquiti-unifi-e-routerboard-mikrotik/</p>
<p>Va bene veniamo a noi <img src="http://www.linux360.it/wp-includes/images/smilies/icon_biggrin.gif" alt=":-D" class="wp-smiley" /> </p>
<p>Procediamo per punti:</p>
<p><strong>1) Per abilitare le funzioni switch dobbiamo prima definire una master-port ed in questo caso useremo al ether1</strong></p>
<p><strong>/</strong>interface ethernet<br />
set [ find default-name=ether2 ] master-port=ether1<br />
set [ find default-name=ether3 ] master-port=ether1<br />
set [ find default-name=ether4 ] master-port=ether1<br />
set [ find default-name=ether5 ] master-port=ether1<br />
set [ find default-name=ether6 ] master-port=ether1<br />
set [ find default-name=ether7 ] master-port=ether1<br />
set [ find default-name=ether8 ] master-port=ether1<br />
set [ find default-name=ether9 ] master-port=ether1<br />
set [ find default-name=ether10 ] master-port=ether1<br />
set [ find default-name=ether11 ] master-port=ether1<br />
set [ find default-name=ether12 ] master-port=ether1<br />
set [ find default-name=ether13 ] master-port=ether1<br />
set [ find default-name=ether14 ] master-port=ether1<br />
set [ find default-name=ether15 ] master-port=ether1<br />
set [ find default-name=ether16 ] master-port=ether1<br />
set [ find default-name=ether17 ] master-port=ether1<br />
set [ find default-name=ether18 ] master-port=ether1<br />
set [ find default-name=ether19 ] master-port=ether1<br />
set [ find default-name=ether20 ] master-port=ether1<br />
set [ find default-name=ether21 ] master-port=ether1<br />
set [ find default-name=ether22 ] master-port=ether1<br />
set [ find default-name=ether23 ] master-port=ether1<br />
set [ find default-name=ether24 ] master-port=ether1</p>
<p><strong>2) Qui impostiamo l&#8217;indirizzo ip per la rete non taggata (dove risiede il controller unifi), infatti lo mettiamo sulla master-port</strong></p>
<p>/ip address<br />
add address=192.168.30.1/24 interface=ether1 network=192.168.30.0</p>
<p><strong>3) Qui specifichiamo le vlan nel modo classico visto che il routing è terminato sullo stesso switch (dhcp server ecc&#8230;)</strong></p>
<p>/interface vlan<br />
add interface=ether1 l2mtu=1584 name=vlan40 vlan-id=40<br />
add interface=ether1 l2mtu=1584 name=vlan50 vlan-id=50</p>
<p><strong>4) Qui configuriamo l&#8217;indirizzo ip per le Vlan appena configurate (40 e 50)</strong></p>
<p>/ip address<br />
add address=192.168.50.1/24 interface=vlan50 network=192.168.50.0<br />
add address=192.168.40.1/24 interface=vlan40 network=192.168.40.0</p>
<p><strong>5) Qui configuriamo i pool ed i dhcp server</strong></p>
<p>/ip pool<br />
add name=lan-pool ranges=192.168.30.50-192.168.30.90<br />
add name=vlan40-pool ranges=192.168.40.2-192.168.40.254<br />
add name=vlan50-pool ranges=192.168.50.2-192.168.50.254<br />
/ip dhcp-server<br />
add address-pool=lan-pool disabled=no interface=ether1 lease-time=1d name=dhcp-lan<br />
add address-pool=vlan40-pool disabled=no interface=vlan40 lease-time=1d name=dhcp-vlan40<br />
add address-pool=vlan50-pool disabled=no interface=vlan50 lease-time=1d name=dhcp-vlan50</p>
<p><strong>6) Qui configuriamo le Vlan lato switch e aggiungiamo anche lo &#8220;switch1-cpu&#8221; in quanto il routing di quelle due vlan (dhcp server ecc..)</strong><br />
viene terminato sullo stesso apparato, in caso contrario non riuscirebbe ad assegnarci un ip sulle rispettive vlan 40 e 50</p>
<p>/interface ethernet switch egress-vlan-tag<br />
add tagged-ports=ether22-slave-local,ether23-slave-local,ether24-slave-local,switch1-cpu vlan-id=40<br />
add tagged-ports=ether22-slave-local,ether23-slave-local,ether24-slave-local,switch1-cpu vlan-id=50<br />
/interface ethernet switch ingress-vlan-translation<br />
add customer-vid=0 disabled=yes new-customer-vid=40 ports=ether20-slave-local sa-learning=yes</p>
<p><strong>7) Qui configuriamo il Masquerade cosi da permettici di uscire su internet tramite la nostra connessione ad internet</strong></p>
<p>/ip firewall nat<br />
add action=masquerade chain=srcnat comment=Primary out-interface=pppoe-out1 src-address=192.168.0.0/16</p>
<p><strong>Adesso non ci resta che collegarci al nostro controller UniFI https://IP-ADDREASS:8443</strong><br />
<strong>e configurare i 3 sid dove uno è untagged mentre gli altri</strong><br />
<strong>tagged come nel printscreen qui sotto:</strong></p>
<p><a href="http://www.ubuntuserver.it/wp-content/uploads/2014/08/vlan-unifi-esempio.jpeg"><img class="alignnone size-medium wp-image-662" src="http://www.ubuntuserver.it/wp-content/uploads/2014/08/vlan-unifi-esempio-300x110.jpeg" alt="vlan-unifi-esempio" width="300" height="110" /></a></p>
<p>Una volta finita la configurazione lato UniFI proviamo a collegarci alle singole vlan e vediamo se il traffico ruota in maniera corretta.</p>
<p>Spero l&#8217;articolo sia utile a molti visto che per questo tipo di configurazione ho avuto difficoltà a reperire le informazioni su internet <img src="http://www.linux360.it/wp-includes/images/smilies/icon_wink.gif" alt=";-)" class="wp-smiley" /> </p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/08/29/configurazione-multisid-vlan-tra-ubiquiti-unifi-e-mikrotik-crs-125/">Configurazione MultiSid + Vlan tra Ubiquiti UniFi e Mikrotik CRS-125</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/08/29/configurazione-multisid-vlan-tra-ubiquiti-unifi-e-mikrotik-crs-125/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitoraggio Devices Poe-out tramite una Mikrotik 750UP</title>
		<link>http://www.linux360.it/2014/08/21/monitoraggio-devices-poe-out-tramite-una-mikrotik-750up-2/</link>
		<comments>http://www.linux360.it/2014/08/21/monitoraggio-devices-poe-out-tramite-una-mikrotik-750up-2/#comments</comments>
		<pubDate>Thu, 21 Aug 2014 17:24:17 +0000</pubDate>
		<dc:creator><![CDATA[Francesco Gabriele]]></dc:creator>
				<category><![CDATA[Mikrotik]]></category>
		<category><![CDATA[750UP]]></category>
		<category><![CDATA[Mikrotik750UP]]></category>
		<category><![CDATA[POE-injector]]></category>
		<category><![CDATA[PoeOut]]></category>

		<guid isPermaLink="false">http://www.ubuntuserver.it/?p=640</guid>
		<description><![CDATA[<p>La Mikrotik 750UP è l&#8217;evoluzione della storica 750 con l&#8217;aggiunta di caratteristiche molto interessanti. Oltre ad essere alimentabile via POE (occhio, passivo e quindi non 802.3af) ossia tramite alimentazione su cavo LAN(ether1), ha le porte dalle 2 alla 5 che sono delle porte POE-injector(POE-Out) ossia possono alimentare a loro volta 4 apparati POE  fino ad ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/08/21/monitoraggio-devices-poe-out-tramite-una-mikrotik-750up-2/">Monitoraggio Devices Poe-out tramite una Mikrotik 750UP</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>La Mikrotik 750UP è l&#8217;evoluzione della storica 750 con l&#8217;aggiunta di caratteristiche molto interessanti. Oltre ad essere alimentabile via POE (occhio, passivo e quindi non 802.3af) ossia tramite alimentazione su cavo LAN(ether1), ha le porte dalle 2 alla 5 che sono delle porte POE-injector(POE-Out) ossia possono alimentare a loro volta 4 apparati POE  fino ad un massimo di assorbimento per porta di 1A. Proprio di questa ultima funzionalità andremo a parlare, e nel dettaglio implementeremo uno script che pingherà i devices alimentati sulle porte poe-out e se non rispondo a X ping verra tolta la corrente e rimessa per riavviarli.</p>
<p>Procediamo creando uno nuovo script sotto system -&gt; script<br />
che chiameremo <strong>PoeCheckPing</strong></p>
<p># <strong>Qui mettiamo l&#8217;ip del device da pingare</strong><br />
:local PingAddress 192.168.20.2</p>
<p># <strong>Qui inseriamo i tentativi di ping prima di spegnere e riaccendere la porta</strong><br />
:local PingCount 5</p>
<p># <strong>Qui specifichiamo quale porta vogliamo riavviare</strong><br />
:local PoEPort ether5</p>
<p># <strong>Qui specifichiamo il tempo di spegnimento della porta prima di riaccenderla</strong><br />
:local PoETime 10</p>
<p># <strong>Qui impostiamo la riaccensione della porta</strong><br />
:local PortState forced-on</p>
<p># <strong>Qui mettiamo i parametri per l&#8217;invio dell&#8217;email avvisandoci del cambio di stato</strong></p>
<p>:local EmailAddress francesco.gabriele@gmail.com<br />
:local SMTPServer smtp.baleno.it<br />
:local SMTPUser email@baleno.it<br />
:local SMTPPassword b4l3n0</p>
<p>{<br />
:if ([/ping $PingAddress count=$PingCount] = 0) do={<br />
/interface ethernet set $PoEPort poe-out=off<br />
delay $PoETime<br />
/interface ethernet set $PoEPort poe-out=$PortState</p>
<p>/tool e-mail send to=$EmailAddress<br />
subject=&#8221;La Porta $PoEPort è stata riavviata&#8221; server=$SMTPServer<br />
user=$SMTPUser password=$SMTPPassword<br />
}<br />
}</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/08/21/monitoraggio-devices-poe-out-tramite-una-mikrotik-750up-2/">Monitoraggio Devices Poe-out tramite una Mikrotik 750UP</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/08/21/monitoraggio-devices-poe-out-tramite-una-mikrotik-750up-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mikrotik Scripting: Evitare cadute Asterisk causate da Failover</title>
		<link>http://www.linux360.it/2014/06/25/mikrotik-scripting-evitare-cadute-asterisk-causate-failover/</link>
		<comments>http://www.linux360.it/2014/06/25/mikrotik-scripting-evitare-cadute-asterisk-causate-failover/#comments</comments>
		<pubDate>Wed, 25 Jun 2014 15:06:11 +0000</pubDate>
		<dc:creator><![CDATA[Paolo Daniele]]></dc:creator>
				<category><![CDATA[Mikrotik]]></category>
		<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[mikrotik]]></category>
		<category><![CDATA[routerOS]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.paolodaniele.it/?p=1914</guid>
		<description><![CDATA[<p>Ciao Ragazzi, oggi vi mostro alcuni trucchi di scripting Mikrotik! Supponiamo di avere 2 Connessioni internet (es. due gestori diversi per avere banda ridondata) e un dispositivo Mikrotik che gestisce il failover, ossia quando cade la primaria effettua in automatico lo switch sulla secondaria. Fino a qua non ci sono problemi. Cosa succede se abbiamo ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/06/25/mikrotik-scripting-evitare-cadute-asterisk-causate-failover/">Mikrotik Scripting: Evitare cadute Asterisk causate da Failover</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Ciao Ragazzi,</p>
<p>oggi vi mostro alcuni trucchi di scripting Mikrotik!</p>
<p>Supponiamo di avere 2 Connessioni internet (es. due gestori diversi per avere banda ridondata) e un dispositivo Mikrotik che gestisce il failover, ossia quando cade la primaria effettua in automatico lo switch sulla secondaria.</p>
<p>Fino a qua non ci sono problemi. Cosa succede se abbiamo un centralino VoIP con Asterisk.</p>
<p>Se cade la connessione primaria e switchamo sulla secondaria, si verifica il problema che le connessioni voip rimangono appese sulla primaria e quindi il problema persiste perchè non funziona la parte telefonica anche se la connessione c&#8217;è.</p>
<p>Come risolvere questo problema?</p>
<p>Andiamo a programmare!!</p>
<p>Per prima cosa vi spiego l&#8217;idea alla base dello script.</p>
<p>Periodicamente effettuiamo un check ping su due indirizzi ip (ovviamente su due reti geografiche diverse). Se il ping è ok non succede niente, il sistema continua a funzionare.</p>
<p>Quando entrambi i ping falliscono, vuol dire che abbiamo perso la connessione primaria (es. Adsl down, problemi in centrale e robe simili): questo fa da trigger al nostro script!</p>
<p>Il primo script, che chiameremo &#8220;Check Script&#8221;, disabilità l&#8217;interfaccia primaria (quella down per capirci) e ci manda una mail indicando il problema e su quale apparato è avvenuto.</p>
<p>Dopo 3 secondi riavvia il router.</p>
<p>Al riavvio entra in funzione il secondo script, che chiameremo &#8220;Restart Script&#8221;, che dopo 10 sec (il tempo necessario a far ripartire totalmente il device) controlla se l&#8217;interfaccia primaria è ritornata funzionante (es. se uno riavvia il router per qualunque motivo non è che deve ogni volta disabilitare/abilitare le interfacce di rete!)</p>
<p>Se è disabilitata e non è ritornata su, allora le viene assegnata priorità/distanza 3 (quindi l&#8217;interfaccia secondaria diventa la Master) e la riabilita per provare a vedere se è ritornata attiva.</p>
<p>Se i ping sono apposto cambia la distanza a 1 e torna tutto come prima, se i ping falliscono allora la connessione rimane up sulla interfaccia secondaria.</p>
<p>Sotto questo scenario le chiamate voip, tranne per il breve momento necessario al riavvio della Mikrotik, continueranno a funzionare!</p>
<p>Ecco i due script:</p>
<p><strong>CHECK SCRIPT</strong></p>
<div id="wpshdo_9" class="wp-synhighlighter-outer"><div id="wpshdt_9" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_9"></a><a id="wpshat_9" class="wp-synhighlighter-title" href="#codesyntax_9"  onClick="javascript:wpsh_toggleBlock(9)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_9" onClick="javascript:wpsh_code(9)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_9" onClick="javascript:wpsh_print(9)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_9" class="wp-synhighlighter-inner" style="display: block;"><pre class="powershell" style="font-family:monospace;">:global strDate <span class="br0">[</span><span class="sy0">/</span>system clock get date<span class="br0">]</span>
:global strTime <span class="br0">[</span><span class="sy0">/</span>system clock get time<span class="br0">]</span>
:global strSystemName <span class="br0">[</span><span class="sy0">/</span>system identity get name<span class="br0">]</span>
&nbsp;
&nbsp;
:<span class="kw3">if</span> <span class="br0">&#40;</span><span class="br0">[</span><span class="sy0">/</span>ping 10.104.7.187 interface<span class="sy0">=</span>pppoe<span class="sy0">-</span>out1 count<span class="sy0">=</span><span class="nu0">5</span><span class="br0">]</span> <span class="sy0">=</span> <span class="nu0">0</span> <span class="sy0">&amp;&amp;</span> <span class="br0">[</span><span class="sy0">/</span>ping 8.8.4.4 interface<span class="sy0">=</span>pppoe<span class="sy0">-</span>out1 count<span class="sy0">=</span><span class="nu0">5</span><span class="br0">]</span> <span class="sy0">=</span> <span class="nu0">0</span> <span class="sy0">&amp;&amp;</span> <span class="br0">[</span><span class="sy0">/</span>ip route get <span class="br0">[</span>find comment<span class="sy0">=</span><span class="st0">&quot;Primary&quot;</span><span class="br0">]</span> disabled<span class="br0">]</span><span class="sy0">=</span>false<span class="br0">&#41;</span> <span class="kw3">do</span><span class="sy0">=</span><span class="br0">&#123;</span>
    :log info <span class="st0">&quot;Disabling Primary&quot;</span>;
    <span class="sy0">/</span>ip route <span class="kw2">set</span> <span class="br0">[</span>find comment<span class="sy0">=</span><span class="st0">&quot;Primary&quot;</span><span class="br0">]</span> disabled<span class="sy0">=</span>yes
    <span class="sy0">/</span>tool e<span class="sy0">-</span>mail send from<span class="sy0">=</span><span class="st0">&quot;yyyyy@gmail.com&quot;</span> to<span class="sy0">=</span><span class="st0">&quot;xxxx@gmail.com&quot;</span> subject<span class="sy0">=</span><span class="st0">&quot;Route Failover - $strDate $strTime - $strSystemName&quot;</span> body<span class="sy0">=</span><span class="st0">&quot;Failover to Telecom occurred at $strDate $strTime on $strSystemName&quot;</span>
    :delay 3
    <span class="sy0">/</span>system reboot
&nbsp;
<span class="br0">&#125;</span> <span class="kw3">else</span><span class="sy0">=</span> <span class="br0">&#123;</span>
    :log info <span class="st0">&quot;No Failover Necessary&quot;</span>;
<span class="br0">&#125;</span></pre></div></div>
<p>&nbsp;</p>
<p><strong>RESTART SCRIPT</strong></p>
<div id="wpshdo_10" class="wp-synhighlighter-outer"><div id="wpshdt_10" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_10"></a><a id="wpshat_10" class="wp-synhighlighter-title" href="#codesyntax_10"  onClick="javascript:wpsh_toggleBlock(10)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_10" onClick="javascript:wpsh_code(10)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_10" onClick="javascript:wpsh_print(10)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_10" class="wp-synhighlighter-inner" style="display: block;"><pre class="powershell" style="font-family:monospace;">:delay <span class="nu0">10</span>;
:<span class="kw3">if</span> <span class="br0">&#40;</span><span class="br0">[</span><span class="sy0">/</span>ip route get <span class="br0">[</span>find comment<span class="sy0">=</span><span class="st0">&quot;Primary&quot;</span><span class="br0">]</span> disabled<span class="br0">]</span><span class="sy0">=</span>true<span class="br0">&#41;</span> <span class="kw3">do</span><span class="sy0">=</span><span class="br0">&#123;</span>
    <span class="sy0">/</span>interface ethernet <span class="kw2">set</span> numbers<span class="sy0">=</span>4 disabled<span class="sy0">=</span>no
   
     <span class="sy0">/</span>ip route <span class="kw2">set</span> <span class="br0">[</span>find comment<span class="sy0">=</span><span class="st0">&quot;Primary&quot;</span><span class="br0">]</span> disabled<span class="sy0">=</span>no
     <span class="sy0">/</span>ip route <span class="kw2">set</span> <span class="br0">[</span>find comment<span class="sy0">=</span><span class="st0">&quot;Primary&quot;</span><span class="br0">]</span> distance<span class="sy0">=</span>3
    :delay 10
    :<span class="kw3">if</span> <span class="br0">&#40;</span><span class="br0">[</span><span class="sy0">/</span>ping 10.104.7.187 routing<span class="sy0">-</span>table<span class="sy0">=</span>Primary count<span class="sy0">=</span>5<span class="br0">]</span> <span class="sy0">&gt;</span> 0 <span class="sy0">&amp;&amp;</span> <span class="br0">[</span><span class="sy0">/</span>ping 8.8.4.4 routing<span class="sy0">-</span>table<span class="sy0">=</span>Primary count<span class="sy0">=</span>5<span class="br0">]</span> <span class="sy0">&gt;</span> 0<span class="br0">&#41;</span> <span class="kw3">do</span><span class="sy0">=</span><span class="br0">&#123;</span>
&nbsp;
       <span class="sy0">/</span>ip route <span class="kw2">set</span> <span class="br0">[</span>find comment<span class="sy0">=</span><span class="st0">&quot;Primary&quot;</span><span class="br0">]</span> distance<span class="sy0">=</span>1
       <span class="sy0">/</span>system reboot
    <span class="br0">&#125;</span>
     <span class="kw3">else</span><span class="sy0">=</span> <span class="br0">&#123;</span>
       
        <span class="sy0">/</span>ip route <span class="kw2">set</span> <span class="br0">[</span>find comment<span class="sy0">=</span><span class="st0">&quot;Primary&quot;</span><span class="br0">]</span> distance<span class="sy0">=</span>3
&nbsp;
    <span class="br0">&#125;</span>
<span class="br0">&#125;</span> <span class="kw3">else</span><span class="sy0">=</span> <span class="br0">&#123;</span>
    :log info <span class="st0">&quot;No Failover Necessary&quot;</span>;
<span class="br0">&#125;</span></pre></div></div>
<p>Enjoy!</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/06/25/mikrotik-scripting-evitare-cadute-asterisk-causate-failover/">Mikrotik Scripting: Evitare cadute Asterisk causate da Failover</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/06/25/mikrotik-scripting-evitare-cadute-asterisk-causate-failover/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configurazione Punto &#8211; Punto WDS Mikrotik</title>
		<link>http://www.linux360.it/2014/05/21/configurazione-punto-punto-wds-mikrotik/</link>
		<comments>http://www.linux360.it/2014/05/21/configurazione-punto-punto-wds-mikrotik/#comments</comments>
		<pubDate>Wed, 21 May 2014 09:18:10 +0000</pubDate>
		<dc:creator><![CDATA[Francesco Gabriele]]></dc:creator>
				<category><![CDATA[Mikrotik]]></category>
		<category><![CDATA[mikrotik]]></category>
		<category><![CDATA[wds mikrotik]]></category>

		<guid isPermaLink="false">http://www.ubuntuserver.it/?p=617</guid>
		<description><![CDATA[<p>In questo esempio fornisce uno script di configurazione MikroTik di base per due Access Point configurati in WDS. Questo script è perfetto per creare un ponte in layer2 tra due punti che utilizzano MikroTik. È possibile incollare questo script direttamente in una finestra &#8220;New Terminal&#8221; o configurare ogni passo individualmente in Winbox, la struttura dei ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/05/21/configurazione-punto-punto-wds-mikrotik/">Configurazione Punto &#8211; Punto WDS Mikrotik</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p><span id="result_box" lang="it"><span class="hps">In questo esempio</span> <span class="hps">fornisce</span> <span class="hps">uno script di configurazione</span> <span class="hps">MikroTik</span> <span class="hps">di base</span> <span class="hps">per</span> <span class="hps">due Access Point configurati in WDS</span>. <span class="hps">Questo script è perfetto per</span> <span class="hps">creare un ponte</span> in <span class="hps">layer2</span> <span class="hps">tra due</span> punti<span class="hps"> che utilizzano</span> <span class="hps">MikroTik</span>.<br />
</span><span id="result_box" lang="it"></span><span id="result_box" lang="it"></span><span id="result_box" lang="it"></span></p>
<p><span id="result_box" lang="it"><span class="hps">È possibile incollare</span> <span class="hps">questo script</span> <span class="hps">direttamente in una</span> <span class="hps atn">finestra &#8220;New </span>Terminal&#8221; o <span class="hps">configurare ogni</span> <span class="hps">passo</span> <span class="hps">individualmente in</span> <span class="hps">Winbox,</span> <span class="hps">la struttura</span> <span class="hps">dei comandi </span><span class="hps">riflette</span> <span class="hps">il menu</span> <span class="hps">Winbox</span>. <span class="hps">Tutte le linee</span> <span class="hps">che iniziano</span> <span class="hps atn">con un &#8220;</span>#&#8221; essendo commenti <span class="hps">vengono ignorate da</span> <span class="hps">MikroTik.</span><br />
</span></p>
<p><span id="result_box" lang="it"><span class="hps">La</span> <span class="hps">configurazione di rete wireless</span> <span class="hps">varia a seconda</span> <span class="hps">del tipo di RouterBoard che si utilizza</span> <span class="hps">e quindi la configurazione </span></span><span id="result_box" lang="it"><span class="hps">può richiedere</span> <span class="hps">qualche ritocco</span>.</span></p>
<p><strong>Configurazione Ap Principale:</strong><br />
# Access Point WDS<br />
#<br />
### Create Bridge Interface ###<br />
/interface bridge<br />
add name=wds-bridge comment=wds-bridge-interface disabled=no</p>
<p>### Add ether1 to the Bridge###<br />
/interface bridge port<br />
add interface=ether1 bridge=wds-bridge</p>
<p>### Create Wireless Security Profile ###<br />
/interface wireless security-profiles<br />
add mode=dynamic-keys authentication-types=wpa2-psk group-ciphers=aes-ccm name=wifi_baleno unicast-ciphers=aes-ccm wpa2-pre-shared-key=&#8221;balenowireless&#8221;</p>
<p>### Wireless Network Configuration ###<br />
/interface wireless<br />
set 0 band=5ghz-a/n channel-width=20/40mhz-ht-above disabled=no frequency=5765 mode=bridge security-profile=wifi_baleno ssid=&#8221;Baleno WDS Bridge&#8221; wds-default-bridge=wds-bridge wds-mode=dynamic wireless-protocol=nv2 ht-txchains=0,1 ht-rxchains=0,1</p>
<p>### IP Address of Bridge Interface ###<br />
/ip address<br />
add address=192.168.88.101/24 interface=wds-bridge</p>
<p>### Disable firewall connection tracking to reduce overhead ###<br />
/ip firewall<br />
connection tracking set enabled=no</p>
<p>### Set Hostname ###<br />
/system identity<br />
set name=AP-BALENO-WDS</p>
<p>### End of configuration ###</p>
<p><strong>Configurazione AP Secondario:</strong><br />
# Station WDS<br />
#<br />
### Create Bridge Interface ###<br />
/interface bridge<br />
add name=wds-bridge comment=wds-bridge-interface disabled=no</p>
<p>### Add ether1 and wlan1 to the Bridge###<br />
/interface bridge port<br />
add interface=ether1 bridge=wds-bridge<br />
add interface=wlan1 bridge=wds-bridge</p>
<p>### Create Wireless Security Profile ###<br />
/interface wireless security-profiles<br />
add authentication-types=wpa2-psk group-ciphers=aes-ccm name=wifi_security unicast-ciphers=aes-ccm wpa2-pre-shared-key=&#8221;balenowireless&#8221;</p>
<p>### Wireless Network Configuration ###<br />
/interface wireless<br />
set 0 band=5ghz-a/n channel-width=20/40mhz-ht-above mode=station-wds security-profile=wifi_baleno ssid=&#8221;Baleno WDS Bridge&#8221; wireless-protocol=nv2-nstreme-802.11 disabled=no ht-txchains=0,1 ht-rxchains=0,1</p>
<p>### IP Address of Bridge Interface ###<br />
/ip address<br />
add address=192.168.88.102/24 interface=wds-bridge</p>
<p>### Disable firewall connection tracking to reduce overhead ###<br />
/ip firewall<br />
connection tracking set enabled=no</p>
<p>### Set Hostname ###<br />
/system identity<br />
set name=ST-BALENO-WDS</p>
<p>### End of configuration ###</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/05/21/configurazione-punto-punto-wds-mikrotik/">Configurazione Punto &#8211; Punto WDS Mikrotik</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/05/21/configurazione-punto-punto-wds-mikrotik/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configurazione MultiSid + Vlan tra Ubiquiti Unifi e Routerboard Mikrotik</title>
		<link>http://www.linux360.it/2014/05/20/configurazione-multisid-vlan-tra-ubiquiti-unifi-e-routerboard-mikrotik/</link>
		<comments>http://www.linux360.it/2014/05/20/configurazione-multisid-vlan-tra-ubiquiti-unifi-e-routerboard-mikrotik/#comments</comments>
		<pubDate>Tue, 20 May 2014 15:38:41 +0000</pubDate>
		<dc:creator><![CDATA[Francesco Gabriele]]></dc:creator>
				<category><![CDATA[Mikrotik]]></category>
		<category><![CDATA[mikrotik]]></category>
		<category><![CDATA[ubiquiti unifi]]></category>
		<category><![CDATA[vlan mikrotik]]></category>
		<category><![CDATA[vlan unifi]]></category>

		<guid isPermaLink="false">http://www.ubuntuserver.it/?p=584</guid>
		<description><![CDATA[<p>L’altro giorno mi è capitato di fare una config un po particolare, e visto che ci ho sbattuto per farla volevo condividerla con il mondo In questo esempio vi mostrerò come configurare 3 interfacce con la propria sottorete ed il proprio dhcp-server utilizzando una antenna Ubiquiti Unifi ed una RouterBoard Mikrotik 1000. Queste reti sono ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/05/20/configurazione-multisid-vlan-tra-ubiquiti-unifi-e-routerboard-mikrotik/">Configurazione MultiSid + Vlan tra Ubiquiti Unifi e Routerboard Mikrotik</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>L’altro giorno mi è capitato di fare una config un po particolare, e visto che ci ho sbattuto per farla volevo condividerla con il mondo <img src="http://www.linux360.it/wp-includes/images/smilies/icon_smile.gif" alt=":-)" class="wp-smiley" /><br />
In questo esempio vi mostrerò come configurare 3 interfacce con la propria sottorete ed il proprio dhcp-server utilizzando una antenna<br />
Ubiquiti Unifi ed una RouterBoard Mikrotik 1000.<br />
Queste reti sono due interfacce fisiche e due vlan, le fisiche saranno ether3 ed ether4 mentre le vlan sono 10 e 20.<br />
La porta ether4 sarà configurata come trunk per l’Unifi e trasporterà due Vlan la 10 e la 20 mentre la ether3<br />
sara configurata con la network di management senza tag così da poter raggiungere il software il computer dove<br />
è installato il software per il controllo degli ap UniFI.</p>
<p>&nbsp;</p>
<p><strong>Fase 1 &#8211; Configurazione RouterBoard Mikrotik</strong></p>
<p>/interface bridge<br />
add l2mtu=1598 name=lan<br />
add l2mtu=1594 name=vlan10<br />
add l2mtu=1594 name=vlan20</p>
<p>/interface vlan<br />
add interface=ether4 l2mtu=1594 name=vl-lan10-ether4 vlan-id=10<br />
add interface=ether4 l2mtu=1594 name=vl-lan20-ether4 vlan-id=20</p>
<p>/ip dns<br />
set allow-remote-requests=yes servers=8.8.4.4,208.67.220.220<br />
/ip dns static<br />
add address=192.168.9.100 name=unifi</p>
<p>/interface bridge port<br />
add bridge=lan interface=ether3<br />
add bridge=lan interface=ether4<br />
add bridge=vlan10 interface=vl-lan10-ether4<br />
add bridge=vlan20 interface=vl-lan20-ether4</p>
<p>/ip neighbor discovery<br />
set vl-lan10-ether4 discover=no<br />
set vl-lan20-ether4 discover=no</p>
<p>/ip pool<br />
add name=dhcp_lan ranges=192.168.9.2-192.168.9.254<br />
add name=dhcp_vlan10 ranges=192.168.10.2-192.168.10.254<br />
add name=dhcp_vlan20 ranges=192.168.20.2-192.168.20.254</p>
<p>/ip dhcp-server<br />
add address-pool=dhcp_lan disabled=no interface=lan name=dhcp_lan<br />
add address-pool=dhcp_vlan10 disabled=no interface=vlan10 name=dhcp_vlan10<br />
add address-pool=dhcp_vlan20 disabled=no interface=vlan20 name=dhcp_vlan20</p>
<p>/ip address<br />
add address=192.168.9.1/24 interface=lan network=192.168.9.0<br />
add address=192.168.10.1/24 interface=vlan10 network=192.168.10.0<br />
add address=192.168.20.1/24 interface=vlan20 network=192.168.20.0</p>
<p>/ip dhcp-server network<br />
add address=192.168.9.0/24 dhcp-option=unifi dns-server=192.168.9.1 gateway=<br />
192.168.9.1<br />
add address=192.168.10.0/24 dhcp-option=unifi dns-server=192.168.10.1 gateway=<br />
192.168.10.1<br />
add address=192.168.20.0/24 dhcp-option=unifi dns-server=192.168.20.1 gateway=<br />
192.168.20.1</p>
<p>&nbsp;</p>
<p><strong>Fase &#8211; Configurazione del controller Unifi:</strong></p>
<p>Video di esempio dove mostra gli step di una prima configurazione del controller</p>
[topswf swf='http://www.ubuntuserver.it/wp-content/uploads/2014/05/unifi_wizard.swf' width='450' height='300']
<p>&nbsp;</p>
<p>Colleghiamoci con il PC dove è installato il software Ubiquiti sulla porta ether3 ed impostiamo sulla nostra interfaccia di rete l’ip 192.168.9.100/24 con gateway 192.168.9.1. Apriamo il browser all&#8217;indirizzo https://localhost:8443 ed eseguiamo il Wizard della prima configurazione, dopo aver terminato il wizard andiamo in Settings &#8211; Wlan Group ed aggiungiamo un ESSID WIFI-MGM senza vlan così farà parte della network 192.168.9.0/24 così riuscita a comunicare con il controller senza traffico taggato. Dopo aggiungeremo altri due ESSID WIFI-VLAN10 e WIFI-VLAN20 con le rispettive vlan 10 e 20, ed avranno le network 192.168.10.0/24 e 192.168.20.0/24, fatto questo se ci colleghiamo in Wifi ad ogni singolo ESSID avremo accesso a network diverse e sulla nostra Mikrotik possiamo fare quello che vogliamo ad ex. Hotspot sulla VLAN10 oppure regole di Banda o di accesso alle singole network.</p>
<p>Spero possa essere utile a molti <img src="http://www.linux360.it/wp-includes/images/smilies/icon_biggrin.gif" alt=":-D" class="wp-smiley" /> </p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/05/20/configurazione-multisid-vlan-tra-ubiquiti-unifi-e-routerboard-mikrotik/">Configurazione MultiSid + Vlan tra Ubiquiti Unifi e Routerboard Mikrotik</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/05/20/configurazione-multisid-vlan-tra-ubiquiti-unifi-e-routerboard-mikrotik/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mikrotik Scripting: Queue Tree Limit Exceeded</title>
		<link>http://www.linux360.it/2014/05/10/mikrotik-scripting-queue-tree-limit-exceeded-2/</link>
		<comments>http://www.linux360.it/2014/05/10/mikrotik-scripting-queue-tree-limit-exceeded-2/#comments</comments>
		<pubDate>Sat, 10 May 2014 16:11:18 +0000</pubDate>
		<dc:creator><![CDATA[Paolo Daniele]]></dc:creator>
				<category><![CDATA[Mikrotik]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Programmazione]]></category>

		<guid isPermaLink="false">http://www.paolodaniele.it/?p=1879</guid>
		<description><![CDATA[<p>Today i&#8217;ll show you a little script for RouterOS to check if queue tree exceed the limit you set. For. Example i&#8217;ve a queue tree that limit the amount o total traffic(Upload+Download) to 50MBps I want to know whenever this queue exceed the limit, and i want the system to send me an email. This ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/05/10/mikrotik-scripting-queue-tree-limit-exceeded-2/">Mikrotik Scripting: Queue Tree Limit Exceeded</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Today i&#8217;ll show you a little script for RouterOS to check if queue tree exceed the limit you set.</p>
<p>For. Example i&#8217;ve a queue tree that limit the amount o total traffic(Upload+Download) to 50MBps</p>
<p>I want to know whenever this queue exceed the limit, and i want the system to send me an email.</p>
<p>This is the script:</p>
<div id="wpshdo_11" class="wp-synhighlighter-outer"><div id="wpshdt_11" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_11"></a><a id="wpshat_11" class="wp-synhighlighter-title" href="#codesyntax_11"  onClick="javascript:wpsh_toggleBlock(11)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_11" onClick="javascript:wpsh_code(11)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_11" onClick="javascript:wpsh_print(11)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_11" class="wp-synhighlighter-inner" style="display: block;"><ol class="php" style="font-family:monospace;"><li class="li1"><div class="de1"><span class="sy0">:</span><span class="kw2">global</span> checkrate <span class="br0">[</span><span class="sy0">/</span>queue tree get total<span class="sy0">-</span>traffic rate<span class="br0">]</span></div></li>
<li class="li1"><div class="de1"><span class="sy0">:</span>local limit 50000000</div></li>
<li class="li1"><div class="de1">&nbsp;</div></li>
<li class="li1"><div class="de1"><span class="sy0">:</span><span class="kw1">if</span> <span class="br0">&#40;</span> <span class="re0">$checkrate</span> <span class="sy0">&lt;</span> <span class="re0">$limit</span> <span class="br0">&#41;</span> <span class="kw1">do</span><span class="sy0">=</span><span class="br0">&#123;</span></div></li>
<li class="li1"><div class="de1"><span class="sy0">:</span><a href="http://www.php.net/log"><span class="kw3">log</span></a> info <span class="br0">&#40;</span><span class="st0">&quot;Queue not Exceeded&quot;</span><span class="br0">&#41;</span></div></li>
<li class="li1"><div class="de1"><span class="br0">&#125;</span></div></li>
<li class="li1"><div class="de1"><span class="sy0">:</span><span class="kw1">if</span> <span class="br0">&#40;</span> <span class="re0">$checkrate</span> <span class="sy0">&gt;</span> <span class="re0">$limit</span> <span class="br0">&#41;</span> <span class="kw1">do</span><span class="sy0">=</span><span class="br0">&#123;</span></div></li>
<li class="li1"><div class="de1"><span class="sy0">:</span><a href="http://www.php.net/log"><span class="kw3">log</span></a> info <span class="br0">&#40;</span><span class="st0">&quot;Queue Exceeded&quot;</span><span class="br0">&#41;</span></div></li>
<li class="li1"><div class="de1"><span class="sy0">/</span>tool e<span class="sy0">-</span><a href="http://www.php.net/mail"><span class="kw3">mail</span></a> send server<span class="sy0">=</span>xxx<span class="sy0">.</span>xxx<span class="sy0">.</span>xxx<span class="sy0">.</span>xxx from<span class="sy0">=</span><span class="st0">&quot;me@myself.com&quot;</span> to<span class="sy0">=</span><span class="st0">&quot;me@myself.com&quot;</span> subject<span class="sy0">=</span><span class="br0">&#40;</span><span class="st0">&quot;Queue Limit Exceed&quot;</span><span class="br0">&#41;</span> body<span class="sy0">=</span><span class="br0">&#40;</span><span class="st0">&quot;Queue Limit Exceed, Limit is: &quot;</span> <span class="sy0">.</span> <span class="re0">$checkrate</span><span class="br0">&#41;</span></div></li>
<li class="li1"><div class="de1"><span class="br0">&#125;</span></div></li>
</ol></div></div>
<p>&nbsp;</p>
<p>I&#8217;ll explain the code:</p>
<p>First i define a variable <strong>checkrate</strong> that represent the instant rate of the queue tree named <strong>total-traffic</strong> then i define a <strong>limit</strong>(this case i&#8217;ve used 50Mbps) then i check if rate less than limit do nothing or just log to test the script.</p>
<p>If checkrate greater than limit send an email to myself.</p>
<p>Be sure to specify as email server an IP address and not the name of the server(ex. mail.myself.com)</p>
<p>Enjoy!</p>
<p>&nbsp;</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/05/10/mikrotik-scripting-queue-tree-limit-exceeded-2/">Mikrotik Scripting: Queue Tree Limit Exceeded</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/05/10/mikrotik-scripting-queue-tree-limit-exceeded-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mikrotik Scripting: Queue Tree Limit Exceeded</title>
		<link>http://www.linux360.it/2014/05/10/mikrotik-scripting-queue-tree-limit-exceeded/</link>
		<comments>http://www.linux360.it/2014/05/10/mikrotik-scripting-queue-tree-limit-exceeded/#comments</comments>
		<pubDate>Sat, 10 May 2014 16:10:36 +0000</pubDate>
		<dc:creator><![CDATA[Paolo Daniele]]></dc:creator>
				<category><![CDATA[Mikrotik]]></category>
		<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[mikrotik]]></category>
		<category><![CDATA[queue tree]]></category>
		<category><![CDATA[routerOS]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.paolodaniele.it/?p=1877</guid>
		<description><![CDATA[<p>Today i&#8217;ll show you a little script for RouterOS to check if queue tree exceed the limit you set. For. Example i&#8217;ve a queue tree that limit the amount o total traffic(Upload+Download) to 50MBps I want to know whenever this queue exceed the limit, and i want the system to send me an email. This ...</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/05/10/mikrotik-scripting-queue-tree-limit-exceeded/">Mikrotik Scripting: Queue Tree Limit Exceeded</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Today i&#8217;ll show you a little script for RouterOS to check if queue tree exceed the limit you set.</p>
<p>For. Example i&#8217;ve a queue tree that limit the amount o total traffic(Upload+Download) to 50MBps</p>
<p>I want to know whenever this queue exceed the limit, and i want the system to send me an email.</p>
<p>This is the script:</p>
<div id="wpshdo_12" class="wp-synhighlighter-outer"><div id="wpshdt_12" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_12"></a><a id="wpshat_12" class="wp-synhighlighter-title" href="#codesyntax_12"  onClick="javascript:wpsh_toggleBlock(12)" title="Click to show/hide code block">Source code</a></td><td align="right"><a href="#codesyntax_12" onClick="javascript:wpsh_code(12)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_12" onClick="javascript:wpsh_print(12)" title="Print code"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.linux360.it/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.linux360.it/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_12" class="wp-synhighlighter-inner" style="display: block;"><ol class="php" style="font-family:monospace;"><li class="li1"><div class="de1"><span class="sy0">:</span><span class="kw2">global</span> checkrate <span class="br0">[</span><span class="sy0">/</span>queue tree get total<span class="sy0">-</span>traffic rate<span class="br0">]</span></div></li>
<li class="li1"><div class="de1"><span class="sy0">:</span>local limit 50000000</div></li>
<li class="li1"><div class="de1">&nbsp;</div></li>
<li class="li1"><div class="de1"><span class="sy0">:</span><span class="kw1">if</span> <span class="br0">&#40;</span> <span class="re0">$checkrate</span> <span class="sy0">&lt;</span> <span class="re0">$limit</span> <span class="br0">&#41;</span> <span class="kw1">do</span><span class="sy0">=</span><span class="br0">&#123;</span></div></li>
<li class="li1"><div class="de1"><span class="sy0">:</span><a href="http://www.php.net/log"><span class="kw3">log</span></a> info <span class="br0">&#40;</span><span class="st0">&quot;Queue not Exceeded&quot;</span><span class="br0">&#41;</span></div></li>
<li class="li1"><div class="de1"><span class="br0">&#125;</span></div></li>
<li class="li1"><div class="de1"><span class="sy0">:</span><span class="kw1">if</span> <span class="br0">&#40;</span> <span class="re0">$checkrate</span> <span class="sy0">&gt;</span> <span class="re0">$limit</span> <span class="br0">&#41;</span> <span class="kw1">do</span><span class="sy0">=</span><span class="br0">&#123;</span></div></li>
<li class="li1"><div class="de1"><span class="sy0">:</span><a href="http://www.php.net/log"><span class="kw3">log</span></a> info <span class="br0">&#40;</span><span class="st0">&quot;Queue Exceeded&quot;</span><span class="br0">&#41;</span></div></li>
<li class="li1"><div class="de1"><span class="sy0">/</span>tool e<span class="sy0">-</span><a href="http://www.php.net/mail"><span class="kw3">mail</span></a> send server<span class="sy0">=</span>xxx<span class="sy0">.</span>xxx<span class="sy0">.</span>xxx<span class="sy0">.</span>xxx from<span class="sy0">=</span><span class="st0">&quot;me@myself.com&quot;</span> to<span class="sy0">=</span><span class="st0">&quot;me@myself.com&quot;</span> subject<span class="sy0">=</span><span class="br0">&#40;</span><span class="st0">&quot;Queue Limit Exceed&quot;</span><span class="br0">&#41;</span> body<span class="sy0">=</span><span class="br0">&#40;</span><span class="st0">&quot;Queue Limit Exceed, Limit is: &quot;</span> <span class="sy0">.</span> <span class="re0">$checkrate</span><span class="br0">&#41;</span></div></li>
<li class="li1"><div class="de1"><span class="br0">&#125;</span></div></li>
</ol></div></div>
<p>&nbsp;</p>
<p>I&#8217;ll explain the code:</p>
<p>First i define a variable <strong>checkrate</strong> that represent the instant rate of the queue tree named <strong>total-traffic</strong> then i define a <strong>limit</strong>(this case i&#8217;ve used 50Mbps) then i check if rate less than limit do nothing or just log to test the script.</p>
<p>If checkrate greater than limit send an email to myself.</p>
<p>Be sure to specify as email server an IP address and not the name of the server(ex. mail.myself.com)</p>
<p>Enjoy!</p>
<p>&nbsp;</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/05/10/mikrotik-scripting-queue-tree-limit-exceeded/">Mikrotik Scripting: Queue Tree Limit Exceeded</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/05/10/mikrotik-scripting-queue-tree-limit-exceeded/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bloccare Teamviewer tramite Mikrotik OS</title>
		<link>http://www.linux360.it/2014/04/18/bloccare-teamviewer-tramite-mikrotik-os/</link>
		<comments>http://www.linux360.it/2014/04/18/bloccare-teamviewer-tramite-mikrotik-os/#comments</comments>
		<pubDate>Fri, 18 Apr 2014 07:59:59 +0000</pubDate>
		<dc:creator><![CDATA[Francesco Gabriele]]></dc:creator>
				<category><![CDATA[Mikrotik]]></category>
		<category><![CDATA[BloccoTeamviewer]]></category>
		<category><![CDATA[mikrotik]]></category>
		<category><![CDATA[Teamviewer]]></category>

		<guid isPermaLink="false">http://www.ubuntuserver.it/?p=510</guid>
		<description><![CDATA[<p>&#160; &#160; &#160; Ciao a tutti, di seguito vi mostro delle semplici regole firewall per bloccare Teamviewer all&#8217;interno della vostra rete: /ip firewall filter add chain=forward action=add-dst-to-address-list protocol=tcp address-list=TeamViewer address-list-timeout=1d dst-port=5938 add chain=forward action=drop src-address-list=TeamViewer add chain=forward action=drop dst-address-list=TeamViewer &#160; &#160;</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/04/18/bloccare-teamviewer-tramite-mikrotik-os/">Bloccare Teamviewer tramite Mikrotik OS</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Ciao a tutti,</p>
<p>di seguito vi mostro delle semplici regole firewall per bloccare Teamviewer all&#8217;interno della vostra rete:</p>
<p>/ip firewall filter<br />
add chain=forward action=add-dst-to-address-list protocol=tcp address-list=TeamViewer<br />
address-list-timeout=1d dst-port=5938<br />
add chain=forward action=drop src-address-list=TeamViewer<br />
add chain=forward action=drop dst-address-list=TeamViewer</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>L'articolo <a rel="nofollow" href="http://www.linux360.it/2014/04/18/bloccare-teamviewer-tramite-mikrotik-os/">Bloccare Teamviewer tramite Mikrotik OS</a> sembra essere il primo su <a rel="nofollow" href="http://www.linux360.it">Linux 360° | Italia</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linux360.it/2014/04/18/bloccare-teamviewer-tramite-mikrotik-os/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
