<?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>terminal &#8211; Uroš Vovk</title>
	<atom:link href="https://www.urosvovk.com/tag/terminal/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.urosvovk.com</link>
	<description>Uroš Vovk home page</description>
	<lastBuildDate>Tue, 03 Mar 2026 21:15: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>Bandwidth usage report per IP address</title>
		<link>https://www.urosvovk.com/bandwidth-usage-report-per-ip-address/</link>
					<comments>https://www.urosvovk.com/bandwidth-usage-report-per-ip-address/#comments</comments>
		
		<dc:creator><![CDATA[Uroš]]></dc:creator>
		<pubDate>Fri, 01 Jun 2018 13:04:54 +0000</pubDate>
				<category><![CDATA[Linux Stuff]]></category>
		<category><![CDATA[Network Stuff]]></category>
		<category><![CDATA[accounting]]></category>
		<category><![CDATA[bandwidth usage]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mikrotik]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[python 2.7]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[RouterOS]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[sqlite3]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[traffic]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://www.urosvovk.com/?p=858</guid>

					<description><![CDATA[I created a simple python script for collecting data from mikrotik accounting (documetation) feature. Here is my &#8220;mik_collector.py&#8221; script: all you need to change is router_ip variable to match your router IP after that you can run this script simply with this command: python mik_collector.py this will collect data from mikrotik every 5 seconds and store &#8230; <a href="https://www.urosvovk.com/bandwidth-usage-report-per-ip-address/" class="more-link">Continue reading <span class="screen-reader-text">Bandwidth usage report per IP address</span></a>]]></description>
										<content:encoded><![CDATA[<p>I created a simple python script for collecting data from mikrotik accounting (<a href="https://wiki.mikrotik.com/wiki/Manual:IP/Accounting" target="_blank" rel="noopener">documetation</a>) feature.</p>
<p>Here is my &#8220;mik_collector.py&#8221; script:<br />
<script src="//pastebin.com/embed_js/xCYZ9Cf8"></script></p>
<p>all you need to change is <em><strong>router_ip</strong></em> variable to match your router IP</p>
<p>after that you can run this script simply with this command:</p>
<pre>python mik_collector.py</pre>
<p>this will collect data from mikrotik every 5 seconds and store it in data.db sqlite3 database in the same directory as the script is.</p>
<p>All you need to do at mikrotik side is to enable accounting feature:</p>
<p><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-861" src="http://www.urosvovk.com/wp-content/uploads/2018/06/mik_acc_1.png" alt="" width="395" height="314" srcset="https://www.urosvovk.com/wp-content/uploads/2018/06/mik_acc_1.png 395w, https://www.urosvovk.com/wp-content/uploads/2018/06/mik_acc_1-300x238.png 300w" sizes="(max-width: 395px) 100vw, 395px" /> <img decoding="async" class="aligncenter size-full wp-image-862" src="http://www.urosvovk.com/wp-content/uploads/2018/06/mik_acc_2.png" alt="" width="303" height="185" srcset="https://www.urosvovk.com/wp-content/uploads/2018/06/mik_acc_2.png 303w, https://www.urosvovk.com/wp-content/uploads/2018/06/mik_acc_2-300x183.png 300w" sizes="(max-width: 303px) 100vw, 303px" /> <img decoding="async" class="aligncenter size-full wp-image-863" src="http://www.urosvovk.com/wp-content/uploads/2018/06/mik_acc_3.png" alt="" width="272" height="136" /></p>
<p>If you want to analyze your collected data you can do it with sqlite3 command from Ubuntu command prompt:</p>
<pre>sqlite3 data.db "select * from sum_per_month order by month"</pre>
<p>like this:</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-864" src="http://www.urosvovk.com/wp-content/uploads/2018/06/mik_acc_4.png" alt="" width="704" height="420" srcset="https://www.urosvovk.com/wp-content/uploads/2018/06/mik_acc_4.png 704w, https://www.urosvovk.com/wp-content/uploads/2018/06/mik_acc_4-300x179.png 300w" sizes="auto, (max-width: 704px) 100vw, 704px" /></p>
<p>you can write your own queries, all data is stored in a table named accounting. You can share your query in the comments :)</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.urosvovk.com/bandwidth-usage-report-per-ip-address/feed/</wfw:commentRss>
			<slash:comments>4</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 loading="lazy" 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="auto, (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>Auto complete for already used command line commands?</title>
		<link>https://www.urosvovk.com/command-line-auto-complete/</link>
		
		<dc:creator><![CDATA[Uroš]]></dc:creator>
		<pubDate>Fri, 29 Apr 2011 14:55:38 +0000</pubDate>
				<category><![CDATA[Linux Stuff]]></category>
		<category><![CDATA[auto-complete]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[terminal]]></category>
		<guid isPermaLink="false">http://urosv.wordpress.com/?p=97</guid>

					<description><![CDATA[To use auto-complete of already used command line command we just need to edit the following lines: sudo vim /etc/inputrc 1. Uncomment the following lines: #”e[5~”: history-search-backward #”e[6~”: history-search-forward If you don&#8217;t have this two lines just add them to the end of file (without #) 2. Logout/login &#8212; Now you can try to write &#8230; <a href="https://www.urosvovk.com/command-line-auto-complete/" class="more-link">Continue reading <span class="screen-reader-text">Auto complete for already used command line commands?</span></a>]]></description>
										<content:encoded><![CDATA[<p>To use auto-complete of already used command line command we just need to edit the following lines:<br />
<span id="more-97"></span></p>
<pre>sudo vim /etc/inputrc</pre>
<p>1. Uncomment the following lines:</p>
<pre>#”e[5~”: history-search-backward
#”e[6~”: history-search-forward</pre>
<p>If you don&#8217;t have this two lines just add them to the end of file (without #)</p>
<p>2. Logout/login</p>
<p>&#8212;<br />
Now you can try to write some command listed in history&#8230; </p>
<p>like&#8230;</p>
<pre>ls -lah</pre>
<p>write</p>
<pre>ls</pre>
<p>and press</p>
<p><kbd style="border:1px solid #aaa;color:#444;-moz-box-shadow:0 0 3px rgba(0,0,0,.2);-webkit-box-shadow:0 0 3px rgba(0,0,0,.2);box-shadow:0 0 3px rgba(0,0,0,.2);padding:2px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;">Page Up</kbd> or <kbd style="border:1px solid #aaa;color:#444;-moz-box-shadow:0 0 3px rgba(0,0,0,.2);-webkit-box-shadow:0 0 3px rgba(0,0,0,.2);box-shadow:0 0 3px rgba(0,0,0,.2);padding:2px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;">Page Dn</kbd> to navigate trough your history file in search of commands that starts with &#8220;ls&#8221;</p>
<p>If you did everything right it should auto-complete your command&#8230;</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
