<?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>Robert Penz Blog</title>
	<atom:link href="https://robert.penz.name/feed/" rel="self" type="application/rss+xml" />
	<link>https://robert.penz.name</link>
	<description>About Linux, IT security,tips and tricks and otherstuff that comes into my mind</description>
	<lastBuildDate>Fri, 29 May 2026 19:42:43 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>
	<item>
		<title>Evolution of the LWZ Monitoring: From Python to ESPHome</title>
		<link>https://robert.penz.name/1614/evolution-of-the-lwz-monitoring-from-python-to-esphome/</link>
					<comments>https://robert.penz.name/1614/evolution-of-the-lwz-monitoring-from-python-to-esphome/#respond</comments>
		
		<dc:creator><![CDATA[robert]]></dc:creator>
		<pubDate>Fri, 29 May 2026 19:42:43 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Other]]></category>
		<guid isPermaLink="false">https://robert.penz.name/?p=1614</guid>

					<description><![CDATA[<p>It’s been over a decade since I first poked around the serial interface of my Stiebel Eltron LWZ 403 SOL. What started as a &#8220;cable investigation&#8221; with a technician&#8217;s notebook has grown into a long-running community project. Today, I am happy to announce a major update to the project&#8217;s documentation and architecture! I have moved [&#8230;]</p>
The post <a href="https://robert.penz.name/1614/evolution-of-the-lwz-monitoring-from-python-to-esphome/">Evolution of the LWZ Monitoring: From Python to ESPHome</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>It’s been over a decade since I first poked around the serial interface of my Stiebel Eltron LWZ 403 SOL. What started as a &#8220;cable investigation&#8221; with a technician&#8217;s notebook has grown into a long-running community project. Today, I am happy to announce a major update to the project&#8217;s documentation and architecture!</p>
<p>I have moved away from the dedicated Linux server and Python daemon in favor of a modern <strong>ESPHome and Home Assistant</strong> integration. This transition makes the setup much leaner, more robust, and natively integrated into a modern smart home ecosystem.</p>
<p><strong>Key highlights of the update:</strong></p>
<ul>
<li><strong>New ESPHome Integration:</strong> I&#8217;ve replaced the long serial cables with a small ESP8266 (NodeMCU) Wi-Fi bridge installed directly inside the heat pump.</li>
<li><strong>Custom C++ Protocol Handler:</strong> A new DLE protocol implementation that handles modern firmware quirks, including a fix for the elusive &#8220;0x18 ghost byte&#8221; found in versions like v4.39.</li>
<li><strong>Modern Visualization:</strong> Complete Home Assistant dashboard configuration using the ApexCharts card to replicate (and improve upon) the classic RRDTool look.</li>
<li><strong>Full Technical Deep-Dive:</strong> I&#8217;ve added detailed data block mappings and offset tables to the main page for those who want to build their own implementation.</li>
</ul>
<p>You can find the updated guide, technical tables, and the new source code for download on the main project page:</p>
<p style="text-align: center;"><strong><a href="https://robert.penz.name/heat-pump-lwz/">Read the updated LWZ Monitoring Guide</a></strong></p>
<p>A big thank you to the community for the feedback over the years. I hope this new direction helps you keep your heating systems running efficiently!</p>The post <a href="https://robert.penz.name/1614/evolution-of-the-lwz-monitoring-from-python-to-esphome/">Evolution of the LWZ Monitoring: From Python to ESPHome</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://robert.penz.name/1614/evolution-of-the-lwz-monitoring-from-python-to-esphome/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>modsecurity rule to filter CVE-2021-44228/LogJam/Log4Shell [update]</title>
		<link>https://robert.penz.name/1602/modsecurity-rule-to-filter-cve-2021-44228-logjam-log4shell/</link>
					<comments>https://robert.penz.name/1602/modsecurity-rule-to-filter-cve-2021-44228-logjam-log4shell/#comments</comments>
		
		<dc:creator><![CDATA[robert]]></dc:creator>
		<pubDate>Fri, 10 Dec 2021 20:53:00 +0000</pubDate>
				<category><![CDATA[IT Security]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">https://robert.penz.name/?p=1602</guid>

					<description><![CDATA[<p>As a fast workaround, a friend of mine made a modsecurity rule to filter CVE-2021-44228/LogJam/Log4Shell, which he allowed me to share with you. SecRule \ &#160;&#160;ARGS&#124;REQUEST_HEADERS&#124;REQUEST_URI&#124;REQUEST_BODY&#124;REQUEST_COOKIES&#124;REQUEST_LINE&#124;QUERY_STRING "jndi:ldap:" \ &#160;&#160;"phase:1, \ &#160;&#160;id:751001, \ &#160;&#160;t:none, \ &#160;&#160;deny, \ &#160;&#160;status:403, \ &#160;&#160;log, \ &#160;&#160;auditlog, \ &#160;&#160;msg:'Block: CVE-2021-44228 - deny pattern \"jndi:ldap:\"', \ &#160;&#160;severity:'5', \ &#160;&#160;rev:1, \ &#160;&#160;tag:'no_ar'" New [&#8230;]</p>
The post <a href="https://robert.penz.name/1602/modsecurity-rule-to-filter-cve-2021-44228-logjam-log4shell/">modsecurity rule to filter CVE-2021-44228/LogJam/Log4Shell [update]</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>As a fast workaround, a friend of mine made a modsecurity rule to filter CVE-2021-44228/LogJam/Log4Shell, which he allowed me to share with you.<br />
<code><br />
SecRule \<br />
&nbsp;&nbsp;ARGS|REQUEST_HEADERS|REQUEST_URI|REQUEST_BODY|REQUEST_COOKIES|REQUEST_LINE|QUERY_STRING "jndi:ldap:" \<br />
&nbsp;&nbsp;"phase:1, \<br />
&nbsp;&nbsp;id:751001, \<br />
&nbsp;&nbsp;t:none, \<br />
&nbsp;&nbsp;deny, \<br />
&nbsp;&nbsp;status:403, \<br />
&nbsp;&nbsp;log, \<br />
&nbsp;&nbsp;auditlog, \<br />
&nbsp;&nbsp;msg:'Block: CVE-2021-44228 - deny pattern \"jndi:ldap:\"', \<br />
&nbsp;&nbsp;severity:'5', \<br />
&nbsp;&nbsp;rev:1, \<br />
&nbsp;&nbsp;tag:'no_ar'"<br />
</code></p>
<p>New improved version:</p>
<p>&nbsp;&nbsp;<br />
<code>SecRule \<br />
&nbsp;&nbsp;ARGS|REQUEST_HEADERS|REQUEST_URI|REQUEST_BODY|REQUEST_COOKIES|REQUEST_LINE|QUERY_STRING <span class="code-quote">"jndi:ldap:|jndi:dns:|jndi:rmi:|jndi:rni:|\${jndi:"</span> \<br />
&nbsp;&nbsp;"phase:1, \<br />
&nbsp;&nbsp;id:751001, \<br />
&nbsp;&nbsp;t:none, \<br />
&nbsp;&nbsp;deny, \<br />
&nbsp;&nbsp;status:403, \<br />
&nbsp;&nbsp;log, \<br />
&nbsp;&nbsp;auditlog, \<br />
&nbsp;&nbsp;msg:<span class="code-quote">'DVT: CVE-2021-44228 - phase 1 - deny known \"jndi:\" pattern'</span>, \<br />
&nbsp;&nbsp;severity:<span class="code-quote">'5'</span>, \<br />
&nbsp;&nbsp;rev:1, \<br />
&nbsp;&nbsp;tag:<span class="code-quote">'no_ar'</span>"<br />
&nbsp;&nbsp;<br />
SecRule \<br />
&nbsp;&nbsp;ARGS|REQUEST_HEADERS|REQUEST_URI|REQUEST_BODY|REQUEST_COOKIES|REQUEST_LINE|QUERY_STRING <span class="code-quote">"jndi:ldap:|jndi:dns:|jndi:rmi:|jndi:rni:|\${jndi:"</span> \<br />
&nbsp;&nbsp;"phase:2, \<br />
&nbsp;&nbsp;id:751002, \<br />
&nbsp;&nbsp;t:none, \<br />
&nbsp;&nbsp;deny, \<br />
&nbsp;&nbsp;status:403, \<br />
&nbsp;&nbsp;log, \<br />
&nbsp;&nbsp;auditlog, \<br />
&nbsp;&nbsp;msg:<span class="code-quote">'DVT: CVE-2021-44228 - phase 2 - deny known \"jndi:\" pattern'</span>, \<br />
&nbsp;&nbsp;severity:<span class="code-quote">'5'</span>, \<br />
&nbsp;&nbsp;rev:1, \<br />
&nbsp;&nbsp;tag:<span class="code-quote">'no_ar'<br />
</span></code></p>The post <a href="https://robert.penz.name/1602/modsecurity-rule-to-filter-cve-2021-44228-logjam-log4shell/">modsecurity rule to filter CVE-2021-44228/LogJam/Log4Shell [update]</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://robert.penz.name/1602/modsecurity-rule-to-filter-cve-2021-44228-logjam-log4shell/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title>Jitsi Workaround for CVE-2021-44228/LogJam/Log4Shell</title>
		<link>https://robert.penz.name/1595/jitsi-workaround-for-cve-2021-44228-logjam/</link>
					<comments>https://robert.penz.name/1595/jitsi-workaround-for-cve-2021-44228-logjam/#respond</comments>
		
		<dc:creator><![CDATA[robert]]></dc:creator>
		<pubDate>Fri, 10 Dec 2021 20:20:28 +0000</pubDate>
				<category><![CDATA[IT Security]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">https://robert.penz.name/?p=1595</guid>

					<description><![CDATA[<p>You surely heard of the LogJam / Log4Shell / CVE-2021-44228 &#8211; if not, take a look at this blog post. If you&#8217;re running Jitsi is most likely vulnerable and as there is no fix currently, you need a workaround which I provide here for you. You need to add -Dlog4j2.formatMsgNoLookups=True at the correct places in [&#8230;]</p>
The post <a href="https://robert.penz.name/1595/jitsi-workaround-for-cve-2021-44228-logjam/">Jitsi Workaround for CVE-2021-44228/LogJam/Log4Shell</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>You surely heard of the LogJam / Log4Shell / CVE-2021-44228 &#8211; if not, take a look at this <a href="https://www.lunasec.io/docs/blog/log4j-zero-day/">blog post</a>. If you&#8217;re running Jitsi is most likely vulnerable and as there is no fix currently, you need a workaround which I provide here for you. You need to add -Dlog4j2.formatMsgNoLookups=True at the correct places in the file &#8211; the position is important.</p>
<p>/etc/jitsi/jicofo/config</p>
<p><a href="https://robert.penz.name/wp-content/uploads/2021/12/jitsi1-1.png"><img fetchpriority="high" decoding="async" class="aligncenter size-large wp-image-1598" src="https://robert.penz.name/wp-content/uploads/2021/12/jitsi1-1-600x85.png" alt="" width="600" height="85" srcset="https://robert.penz.name/wp-content/uploads/2021/12/jitsi1-1-600x85.png 600w, https://robert.penz.name/wp-content/uploads/2021/12/jitsi1-1-300x42.png 300w, https://robert.penz.name/wp-content/uploads/2021/12/jitsi1-1-768x108.png 768w, https://robert.penz.name/wp-content/uploads/2021/12/jitsi1-1.png 864w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
<p>/etc/jitsi/videobridge/config</p>
<p><a href="https://robert.penz.name/wp-content/uploads/2021/12/jitsi2.png"><img decoding="async" class="aligncenter size-large wp-image-1596" src="https://robert.penz.name/wp-content/uploads/2021/12/jitsi2-600x64.png" alt="" width="600" height="64" srcset="https://robert.penz.name/wp-content/uploads/2021/12/jitsi2-600x64.png 600w, https://robert.penz.name/wp-content/uploads/2021/12/jitsi2-300x32.png 300w, https://robert.penz.name/wp-content/uploads/2021/12/jitsi2-768x82.png 768w, https://robert.penz.name/wp-content/uploads/2021/12/jitsi2.png 877w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
<p>And restart the processes or restart the server.</p>The post <a href="https://robert.penz.name/1595/jitsi-workaround-for-cve-2021-44228-logjam/">Jitsi Workaround for CVE-2021-44228/LogJam/Log4Shell</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://robert.penz.name/1595/jitsi-workaround-for-cve-2021-44228-logjam/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Proxmox Container with Debian 10 does not work after upgrade</title>
		<link>https://robert.penz.name/1582/proxmox-container-with-debian-10-does-not-work-after-upgrade/</link>
					<comments>https://robert.penz.name/1582/proxmox-container-with-debian-10-does-not-work-after-upgrade/#comments</comments>
		
		<dc:creator><![CDATA[robert]]></dc:creator>
		<pubDate>Sun, 08 Sep 2019 13:27:48 +0000</pubDate>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">https://robert.penz.name/?p=1582</guid>

					<description><![CDATA[<p>I just did an apt update / upgrade of a Debian 10 container and restarted it afterwards and got following: # pct start 105 Job for pve-container@105.service failed because the control process exited with error code. See "systemctl status pve-container@105.service" and "journalctl -xe" for details. command 'systemctl start pve-container@105' failed: exit code 1 with a [&#8230;]</p>
The post <a href="https://robert.penz.name/1582/proxmox-container-with-debian-10-does-not-work-after-upgrade/">Proxmox Container with Debian 10 does not work after upgrade</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>I just did an <code>apt update / upgrade</code> of a Debian 10 container and restarted it afterwards and got following:</p>
<p><code># pct start 105<br />
Job for pve-container@105.service failed because the control process exited with error code.<br />
See "systemctl status pve-container@105.service" and "journalctl -xe" for details.<br />
command 'systemctl start pve-container@105' failed: exit code 1</code></p>
<p>with a more verbose startup I got following</p>
<p><code># lxc-start -n 105 -F -l DEBUG -o /tmp/lxc-ID.log<br />
lxc-start: 105: conf.c: run_buffer: 335 Script exited with status 25<br />
lxc-start: 105: start.c: lxc_init: 861 Failed to run lxc.hook.pre-start for container "105"<br />
lxc-start: 105: start.c: __lxc_start: 1944 Failed to initialize container "105"<br />
lxc-start: 105: tools/lxc_start.c: main: 330 The container failed to start<br />
lxc-start: 105: tools/lxc_start.c: main: 336 Additional information can be obtained by setting the --logfile and --logpriority options</code></p>
<p>and a look into <code>/tmp/lxc-ID.log</code> shows the problem:</p>
<p><code>lxc-start 105 20190908130857.595 DEBUG conf - conf.c:run_buffer:326 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 105 lxc pre-start with output: unsupported debian version '10.1'<br />
lxc-start 105 20190908130857.604 ERROR conf - conf.c:run_buffer:335 - Script exited with status 25<br />
lxc-start 105 20190908130857.604 ERROR start - start.c:lxc_init:861 - Failed to run lxc.hook.pre-start for container "105"</code></p>
<p>The problem was that the Debian version, which changed from 10.0 to 10.1, was not recognized by the Proxmox script. The responsible code is in /usr/share/perl5/PVE/LXC/Setup/Debian.pm, but in this case I didn&#8217;t need to change anything as I just needed to update the Proxmox host to the newest minor version and it worked again, as the code in Debian.pm got changed by the developers. I just though to share this, as maybe others run into that problem, as the error reporting is not that good in that case. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>The post <a href="https://robert.penz.name/1582/proxmox-container-with-debian-10-does-not-work-after-upgrade/">Proxmox Container with Debian 10 does not work after upgrade</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://robert.penz.name/1582/proxmox-container-with-debian-10-does-not-work-after-upgrade/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title>Howto visualize your water meter and get alerted if too much water is used</title>
		<link>https://robert.penz.name/1566/howto-visualize-your-water-meter-and-get-alerted-if-too-much-water-is-used/</link>
					<comments>https://robert.penz.name/1566/howto-visualize-your-water-meter-and-get-alerted-if-too-much-water-is-used/#comments</comments>
		
		<dc:creator><![CDATA[robert]]></dc:creator>
		<pubDate>Wed, 01 May 2019 14:26:23 +0000</pubDate>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<guid isPermaLink="false">https://robert.penz.name/?p=1566</guid>

					<description><![CDATA[<p>In the village I live the water meter is replaced every 5 years and it was the fifth&#8217;s year this year. I took the opportunity to talk to the municipal office, if it was possible to get a water meter with impulse module, which I can integrate in my network. And they said yes 🙂 [&#8230;]</p>
The post <a href="https://robert.penz.name/1566/howto-visualize-your-water-meter-and-get-alerted-if-too-much-water-is-used/">Howto visualize your water meter and get alerted if too much water is used</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>In the village I live the water meter is replaced every 5 years and it was the fifth&#8217;s year this year. I took the opportunity to talk to the municipal office, if it was possible to get a water meter with impulse module, which I can integrate in my network. And they said yes <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> &#8211; Thx again!</p>
<p>So last week they came by and put the new one in, I was not at home, and when I came home I found following:</p>
<p><a href="https://robert.penz.name/wp-content/uploads/2019/05/zaehler.png"><img decoding="async" class="aligncenter size-full wp-image-1567" src="https://robert.penz.name/wp-content/uploads/2019/05/zaehler.png" alt="" width="404" height="350" srcset="https://robert.penz.name/wp-content/uploads/2019/05/zaehler.png 404w, https://robert.penz.name/wp-content/uploads/2019/05/zaehler-300x260.png 300w" sizes="(max-width: 404px) 100vw, 404px" /></a></p>
<p>They also left  the packaging, so I was able to guess the module. For me it looked like a &#8220;Ringkolben-Patronenzähler MODULARISRTK-OPX&#8221; from Wehrle as shown in this <a href="https://www.wehrle.de/wp-content/uploads/2018/07/Datenblatt-RTK-HPX_2018-06-26-1.pdf" target="_blank" rel="noopener noreferrer">datasheet</a>. I was not 100% sure if it was the S0 or M-Bus version, but a friend told me it must be the S0 Version as the M-Bus is much more expensive, so I went for it.</p>
<p><strong>Getting the S0 connected</strong></p>
<p>Basically the meter has an optocoupler (optoelectronic coupler) which is powered in my case by an internal battery. At every liter of water that runs through the meter, the two cables shown above get connected for a short period (e.g. 100ms). In the simplest case it would be possible to just use a pull-up resistor to 5V, but this may lead the problems. It is better to use 2 resistors and 2 capacitors stabilize the impulse and guard against unwanted effects such as electromagnetic interference. As my time when I learned that at school is too long ago, I asked a friend who does circuits all the time for help, which let to this drawing:</p>
<p><a href="https://robert.penz.name/wp-content/uploads/2019/05/circuit.png"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-1568" src="https://robert.penz.name/wp-content/uploads/2019/05/circuit-600x340.png" alt="" width="600" height="340" srcset="https://robert.penz.name/wp-content/uploads/2019/05/circuit-600x340.png 600w, https://robert.penz.name/wp-content/uploads/2019/05/circuit-300x170.png 300w, https://robert.penz.name/wp-content/uploads/2019/05/circuit.png 650w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a></p>
<p>And he told me to use following resistors and capacitors:</p>
<ul>
<li>R1 – 4,7kOhm</li>
<li>R2 – 470Ohm</li>
<li>C1 – 100nF</li>
<li>C2 – 10nF</li>
</ul>
<p>At home, I build that circuit (no fully done on the picture):</p>
<p><a href="https://robert.penz.name/wp-content/uploads/2019/05/circuit2.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1569" src="https://robert.penz.name/wp-content/uploads/2019/05/circuit2.png" alt="" width="312" height="378" srcset="https://robert.penz.name/wp-content/uploads/2019/05/circuit2.png 312w, https://robert.penz.name/wp-content/uploads/2019/05/circuit2-248x300.png 248w" sizes="auto, (max-width: 312px) 100vw, 312px" /></a></p>
<p>As you can see I used old PC power supply connectors to connect the water meter, so I can disconnect it easily. Hardware costs under 1 Euro so far &#8211; OK need some stuff at home already (e.g. soldering iron) <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>So, now back to areas I know better &#8230;.</p>
<p><strong>Getting the signal onto my network</strong></p>
<p>I&#8217;ve several <a href="https://www.raspberrypi.org/" target="_blank" rel="noopener noreferrer">Raspberry PIs</a>s at home and at first I thought about using one, but that would be overkill my case as I wanted to do visualization and alerting in a container on my home server anyway. I went with something <a href="https://www.arduino.cc/" target="_blank" rel="noopener noreferrer">Arduino</a> like, but cheaper. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>I went for a <a href="https://en.wikipedia.org/wiki/NodeMCU" target="_blank" rel="noopener noreferrer">NodeMCU</a> which has all I needed for that project:</p>
<ul>
<li>Digital Input with interrupt triggering &#8211;&gt; no polling and missing an impulse</li>
<li>WiFi support to connect to my IoT network</li>
<li>Integration with the <a href="https://www.arduino.cc/en/Main/Software" target="_blank" rel="noopener noreferrer">Arduino IDE</a></li>
<li>It costs under 5 Euro</li>
</ul>
<p><a href="https://robert.penz.name/wp-content/uploads/2019/05/nodemcu.jpg"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1570" src="https://robert.penz.name/wp-content/uploads/2019/05/nodemcu.jpg" alt="" width="320" height="320" srcset="https://robert.penz.name/wp-content/uploads/2019/05/nodemcu.jpg 320w, https://robert.penz.name/wp-content/uploads/2019/05/nodemcu-300x300.jpg 300w" sizes="auto, (max-width: 320px) 100vw, 320px" /></a></p>
<p>Lets take a look at my code &#8211; which you can download from <a href="https://robert.penz.name/files/arduino/watermeter_blog.ino" target="_blank" rel="noopener noreferrer">here</a>. In the first part of the code we import the needed libraries and define some variables:</p>
<ul>
<li>The WiFi SSID and password</li>
<li>The host and port we will inform for every liter of water &#8211; We&#8217;ll use <a href="https://www.influxdata.com/" target="_blank" rel="noopener noreferrer">InfluxDB</a> for that and you will see how easy that makes it.</li>
<li>The PIN we connect the water meter to &#8211; make sure it supports interrupts.</li>
</ul>
<p><a href="https://robert.penz.name/wp-content/uploads/2019/05/code1.png"><img loading="lazy" decoding="async" class="size-full wp-image-1571 alignnone" src="https://robert.penz.name/wp-content/uploads/2019/05/code1.png" alt="" width="428" height="275" srcset="https://robert.penz.name/wp-content/uploads/2019/05/code1.png 428w, https://robert.penz.name/wp-content/uploads/2019/05/code1-300x193.png 300w" sizes="auto, (max-width: 428px) 100vw, 428px" /></a></p>
<p>And now the code which is executed once at startup, where we connect to the Wifi and attach the interrupt.</p>
<p><a href="https://robert.penz.name/wp-content/uploads/2019/05/code2.png"><img loading="lazy" decoding="async" class="size-full wp-image-1572 alignnone" src="https://robert.penz.name/wp-content/uploads/2019/05/code2.png" alt="" width="586" height="414" srcset="https://robert.penz.name/wp-content/uploads/2019/05/code2.png 586w, https://robert.penz.name/wp-content/uploads/2019/05/code2-300x212.png 300w" sizes="auto, (max-width: 586px) 100vw, 586px" /></a></p>
<p>And at last we need the code that gets called by the interrupt &#8211; it just sends a UDP Message in the InfluxDB format for each Liter of water, the rest is down by the InfluxDB time series database.</p>
<p><a href="https://robert.penz.name/wp-content/uploads/2019/05/code3.png"><img loading="lazy" decoding="async" class="size-full wp-image-1573 alignnone" src="https://robert.penz.name/wp-content/uploads/2019/05/code3.png" alt="" width="321" height="204" srcset="https://robert.penz.name/wp-content/uploads/2019/05/code3.png 321w, https://robert.penz.name/wp-content/uploads/2019/05/code3-300x191.png 300w" sizes="auto, (max-width: 321px) 100vw, 321px" /></a></p>
<p>As you see the code is really easy &#8211; the complicated stuff is done by the InfluxDB.</p>
<p><strong>Visualization and Alerting</strong></p>
<p>Sure I could write my own visualization and alerting and I have done so in the past but these times are gone. InfluxDB and some additional projects from the same guys do everything and better than I could for such a home project. You will see how easy it really is. I started with an empty LXC container on my Linux home server. I use Debian 9 in the container, but InfluxDB is packaged for all major distributions.</p>
<p>First we need to install curl and https support for apt &#8211; my contains are as small as possible.</p>
<p><code># apt install curl apt-transport-https</code></p>
<p>Download the signing key for the InfluxDB repository.</p>
<p><code># curl -sL https://repos.influxdata.com/influxdb.key | apt-key add -</code></p>
<p>This is followed by adding the repository to the list</p>
<p><code># cat &gt;&gt; /etc/apt/sources.list<br />
deb https://repos.influxdata.com/debian stretch stable</code></p>
<p>and installing the software.</p>
<p><code># apt update<br />
# apt-get install influxdb chronograf kapacitor</code></p>
<p>By default, the UDP interface on InfluxDB is disabled. You’ll want to modify the configuration file <code>/etc/influxdb/influxdb.conf</code> to look similar to this:</p>
<p><code>[[udp]]<br />
enabled = true<br />
bind-address = ":8888"<br />
database = "db_iot"</code></p>
<p>Now we just need to enable the various services</p>
<p><code># systemctl enable influxdb<br />
# systemctl start influxdb<br />
# systemctl enable kapacitor<br />
# systemctl start kapacitor</code></p>
<p>If everything works you should see something like this</p>
<p><code># netstat -lpn | grep 8888<br />
tcp6 0 0 :::8888 :::* LISTEN 1505/chronograf<br />
udp6 0 0 :::8888 :::* 1539/influxd</code></p>
<p>Now we just need to create the database, we configured to use for UDP:</p>
<p><code># influx<br />
Connected to http://localhost:8086 version 1.7.6<br />
InfluxDB shell version: 1.7.6<br />
Enter an InfluxQL query<br />
&gt; CREATE DATABASE db_iot<br />
&gt; exit</code></p>
<p>After this just open your browser and connect to <code>http://&lt;ipAddressOfServer&gt;:8888</code> and fill out the form with the following details:</p>
<ul>
<li> Connection String: Enter the hostname or IP of the machine that InfluxDB is running on, and be sure to include InfluxDB’s default port 8086. In my/our case it is localhost / 127.0.0.1</li>
<li>Connection Name: Enter a name for your connection string.</li>
<li>Username and Password: These fields can remain blank unless you’ve enabled authorization in InfluxDB.</li>
<li>Telegraf Database Name: Optionally, enter a name for your Telegraf database. The default name is Telegraf.</li>
</ul>
<p>Everything else can be done via the browser &#8211; Just take a look at the configuration of one of my dashboard elements &#8211; the SQL code is written by clicking around :-).</p>
<p><a href="https://robert.penz.name/wp-content/uploads/2019/05/dashboard1.png"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-1574" src="https://robert.penz.name/wp-content/uploads/2019/05/dashboard1-600x305.png" alt="" width="600" height="305" srcset="https://robert.penz.name/wp-content/uploads/2019/05/dashboard1-600x305.png 600w, https://robert.penz.name/wp-content/uploads/2019/05/dashboard1-300x153.png 300w, https://robert.penz.name/wp-content/uploads/2019/05/dashboard1-768x391.png 768w, https://robert.penz.name/wp-content/uploads/2019/05/dashboard1.png 1366w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a></p>
<p>My water meter dashboard looks currently like this:</p>
<p><a href="https://robert.penz.name/wp-content/uploads/2019/05/dashboard2.png"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-1576" src="https://robert.penz.name/wp-content/uploads/2019/05/dashboard2-600x454.png" alt="" width="600" height="454" srcset="https://robert.penz.name/wp-content/uploads/2019/05/dashboard2-600x454.png 600w, https://robert.penz.name/wp-content/uploads/2019/05/dashboard2-300x227.png 300w, https://robert.penz.name/wp-content/uploads/2019/05/dashboard2-768x581.png 768w, https://robert.penz.name/wp-content/uploads/2019/05/dashboard2.png 1272w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a></p>
<p>And you can also define alerts. In this case I wanted to get an alert message send, if more than 100 Liter of water is used in one hour &#8211; I should know if that happens and if it is OK.</p>
<p><a href="https://robert.penz.name/wp-content/uploads/2019/05/alert.png"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-1575" src="https://robert.penz.name/wp-content/uploads/2019/05/alert-600x481.png" alt="" width="600" height="481" srcset="https://robert.penz.name/wp-content/uploads/2019/05/alert-600x481.png 600w, https://robert.penz.name/wp-content/uploads/2019/05/alert-300x241.png 300w, https://robert.penz.name/wp-content/uploads/2019/05/alert-768x616.png 768w, https://robert.penz.name/wp-content/uploads/2019/05/alert.png 1227w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a></p>
<p>I hope you see how easy visualizing and alerting a water meter can be. It is also really cheap &#8211; about 5 Euro for everything, if you&#8217;ve already a server otherwise let it run on a Raspberry PI (about 30 Euro), rent a virtual server for 1-2 Euro/month or use the container feature of your NAS.</p>The post <a href="https://robert.penz.name/1566/howto-visualize-your-water-meter-and-get-alerted-if-too-much-water-is-used/">Howto visualize your water meter and get alerted if too much water is used</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://robert.penz.name/1566/howto-visualize-your-water-meter-and-get-alerted-if-too-much-water-is-used/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Howto install Wireguard in an unprivileged container (Proxmox)</title>
		<link>https://robert.penz.name/1562/howto-install-wireguard-in-an-unprivileged-container-proxmox/</link>
					<comments>https://robert.penz.name/1562/howto-install-wireguard-in-an-unprivileged-container-proxmox/#respond</comments>
		
		<dc:creator><![CDATA[robert]]></dc:creator>
		<pubDate>Sun, 14 Apr 2019 18:38:51 +0000</pubDate>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[IT Security]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<guid isPermaLink="false">https://robert.penz.name/?p=1562</guid>

					<description><![CDATA[<p>Wireguard is the new star on the block concerning VPNs &#8211; and yes it has some benefits to the old VPN technologies but I won&#8217;t talk about them as there is much information about that on the Internet. This blog post just explains how to set it up in an unprivileged container. In my case [&#8230;]</p>
The post <a href="https://robert.penz.name/1562/howto-install-wireguard-in-an-unprivileged-container-proxmox/">Howto install Wireguard in an unprivileged container (Proxmox)</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>Wireguard is the new star on the block concerning VPNs &#8211; and yes it has some benefits to the old VPN technologies but I won&#8217;t talk about them as there is much information about that on the Internet. This blog post just explains how to set it up in an unprivileged container. In my case everything is done on a Proxmox server. Let&#8217;s start:</p>
<p>On the Proxmox host itself we need to get the kernel module running. As Proxmox is based on Debian we just pin the Wireguard package from unstable, which is the recommended way by the Debian project in this case.</p>
<p><code>echo "deb http://deb.debian.org/debian/ unstable main" &gt; /etc/apt/sources.list.d/unstable-wireguard.list<br />
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' &gt; /etc/apt/preferences.d/limit-unstable<br />
apt update<br />
apt install wireguard pve-headers</code></p>
<p>If you get following:</p>
<p><code>Loading new wireguard-0.0.20190406 DKMS files...<br />
Building for 4.15.18-9-pve<br />
Module build for kernel 4.15.18-9-pve was skipped since the<br />
kernel headers for this kernel does not seem to be installed.<br />
Setting up linux-headers-4.9.0-8-amd64 (4.9.144-3.1) ...</code></p>
<p>you need to make sure the <code>pve-headers</code> for your current kernel is installed. If you installed it later, then you need to call:</p>
<p><code>dkms autoinstall</code></p>
<p>In both cases we test it with:</p>
<p><code>modprobe wireguard</code></p>
<p>If this works, we auto-load the module at boot, as the host does not know that a container needs that module later.</p>
<p><code>echo "wireguard" &gt;&gt; /etc/modules-load.d/modules.conf</code></p>
<p>Now we create our unprivileged container (in my case also Debian 9) and then install the user space tools:</p>
<p><code>echo "deb http://deb.debian.org/debian/ unstable main" &gt; /etc/apt/sources.list.d/unstable-wireguard.list<br />
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' &gt; /etc/apt/preferences.d/limit-unstable<br />
apt update</code></p>
<p>and now something special &#8211; we want only the user space tools nothing more.</p>
<p><code>apt-get install --no-install-recommends wireguard-tools</code></p>
<p>A simple test that everything works can be done by creating temporary a wg0 device.</p>
<p><code>ip link add wg0 type wireguard</code></p>
<p>No output means everything worked. And we&#8217;re done, everything else is the same as running Wireguard without container &#8211; just choose your howto for this.</p>The post <a href="https://robert.penz.name/1562/howto-install-wireguard-in-an-unprivileged-container-proxmox/">Howto install Wireguard in an unprivileged container (Proxmox)</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://robert.penz.name/1562/howto-install-wireguard-in-an-unprivileged-container-proxmox/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Howto install Bitwarden in a LXC container (e.g. Proxmox)</title>
		<link>https://robert.penz.name/1556/howto-install-bitwarden-in-a-lxc-container-e-g-proxmox/</link>
					<comments>https://robert.penz.name/1556/howto-install-bitwarden-in-a-lxc-container-e-g-proxmox/#comments</comments>
		
		<dc:creator><![CDATA[robert]]></dc:creator>
		<pubDate>Sun, 13 Jan 2019 17:32:57 +0000</pubDate>
				<category><![CDATA[IT Security]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">https://robert.penz.name/?p=1556</guid>

					<description><![CDATA[<p>As many of you know me, I&#8217;m quite serious about security and therefore a believer in the theory that a service which is not reachable (e.g. from the Internet) cannot be attacked as easily as one that it. Looking at password managers this makes choosing not that easy. Sure there is Keepass and the descendants, [&#8230;]</p>
The post <a href="https://robert.penz.name/1556/howto-install-bitwarden-in-a-lxc-container-e-g-proxmox/">Howto install Bitwarden in a LXC container (e.g. Proxmox)</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>As many of you know me, I&#8217;m quite serious about security and therefore a believer in the theory that a service which is not reachable (e.g. from the Internet) cannot be attacked as easily as one that it. Looking at password managers this makes choosing not that easy. Sure there is Keepass and the descendants, but they have the problem that the security is based solely on the master password and the end device security. Knowing friends that use Google Drive for syncing the password file between their devices, I looked at that option, but it was not right for me (e.g. Browser integration, 2FA, &#8230;).</p>
<p>Password managers like Lastpass or 1Password are also not the right solution for me. Yes, I believe that their crypto is good, and they never see the passwords of their users, but the 2FA is only as good as the lost password/2FA reset feature is. I&#8217;ve read and seen to many attacks on that to rely on it.</p>
<p>All of this leads to Bitwarden, it provides the same level of functionality as Lastpass or 1Password but is OpenSource and can be hosted on my own server. Not opening it up to Internet and using it from remote only via VPN (which I have anyway) make for a real small attack surface. This blog post shows how I installed it within a Proxmox LXC container, which I did to isolated it from other stuff and therefore there are no dependencies, if I need to upgrade something. I don&#8217;t like to install anything on the Proxmox host itself. As this is my first try, and I run into a problem with an unprivileged container and docker within it, this setup works currently only with a privileged container. I know this is not that good, but in this case it is a risk I can accept. If you find a solution to get it running in an unprivileged container please send me an email or write a comment.</p>
<p><strong>LXC container</strong></p>
<p>After creating the LXC container (2Gb RAM, &gt;5GB HD) with Debian 9, don&#8217;t start the container at once. You need to add following to <code>/etc/modules-load.d/modules.conf</code></p>
<p><code>aufs<br />
overlay</code></p>
<p>And if you don&#8217;t want to boot load the modules with</p>
<p><code>modprobe aufs<br />
modprobe overlay<br />
</code></p>
<p>If you don&#8217;t do this your installation will get gigantic (over 30gb). Now we just need to add following to <code>/etc/pve/lxc/&lt;vid&gt;.conf</code></p>
<p><code>#insert docker part below<br />
lxc.apparmor.profile: unconfined<br />
lxc.cgroup.devices.allow: a<br />
lxc.cap.drop:</code></p>
<p>Now you can start the container and enter it, we&#8217;ll check later if all was correct, but we need docker for this.</p>
<p><strong>Docker and Docker Composer</strong></p>
<p>Some requirements for docker</p>
<p><code>apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common</code></p>
<p>and now we can add the repository for docker</p>
<p><code>curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -<br />
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"</code></p>
<p>and now we can install it with</p>
<p><code>apt-get update apt-get install docker-ce</code></p>
<p>The Docker Composer which is shipped with Debian is too old to work with this docker, so we need following:</p>
<p><code>curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose<br />
chmod +x /usr/local/bin/docker-compose</code></p>
<p>and add <code>/usr/local/bin/</code> to the path variable by adding</p>
<p><code>PATH=/usr/local/bin:$PATH</code></p>
<p>to <code>.bashrc</code> and calling it directly in the bash to get it set without starting a new bash instance. I know that a package would be better, couldn&#8217;t find one, so this is a temporary solution. If someone finds a better one, leave it in the comments below.</p>
<p>Now we need to check if the overlay stuff is working by calling docker info and hopefully you get also overlay2 as storage driver:</p>
<p><code>Containers: 0<br />
Running: 0<br />
Paused: 0<br />
Stopped: 0<br />
Images: 0<br />
Server Version: 18.06.1-ce<br />
Storage Driver: overlay2<br />
Backing Filesystem: extfs<br />
Supports d_type: true<br />
Native Overlay Diff: true<br />
Logging Driver: json-file</code></p>
<p><strong>Bitwarden</strong></p>
<p>Now we just need following:</p>
<p><code>curl -s -o bitwarden.sh https://raw.githubusercontent.com/bitwarden/core/master/scripts/bitwarden.sh<br />
chmod +x bitwarden.sh<br />
./bitwarden.sh install<br />
./bitwarden.sh start<br />
./bitwarden.sh updatedb</code></p>
<p>And now you&#8217;re done, you&#8217;ve your own password manager server which also supports Google Authenticator (<a class="mw-redirect" title="Time-based One-time Password Algorithm" href="https://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm">Time-based One-time Password Algorithm</a> (TOTP) as second factor. Maybe I&#8217;ll write a blogpost how to setup a Yubikey as 2FA (desktop and mobile) later.</p>The post <a href="https://robert.penz.name/1556/howto-install-bitwarden-in-a-lxc-container-e-g-proxmox/">Howto install Bitwarden in a LXC container (e.g. Proxmox)</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://robert.penz.name/1556/howto-install-bitwarden-in-a-lxc-container-e-g-proxmox/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title>QuickTip: Howto secure your Mikrotik/RouterOS Router and specially Winbox</title>
		<link>https://robert.penz.name/1546/quicktip-howto-secure-your-mikrotik-routeros-router-and-specially-winbox/</link>
					<comments>https://robert.penz.name/1546/quicktip-howto-secure-your-mikrotik-routeros-router-and-specially-winbox/#comments</comments>
		
		<dc:creator><![CDATA[robert]]></dc:creator>
		<pubDate>Sat, 06 Oct 2018 15:50:45 +0000</pubDate>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[IT Security]]></category>
		<category><![CDATA[Networking]]></category>
		<guid isPermaLink="false">https://robert.penz.name/?p=1546</guid>

					<description><![CDATA[<p>I didn&#8217;t post anything about the multiple security problems in the Mikrotik Winbox API, as I thought that whoever is leaving the management of a router open to the Internet should not configure routers at all. Of course it is common sense to open the management interface only on internal network interfaces and to source [&#8230;]</p>
The post <a href="https://robert.penz.name/1546/quicktip-howto-secure-your-mikrotik-routeros-router-and-specially-winbox/">QuickTip: Howto secure your Mikrotik/RouterOS Router and specially Winbox</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>I didn&#8217;t post anything about the multiple security problems in the Mikrotik Winbox API, as I thought that whoever is leaving the management of a router open to the Internet should not configure routers at all. Of course it is common sense to open the management interface only on internal network interfaces and to source IP addresses you&#8217;re managing the routers.  But as this is quick tip I&#8217;ll show you how I configure my Mikrotiks for years.</p>
<p><code>/ip service<br />
set telnet address=0.0.0.0/0 disabled=yes<br />
set ftp address=0.0.0.0/0 disabled=yes<br />
set www address=0.0.0.0/0 disabled=yes<br />
set ssh address=10.7.0.0/16<br />
set api disabled=yes<br />
set winbox address=127.0.0.1/32<br />
set api-ssl disabled=yes</code></p>
<p>As you see I&#8217;ve only enabled ssh and winbox and winbox is only listening on localhost. The ssh is protected with the Firewall to to be only reachable from my admin network. Also I disable the weak ciphers:</p>
<p><code>/ip ssh set strong-crypto=yes</code></p>
<p>And I&#8217;ve configured public key authentication for the ssh access.  Now your question is how to access the router with winbox? Simple, use ssh port forwarding. So the Winbox API is only accessible by users that have a valid ssh logon &#8211; and ssh is much more robust and secure than Winbox. On Linux  the port forwarding is done like this:</p>
<p><code>ssh -L 8291:127.0.0.1:8291 admin@&lt;mikrotik&gt;</code></p>
<p>On Windows you can do that same with Putty. In Winbox just connect to localhost:</p>
<p><a href="https://robert.penz.name/wp-content/uploads/2018/10/winbox_localhost.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1551" src="https://robert.penz.name/wp-content/uploads/2018/10/winbox_localhost.png" alt="" width="531" height="160" srcset="https://robert.penz.name/wp-content/uploads/2018/10/winbox_localhost.png 531w, https://robert.penz.name/wp-content/uploads/2018/10/winbox_localhost-300x90.png 300w" sizes="auto, (max-width: 531px) 100vw, 531px" /></a></p>The post <a href="https://robert.penz.name/1546/quicktip-howto-secure-your-mikrotik-routeros-router-and-specially-winbox/">QuickTip: Howto secure your Mikrotik/RouterOS Router and specially Winbox</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://robert.penz.name/1546/quicktip-howto-secure-your-mikrotik-routeros-router-and-specially-winbox/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Some VPN providers leak your IPv6 IP address</title>
		<link>https://robert.penz.name/1538/some-vpn-providers-leak-your-ipv6-ip-address/</link>
					<comments>https://robert.penz.name/1538/some-vpn-providers-leak-your-ipv6-ip-address/#comments</comments>
		
		<dc:creator><![CDATA[robert]]></dc:creator>
		<pubDate>Fri, 10 Aug 2018 17:54:34 +0000</pubDate>
				<category><![CDATA[IT Security]]></category>
		<category><![CDATA[Networking]]></category>
		<guid isPermaLink="false">https://robert.penz.name/?p=1538</guid>

					<description><![CDATA[<p>Just a short note. Today a friend called me if I could help him to get TV streaming from TV stations in the US running. When I looked at it, he even selected a VPN provider which offers servers in the US to circumvent the Geo restrictions, but still it didn&#8217;t work. He showed me [&#8230;]</p>
The post <a href="https://robert.penz.name/1538/some-vpn-providers-leak-your-ipv6-ip-address/">Some VPN providers leak your IPv6 IP address</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>Just a short note. Today a friend called me if I could help him to get TV streaming from TV stations in the US running. When I looked at it, he even selected a VPN provider which offers servers in the US to circumvent the Geo restrictions, but still it didn&#8217;t work. He showed me the NBC website where the first ad was shown and than the screen stayed black. Having no experience with VPN providers and TV streaming sites I first checked the openvpn configuration and made sure that the routing table was correct (sending all non local traffic to the VPN). Looked good, so I opened the developer tools in the browser and saw following repeating.</p>
<p><a href="https://robert.penz.name/wp-content/uploads/2018/08/nbc2.png"><img loading="lazy" decoding="async" class="aligncenter size-large wp-image-1543" src="https://robert.penz.name/wp-content/uploads/2018/08/nbc2-600x440.png" alt="" width="600" height="440" srcset="https://robert.penz.name/wp-content/uploads/2018/08/nbc2-600x440.png 600w, https://robert.penz.name/wp-content/uploads/2018/08/nbc2-300x220.png 300w, https://robert.penz.name/wp-content/uploads/2018/08/nbc2-768x563.png 768w, https://robert.penz.name/wp-content/uploads/2018/08/nbc2.png 1130w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a></p>
<p>&nbsp;</p>
<p>Searching the Internet did not provide an answer &#8230; than I just tried to download the file with wget and I got following:</p>
<p><code>$ wget http://nbchls-prod.nbcuni.com/tve-adstitch/4421/xxxx-1.ts<br />
--2018-08-10 19:20:20-- http://nbchls-prod.nbcuni.com/tve-adstitch/4421/xxxx-1.ts<br />
Resolving nbchls-prod.nbcuni.com (nbchls-prod.nbcuni.com)... 2600:1406:c800:495::308, 2600:1406:c800:486::308, 104.96.129.98<br />
Connecting to nbchls-prod.nbcuni.com (nbchls-prod.nbcuni.com)|2600:1406:c800:495::308|:80... connected.<br />
HTTP request sent, awaiting response... 403 Forbidden<br />
2018-08-10 xx:xx:xx ERROR 403: Forbidden.</code></p>
<p>Seeing this it hit me &#8230; its using IPv6 &#8230; so I did a fast check with</p>
<p><code>% wget -4 http://nbchls-prod.nbcuni.com/tve-adstitch/4421/xxxx-1.ts<br />
--2018-08-10 19:20:30-- http://nbchls-prod.nbcuni.com/tve-adstitch/4421/xxxx-1.ts<br />
Resolving nbchls-prod.nbcuni.com (nbchls-prod.nbcuni.com)... 104.96.129.98<br />
Connecting to nbchls-prod.nbcuni.com (nbchls-prod.nbcuni.com)|104.96.129.98|:80... connected.<br />
HTTP request sent, awaiting response... 200 OK<br />
Length: 242520 (237K)</code></p>
<p>So with a IPv4 request it worked. His VPN provider was leaking the IPv6 traffic to the Internet &#8211; that is potentially a security/privacy problem as many use a VPN provider to hide them! So make sure to check before relying on the VPN security/privacy.</p>The post <a href="https://robert.penz.name/1538/some-vpn-providers-leak-your-ipv6-ip-address/">Some VPN providers leak your IPv6 IP address</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://robert.penz.name/1538/some-vpn-providers-leak-your-ipv6-ip-address/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to configure a Mikrotik router as DHCP-PD Client (Prefix delegation)</title>
		<link>https://robert.penz.name/1522/how-to-configure-a-mikrotik-router-as-dhcp-pd-client-prefix-delegation/</link>
					<comments>https://robert.penz.name/1522/how-to-configure-a-mikrotik-router-as-dhcp-pd-client-prefix-delegation/#comments</comments>
		
		<dc:creator><![CDATA[robert]]></dc:creator>
		<pubDate>Tue, 06 Feb 2018 20:31:36 +0000</pubDate>
				<category><![CDATA[Networking]]></category>
		<guid isPermaLink="false">https://robert.penz.name/?p=1522</guid>

					<description><![CDATA[<p>Over time more and more IPS provide IPv6 addresses to the router (and the clients behind it) via DHCP-PD. To be more verbose, that&#8217;s DHCPv6 with Prefix delegation delegation. This allows the ISP to provide you with more than one subnet, which allows you to use multiple networks without NAT. And forget about NAT and [&#8230;]</p>
The post <a href="https://robert.penz.name/1522/how-to-configure-a-mikrotik-router-as-dhcp-pd-client-prefix-delegation/">How to configure a Mikrotik router as DHCP-PD Client (Prefix delegation)</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></description>
										<content:encoded><![CDATA[<p>Over time more and more IPS provide IPv6 addresses to the router (and the clients behind it) via DHCP-PD. To be more verbose, that&#8217;s <a href="https://en.wikipedia.org/wiki/DHCPv6" target="_blank" rel="noopener">DHCPv6</a> with <a href="https://en.wikipedia.org/wiki/Prefix_delegation" target="_blank" rel="noopener">Prefix delegation</a> delegation. This allows the ISP to provide you with more than one subnet, which allows you to use multiple networks without NAT. And forget about NAT and IPv6 &#8211; there is no standardized way to do it, and it will break too much.  The idea with PD is also that you can use normal home routers and cascade them, which requires that each router provides a smaller prefix/subnet to the next router. Everything should work without configuration &#8211; that was at least the plan of the <a href="https://www.ietf.org/" target="_blank" rel="noopener">IETF</a> working group.</p>
<p>Anyway let&#8217;s stop with the theory and provide some code. In my case my provider requires my router to establish a pppoe tunnel, which provides my router an IPv4 automatically. In my case the config looks like this:</p>
<p><code>/interface pppoe-client add add-default-route=yes disabled=no interface=ether1vlanTransitModem name=pppoeDslInternet password=XXXX user=XXXX</code></p>
<p>For IPv6 we need to enable the DHCPv6 client with following command:</p>
<p><code>/ipv6 dhcp-client add interface=pppoeDslInternet pool-name=poolIPv6ppp use-peer-dns=no</code></p>
<p>But a check with</p>
<p><code>/ipv6 dhcp-client print</code></p>
<p>will only show you that the client is &#8220;searching&#8230;&#8221;. The reason for this is that you most likely block incoming connections from the Internet &#8211; If you don&#8217;t filter &#8211;&gt; bad boy! :-). You need to allow DHCP replies from the server.</p>
<p><code>/ipv6 firewall filter add chain=input comment="DHCPv6 server reply" port=547 protocol=udp src-address=fe80::/10</code></p>
<p>Now you should see something like this</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-1523" src="https://robert.penz.name/wp-content/uploads/2018/02/dhcp-pd.png" alt="" width="667" height="60" srcset="https://robert.penz.name/wp-content/uploads/2018/02/dhcp-pd.png 667w, https://robert.penz.name/wp-content/uploads/2018/02/dhcp-pd-300x27.png 300w, https://robert.penz.name/wp-content/uploads/2018/02/dhcp-pd-600x54.png 600w" sizes="auto, (max-width: 667px) 100vw, 667px" /></p>
<p>In this case we got a /60 prefix delegated from the ISP, which counts for 16 /64 subnets. The last step you need is to configure the IP addresses on your internal networks. Yes, you could just statically add the IP addresses, but if the provider changes the subnet after an disconnect, you need to reconfigure it again. Its better configure the router to dynamically assign the IP addresses delegated to the internal interfaces. You just need to call following for each of your internal interfaces:</p>
<p><code>/ipv6 address add from-pool=poolIPv6ppp interface=vlanInternal</code></p>
<p>Following command should show the currently assigned prefixes to the various internal networks</p>
<p><code>/ipv6 address print</code></p>
<p>Hey, IPv6 is not that complicated. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>The post <a href="https://robert.penz.name/1522/how-to-configure-a-mikrotik-router-as-dhcp-pd-client-prefix-delegation/">How to configure a Mikrotik router as DHCP-PD Client (Prefix delegation)</a> first appeared on <a href="https://robert.penz.name">Robert Penz Blog</a>.]]></content:encoded>
					
					<wfw:commentRss>https://robert.penz.name/1522/how-to-configure-a-mikrotik-router-as-dhcp-pd-client-prefix-delegation/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
