<?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>commands &#8211; Uroš Vovk</title>
	<atom:link href="https://www.urosvovk.com/tag/commands/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.urosvovk.com</link>
	<description>Uroš Vovk home page</description>
	<lastBuildDate>Thu, 19 Oct 2017 12:03:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>Send telegram messages from Mikrotik RouterOS</title>
		<link>https://www.urosvovk.com/send-telegram-messages-from-mikrotik-routeros/</link>
					<comments>https://www.urosvovk.com/send-telegram-messages-from-mikrotik-routeros/#comments</comments>
		
		<dc:creator><![CDATA[Uroš]]></dc:creator>
		<pubDate>Thu, 19 Oct 2017 12:03:58 +0000</pubDate>
				<category><![CDATA[Network Stuff]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[mikrotik]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[RouterOS]]></category>
		<category><![CDATA[script]]></category>
		<guid isPermaLink="false">http://www.urosvovk.com/?p=841</guid>

					<description><![CDATA[If you are here you probably already know what telegram is. If not you can read about it here. I created a simple script (SendToTelegram) that allows you to send messages to telegram: :global telegramMessage :local botid :local chatid set botid "sdfzgasf7126jwsd7a8s12&#62;" # &#60;- change this set chatid "21156423187" # &#60;- change this if ($telegramMessage &#8230; <a href="https://www.urosvovk.com/send-telegram-messages-from-mikrotik-routeros/" class="more-link">Continue reading <span class="screen-reader-text">Send telegram messages from Mikrotik RouterOS</span></a>]]></description>
										<content:encoded><![CDATA[<p>If you are here you probably already know what telegram is. If not you can read about it <a href="https://telegram.org/" target="_blank" rel="noopener">here</a>.</p>
<p>I created a simple script (SendToTelegram) that allows you to send messages to telegram:</p>
<pre>:global telegramMessage
:local botid
:local chatid

set botid "sdfzgasf7126jwsd7a8s12&gt;" # &lt;- change this
set chatid "21156423187"            # &lt;- change this

if ($telegramMessage != "") do={
   /tool fetch url="https://api.telegram.org/bot$botid/sendMessage\?chat_id=$chatid&amp;text=$telegramMessage" keep-result=no
   set telegramMessage ""
}</pre>
<h3>Usage:</h3>
<p>set your message to telegramMessage global variable</p>
<pre>global telegramMessage "Wolfy was here"</pre>
<p>run script</p>
<pre>/system script run SendToTelegram</pre>
<p>You can use this in combination with netwach:</p>
<p><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-845" src="http://www.urosvovk.com/wp-content/uploads/2017/10/mikrotik-telegram-example.png" alt="" width="445" height="269" srcset="https://www.urosvovk.com/wp-content/uploads/2017/10/mikrotik-telegram-example.png 445w, https://www.urosvovk.com/wp-content/uploads/2017/10/mikrotik-telegram-example-300x181.png 300w" sizes="(max-width: 445px) 100vw, 445px" /></p>
<p>you should recieve a message to your telegram :)</p>
<p><img decoding="async" class="aligncenter size-full wp-image-851" src="http://www.urosvovk.com/wp-content/uploads/2017/10/telegram-example-01.png" alt="" width="607" height="221" srcset="https://www.urosvovk.com/wp-content/uploads/2017/10/telegram-example-01.png 607w, https://www.urosvovk.com/wp-content/uploads/2017/10/telegram-example-01-300x109.png 300w" sizes="(max-width: 607px) 100vw, 607px" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.urosvovk.com/send-telegram-messages-from-mikrotik-routeros/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>gmail configuration for Mikrotik router OS mail</title>
		<link>https://www.urosvovk.com/gmail-configuration-for-mikrotik-router-os-mail/</link>
					<comments>https://www.urosvovk.com/gmail-configuration-for-mikrotik-router-os-mail/#comments</comments>
		
		<dc:creator><![CDATA[Uroš]]></dc:creator>
		<pubDate>Mon, 09 Mar 2015 20:02:26 +0000</pubDate>
				<category><![CDATA[Network Stuff]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[explanation]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mail configuration]]></category>
		<category><![CDATA[mikrotik]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[RouterOS]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[step by step]]></category>
		<category><![CDATA[terminal]]></category>
		<guid isPermaLink="false">http://www.urosvovk.com/?p=720</guid>

					<description><![CDATA[Usually I would say something about the tool that I talk about, but this time a quote from wiki.mikrotik.com (link) will do the job: E-mail tool is the utility that allows to send e-mails from the router. Tool can be used to send regular configuration backups and exports to network administrator. Email tool uses only &#8230; <a href="https://www.urosvovk.com/gmail-configuration-for-mikrotik-router-os-mail/" class="more-link">Continue reading <span class="screen-reader-text">gmail configuration for Mikrotik router OS mail</span></a>]]></description>
										<content:encoded><![CDATA[<p>Usually I would say something about the tool that I talk about, but this time a quote from wiki.mikrotik.com (<a title="wiki" href="http://wiki.mikrotik.com/wiki/Manual:Tools/email">link</a>) will do the job:</p>
<blockquote><p>E-mail tool is the utility that allows to send e-mails from the router. Tool can be used to send regular configuration backups and exports to network administrator.<br />
Email tool uses only plain authentication and tls encryption. Other methods are not supported.</p></blockquote>
<p>All data that you need is here:</p>
<pre>Server:   74.125.136.108 <span style="color: #ff0000;">[smtp.gmail.com] &lt;- you can't use hostname</span>
Port:     587
From:     &lt;your name&gt; &lt;- nice name
User:     &lt;gmail username&gt; &lt;- <span style="color: #ff0000;">without @gmail.com</span>
Password: &lt;gmail password&gt;</pre>
<p>Configuring this tool is very simple, all you need to do is fill your data as shown in the picture</p>
<p><img decoding="async" class="size-full wp-image-723" src="http://www.urosvovk.com/wp-content/uploads/2015/03/IMG000070.png" alt="mail settings" width="535" height="480" srcset="https://www.urosvovk.com/wp-content/uploads/2015/03/IMG000070.png 535w, https://www.urosvovk.com/wp-content/uploads/2015/03/IMG000070-300x269.png 300w" sizes="(max-width: 535px) 100vw, 535px" /></p>
<p>or you can do this in one step from the terminal:</p>
<pre>/tool e-mail set address=74.125.136.108 from="&lt;your name&gt;" password=&lt;gmail password&gt; port=587 start-tls=yes user=&lt;gmail username&gt;</pre>
<p>This is all you need to do&#8230; next time I will write some usage example. If you have some your example, you can leave it in a comment ;)</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.urosvovk.com/gmail-configuration-for-mikrotik-router-os-mail/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>Step by Step: How to configure a PPTP VPN Client on Mikrotik RouterOS</title>
		<link>https://www.urosvovk.com/step-by-step-how-to-configure-a-pptp-vpn-client-on-mikrotik-routeros/</link>
					<comments>https://www.urosvovk.com/step-by-step-how-to-configure-a-pptp-vpn-client-on-mikrotik-routeros/#comments</comments>
		
		<dc:creator><![CDATA[Uroš]]></dc:creator>
		<pubDate>Tue, 16 Sep 2014 16:30:11 +0000</pubDate>
				<category><![CDATA[Network Stuff]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[PPTP]]></category>
		<category><![CDATA[RouterOS]]></category>
		<category><![CDATA[step by step]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[VPN]]></category>
		<category><![CDATA[VPN Client]]></category>
		<guid isPermaLink="false">http://www.urosvovk.com/?p=698</guid>

					<description><![CDATA[Intro Last time I wrote how to configure a PPTP VPN Server on Mikrotik RouterOS Today I will show you how to configure a PPTP VPN Client on Mikrotik RouterOS. Before we start I will try to explain what I want to do&#8230; My home network: 192.168.1.0/24 - Private 192.168.2.0/24 - Public Remote location: 192.168.3.0/24 &#8230; <a href="https://www.urosvovk.com/step-by-step-how-to-configure-a-pptp-vpn-client-on-mikrotik-routeros/" class="more-link">Continue reading <span class="screen-reader-text">Step by Step: How to configure a PPTP VPN Client on Mikrotik RouterOS</span></a>]]></description>
										<content:encoded><![CDATA[<h3>Intro</h3>
<p>Last time I wrote <a title="Step by Step: How to configure a PPTP VPN Server on Mikrotik RouterOS" href="http://www.urosvovk.com/step-by-step-how-to-configure-a-pptp-vpn-server-on-mikrotik-routeros/" target="_blank">how to configure a PPTP VPN Server on Mikrotik RouterOS</a></p>
<p>Today I will show you how to configure a PPTP VPN Client on Mikrotik RouterOS.</p>
<p>Before we start I will try to explain what I want to do&#8230;</p>
<p><strong>My home network:</strong></p>
<pre>192.168.1.0/24 - Private
192.168.2.0/24 - Public</pre>
<p><strong>Remote location:</strong></p>
<pre>192.168.3.0/24</pre>
<p>I would like to establish a VPN connection to the remote location on my Mikrotik router and allow computers (only!) from my private subnet to access computers on the remote location.</p>
<p>This tutorial will explain you how I did this. Here is a simple step by step tutorial with images and all information that you need to get PPTP VPN Client working&#8230;</p>
<h3>Step 1: Create PPTP Client</h3>
<p>Noting special on this step, so I think that the image is enough :)</p>
<p><a href="http://www.urosvovk.com/wp-content/uploads/2014/09/slika-1.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-703" src="http://www.urosvovk.com/wp-content/uploads/2014/09/slika-1.png" alt="slika 1" width="969" height="518" srcset="https://www.urosvovk.com/wp-content/uploads/2014/09/slika-1.png 969w, https://www.urosvovk.com/wp-content/uploads/2014/09/slika-1-300x160.png 300w" sizes="auto, (max-width: 969px) 100vw, 969px" /></a></p>
<h3>Step 2: Configure PPTP Client</h3>
<p>After you created the PPTP Client you will need to enter some basic information:</p>
<ol>
<li>VPN server hostname or IP</li>
<li>VPN username and password</li>
</ol>
<p><a href="http://www.urosvovk.com/wp-content/uploads/2014/09/slika-2.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-704" src="http://www.urosvovk.com/wp-content/uploads/2014/09/slika-2.png" alt="slika 2" width="509" height="442" srcset="https://www.urosvovk.com/wp-content/uploads/2014/09/slika-2.png 509w, https://www.urosvovk.com/wp-content/uploads/2014/09/slika-2-300x260.png 300w" sizes="auto, (max-width: 509px) 100vw, 509px" /></a></p>
<p>then you need a name for the client&#8230;</p>
<p><a href="http://www.urosvovk.com/wp-content/uploads/2014/09/slika-3.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-705" src="http://www.urosvovk.com/wp-content/uploads/2014/09/slika-3.png" alt="slika 3" width="500" height="438" srcset="https://www.urosvovk.com/wp-content/uploads/2014/09/slika-3.png 500w, https://www.urosvovk.com/wp-content/uploads/2014/09/slika-3-300x262.png 300w" sizes="auto, (max-width: 500px) 100vw, 500px" /></a></p>
<p>If you enter the correct information you are already connected to the VPN server</p>
<p>You can now double-click on pptp-client and see the status</p>
<p><a href="http://www.urosvovk.com/wp-content/uploads/2014/09/slika-4.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-706" src="http://www.urosvovk.com/wp-content/uploads/2014/09/slika-4.png" alt="slika 4" width="816" height="635" srcset="https://www.urosvovk.com/wp-content/uploads/2014/09/slika-4.png 816w, https://www.urosvovk.com/wp-content/uploads/2014/09/slika-4-300x233.png 300w" sizes="auto, (max-width: 816px) 100vw, 816px" /></a></p>
<h3>Note</h3>
<p>With the current configuration I can ping a remote computer from my Mikrotik:</p>
<pre>[admin@MikroTik] &gt; ping address=192.168.3.2 src-address=192.168.3.101 count=3 
HOST                                     SIZE TTL TIME  STATUS                                  
192.168.3.2                                56 127 42ms 
192.168.3.2                                56 127 44ms 
192.168.3.2                                56 127 41ms 
    sent=3 received=3 packet-loss=0% min-rtt=41ms avg-rtt=42ms max-rtt=44ms</pre>
<p>but I can&#8217;t ping the same computer from any other location (other computers connected to my Mikrotik&#8230;</p>
<pre>C:\Users\User&gt;ping 192.168.3.2

Pinging 192.168.3.2 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.3.2:
    Packets: Sent = 3, Received = 0, Lost = 3 (100% loss)</pre>
<p>to resolve this we need to add a <span style="text-decoration: underline;">NAT rule</span> and one more <span style="text-decoration: underline;">route</span></p>
<h3>Step 3: NAT configuration</h3>
<pre>[admin@MikroTik] &gt; /ip firewall nat print
...

 1    ;;; pptp-client masquerade
      chain=srcnat action=masquerade src-address=192.168.1.2-192.168.1.254 
      out-interface=pptp-client log=no log-prefix="" 

...</pre>
<p><a href="http://www.urosvovk.com/wp-content/uploads/2014/09/slika-5.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-707" src="http://www.urosvovk.com/wp-content/uploads/2014/09/slika-5.png" alt="slika 5" width="650" height="752" srcset="https://www.urosvovk.com/wp-content/uploads/2014/09/slika-5.png 650w, https://www.urosvovk.com/wp-content/uploads/2014/09/slika-5-259x300.png 259w" sizes="auto, (max-width: 650px) 100vw, 650px" /></a></p>
<p><span style="text-decoration: underline;">src-address</span> is used to allow only computers from my private subnet</p>
<p><a href="http://www.urosvovk.com/wp-content/uploads/2014/09/slika-6.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-708" src="http://www.urosvovk.com/wp-content/uploads/2014/09/slika-6.png" alt="slika 6" width="612" height="648" srcset="https://www.urosvovk.com/wp-content/uploads/2014/09/slika-6.png 612w, https://www.urosvovk.com/wp-content/uploads/2014/09/slika-6-283x300.png 283w" sizes="auto, (max-width: 612px) 100vw, 612px" /></a></p>
<p>In simple words&#8230; With this we allowed other computers to use VPN client interface.</p>
<h3>Step 4: Add new route</h3>
<p>route #4 is automatically added with pptp-client.<br />
We need to add route #3&#8230;<br />
Again&#8230; in simple words&#8230; With this route we route all request from<strong> 192.168.1.1</strong> (router IP for private subnet) to remote subnet</p>
<pre>[admin@MikroTik] &gt; /ip route print 
 #      DST-ADDRESS        PREF-SRC        GATEWAY            DISTANCE
 ...
 3 A S  192.168.3.0/24     192.168.1.1     pptp-client               1
 4 ADC  192.168.3.100/32   192.168.3.101   pptp-client               0
 ...</pre>
<p><a href="http://www.urosvovk.com/wp-content/uploads/2014/09/slika-7.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-709" src="http://www.urosvovk.com/wp-content/uploads/2014/09/slika-7.png" alt="slika 7" width="1296" height="667" srcset="https://www.urosvovk.com/wp-content/uploads/2014/09/slika-7.png 1296w, https://www.urosvovk.com/wp-content/uploads/2014/09/slika-7-300x154.png 300w, https://www.urosvovk.com/wp-content/uploads/2014/09/slika-7-1024x527.png 1024w" sizes="auto, (max-width: 1296px) 100vw, 1296px" /></a></p>
<h3>Step 5: Finish</h3>
<p>If you did all right, you now have access to the remote subnet from your private subnet.</p>
<p>A quick test&#8230;</p>
<pre>C:\Users\User&gt;ping 192.168.3.2
Pinging 192.168.3.2 with 32 bytes of data:
Reply from 192.168.3.2: bytes=32 time=41ms TTL=126
Reply from 192.168.3.2: bytes=32 time=41ms TTL=126
Reply from 192.168.3.2: bytes=32 time=86ms TTL=126

Ping statistics for 192.168.3.2:
Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 41ms, Maximum = 86ms, Average = 56ms</pre>
<p>If you need any help or I did something wrong, leave a comment and I will try to do my best to help you.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.urosvovk.com/step-by-step-how-to-configure-a-pptp-vpn-client-on-mikrotik-routeros/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title>Temporary Disabling Bash History</title>
		<link>https://www.urosvovk.com/temporary-disabling-bash-history/</link>
		
		<dc:creator><![CDATA[Uroš]]></dc:creator>
		<pubDate>Mon, 28 Oct 2013 16:47:53 +0000</pubDate>
				<category><![CDATA[Linux Stuff]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bash history]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[disable]]></category>
		<guid isPermaLink="false">http://www.urosvovk.com/?p=640</guid>

					<description><![CDATA[Let&#8217;s assume that you want execute some command that you don&#8217;t want in your history (e.g. commands with  passwords), but you don&#8217;t want to clear your entire history because of these. all you need to do is to run the following command: unset HISTFILE or HISTFILE=/dev/null this will disable history for your current session.]]></description>
										<content:encoded><![CDATA[<p>Let&#8217;s assume that you want execute some command that you don&#8217;t want in your history (e.g. commands with  passwords), but you don&#8217;t want to clear your entire history because of these.</p>
<p>all you need to do is to run the following command:</p>
<pre>unset HISTFILE</pre>
<p>or</p>
<pre>HISTFILE=/dev/null</pre>
<p>this will disable history for your current session.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
