Jekyll2024-03-13T02:18:34-07:00https://bruno.ph/Bruno PhilipeI write software, take photos, play videogames, and listen to music. Sometimes I also play music, build circuits, or try any of a dozen more interests and hobbies.
Bruno Philipeblog, verb2024-03-13T00:00:00-07:002024-03-13T00:00:00-07:00https://bruno.ph/blog/articles/blog-verbBruno Philipeadd new material to or regularly update a blog: it's about a week since I last blogged. – New Oxford American Dictionary Seems straightforward in theory, but as clearly demonstrated by the very specimen you are currently reading, it is far from it.<blockquote>
<p><strong>add new material to or regularly update a blog:</strong> <em>it's about a week since I last blogged.</em></p>
<p>– New Oxford American Dictionary</p>
</blockquote>
<p>Seems straightforward in theory, but as clearly demonstrated by the very specimen you are currently reading, it is far from it.</p>
<!--more-->
<p>I've been pushing myself to read more blogs in the past months, and although I haven't yet formed any sort of routine around it, I have found the experience very enlightening in one surprising way: each person's blog is truly unique.</p>
<p>I have always had this impression I could never make a good blogger. As I stumble across different people's posts through aggregators and social media, they all seem so <em>focused</em> and, most importantly, <em>prolific</em>.</p>
<p><em>I could never write like that</em>, I would often say to myself.</p>
<p>But then one thing happened:</p>
<p>Time.</p>
<p>And by this I don't intend to imply age automatically brings any wisdom or depth. As regularly exemplified by our favorite man-child zillionaire, far from it.</p>
<p>But you do get to notice a lot of stuff just by merely… being alive. And online. And <em>reading</em>.</p>
<p>What I realized reading more blog posts is that… I've been blogging this whole time, just not on my blog. Many people use their blogs to share links to things they found online, to share something that happened to them, a photo, etc.</p>
<p>And the realization – which came almost as an epiphany – was that I've been using social media for these things this whole time.</p>
<p>Now, experienced readers may be shaking their heads at this very moment and quietly murmuring under their breath…</p>
<blockquote>
<p>it's called micro-blogging for a reason, you idiot</p>
</blockquote>
<p>And you'd be right! It was there the whole time. But I think the core of this epiphany is the realization I had never given those tweets (then) and toots (now) any deep thought – err… except maybe on how memetic they'd be, fine, I grant you that.</p>
<p>And the inevitable conclusion from that epiphany was that I had this assumption that <em>blog posts</em> needed any deep thought to begin with. As if they're all essays waiting to be graded by the collective netizenry. (We all know this isn't <em>that</em> far from the truth though.)</p>
<p>Which is why the only blog post I ever wrote which survived all the iterations of this website is a (now outdated) tutorial.</p>
<p>But the fact is, none of it matters. None of the blogs <em>really</em> matter. Yes, not even Gruber's. That's not why they exist. They exist because humans are prolific blabbers, and because we can only babble to our peers for so long before they tell us to shut-up.</p>
<p>So babble away. In an age where the internet is already <a href="https://mashable.com/article/ai-generated-internet-era-already-here">choking with AI-generated crap</a> it's never mattered more (or less, depending on your leanings in life.)</p>
<p>And to finish this very babble, as <a href="https://front-end.social/@mia/112056878975842288">@mia@front-end.social recently tooted</a>:</p>
<blockquote>
<p>You're allowed to post on your blog once every decade, and you don't even need to apologize for it. That's also part of having your own space. </p>
<p>Personal sites aren't a competition, and productivity doesn't have to be a metric.</p>
</blockquote>
<p>This is my own space, and I'll <del>babble</del> blog to my liking.</p>
<p>Now does that mean I'll post here more often? We'll see. Check back in another 6 years.</p>
<p>– Bruno</p>
Postcard Exchange2024-03-09T00:00:00-08:002024-03-09T00:00:00-08:00https://bruno.ph/postcard-exchangeBruno PhilipeTL;DR: I have started a postcard exchange. Send me a postcard from anywhere and I’ll send one back!<p>TL;DR: I have started a postcard exchange. Send me a postcard from anywhere and I’ll send one back!</p>
<!--more-->
<h3 id="address">Address:</h3>
<blockquote>
<p>Bruno Resende<br>
PO Box 2116<br>
Vancouver, BC V6B 3T5<br>
Canada</p>
</blockquote>
<h3 id="important">Important:</h3>
<h4 id="make-sure-to-include-a-return-address-if-you-wish-to-receive-a-postcard-in-response">Make sure to include a return address if you wish to receive a postcard in response!</h4>
<p>Check with your local postal service whether you can mail postcards with a return address, as you may need to place it in an envelope for it to be processed properly.</p>
<h4 id="what-will-you-send-back">What will you send back?</h4>
<ul>
<li><h5 id="a-postcard">A postcard!</h5>
<p>I’ll send you a postcard from my collection. I have a large set from Vancouver, but also a few obscure ones from around the world. The postcard will be picked at random.</p></li>
<li><h5 id="or-a-4x6-print">OR, a 4x6" print!</h5>
<p>If you wish, you may also request a print from my photo gallery. In this case, I’ll send back a 4x6" (10x15cm) print from any of my photos I’ve taken around the world, which may be some landscape, a bird, a car, a building, or something else!</p>
<p>If there’s a particular photo from my gallery you’d like, include the photo ID in your postcard message, which you can find by clicking the share button in the photo’s page.</p>
<p>For example, for <a href="https://brunos.photos/Landscapes/i-4Jdfgrj/A">this photo</a>, the ID is <code>i-4Jdfgrj</code>.</p></li>
</ul>
<p>Please make sure your return of choice is mentioned in your postcard’s message. If no indication is present, I’ll reply with a postcard.</p>
<h4 id="when-should-i-expect-a-response">When should I expect a response?</h4>
<p>I’ll check the postal box at least once a week, and postal delivery times can vary from days-weeks in Canada, to weeks-months internationally, each way. They don’t call it snail-mail for nothing. Please be patient! I see this as a fun exercise in patience and asynchronous communication.</p>
<h4 id="can-i-send-you-something-else">Can I send you something else?</h4>
<p>Please refrain from sending anything other than a postcard or perhaps a photo print of your own work. My PO Box is small, and larger objects may be returned or require a fee to be collected, which I won’t pay. So please, let’s keep this to tiny mementos.</p>
<p>I’ll discard anything that doesn’t fit the spirit of this project, so please don’t send personal photos, business proposals, spam, etc. Thank you for playing along!</p>
<h4 id="what-about-my-address-that-s-personal-information">What about my address? That’s personal information!</h4>
<p>Indeed. You have my promise I won’t use that information for any purpose other than to send your response item, and I’ll do my best to erase your address from your postcard once I receive it. If you send your postcard in an envelope, that makes it easier. Also, check your local postal service for alternative delivery services, such as a PO box, neighborhood mail lockers, etc. Some postal services offer services that let you mail individual items to your local branch, from where you can pick it up for a fee. That being said, if you’re not comfortable sharing your address, but still wish to send a postcard, that is fine too! I’ll be happy to keep it, and if you include some other contact information, I’ll make sure to thank you through that.</p>
<h4 id="how-long-do-i-have">How long do I have?</h4>
<p>I’ve rented the PO Box for six months, and it is scheduled to be closed on 1st Sept, 2024. Keep in mind delivery times can be up to a month in some cases. If this project turns out to be popular, I might keep it going for longer. If I decide to end it, I’ll make sure to mention it here.</p>
<p>Now let’s get mailin’!</p>
Adding IPv6 support to VestaCP 0.9.8-192018-02-11T00:00:00-08:002018-02-11T00:00:00-08:00https://bruno.ph/blog/articles/adding-ipv6-support-to-vestacpBruno PhilipeThe current release of VestaCP (which I use to host this site) doesn’t currently support IPv6. In this tutorial I will explain how I managed to make my server accept IPv6 connections with very little changes to the config files of my server, in a way that makes it very easy to undo the changes when VestaCP eventually supports IPv6 officially.<p>The current release of VestaCP (which I use to host this site) doesn’t currently support IPv6. In this tutorial I will explain how I managed to make my server accept IPv6 connections with very little changes to the config files of my server, in a way that makes it very easy to undo the changes when VestaCP eventually supports IPv6 officially.</p>
<!--more-->
<p>First some details about my installation. I am currently running VestaCP version 0.9.8, release 19. It uses Apache for virtual domains and Nginx as reverse proxy (what actually serves each domain publicly), on a fresh install of CentOS 7.4.</p>
<p>Depending on your installation, this tutorial might not work, but it might at least point you towards the right direction.</p>
<h3 id="summary">Summary</h3>
<p>In this tutorial I will explain:</p>
<ol>
<li>How to find your public IPv6 address.</li>
<li>How to check if your DNS entries for IPv6 were setup correctly.</li>
<li>How to customize VestaCP configuration files without risk of overwrites or corruptions.</li>
<li>How to test the configuration files of Nginx and Apache for syntax errors without restarting their services.</li>
<li>How to test if IPv6 traffic routes to your server properly.</li>
</ol>
<h3 id="setting-up-the-dns">Setting up the DNS</h3>
<p>Before we even start, we need to make sure the DNS records are set up correctly. VestaCP can’t see the IPv6 assigned to your machine, so you need to find this out yourself.</p>
<p>One way to do this is by running <code>ip -6 addr</code> on your shell. In my case this was the output:</p>
<div class="highlight"><pre><code class="language-" data-lang="">$ ip -6 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1
inet6 ::2/128 scope global
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 2a03:b0c0:2:d0::625:d001/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::7c8b:b3ff:fe39:c2e2/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 fe80::c60:d5ff:fe07:db29/64 scope link
valid_lft forever preferred_lft forever
</code></pre></div>
<p>In my case I know my public interface is the one labeled <code>eth0</code>, but I can rule out the first one, since it is a <code>LOOPBACK</code> interface, and also the third one, because it starts with <code>fe80</code>, which means it is a local interface address. Therefore my public IPv6 is <code>2a03:b0c0:2:d0::625:d001</code>.</p>
<p>With that in mind, all I had to do was setup two DNS AAAA entries in my host provider (one for the domain itself, and one for the <code>www</code> subdomain). A DNS AAAA entry behaves exactly like a A entry, except it indicates an IPv6 address instead of an IPv4. The way you setup these entries depends on your hosting provider, so reach out to them if you can’t figure out how to do it.</p>
<p>I can test my DNS entries work by running <code>dig bruno.ph AAAA</code> on a shell in any machine connected to the internet:</p>
<div class="highlight"><pre><code class="language-" data-lang="">$ dig bruno.ph AAAA | grep bruno.ph
; <<>> DiG 9.9.4-RedHat-9.9.4-51.el7_4.2 <<>> bruno.ph AAAA;
bruno.ph. IN AAAA
bruno.ph. 1800 IN AAAA 2a03:b0c0:2:d0::625:d001
</code></pre></div>
<h3 id="setting-up-nginx">Setting up Nginx</h3>
<p>One important detail of running a control panel software like VestaCP is that most of the configuration files for the server software are automatically generated, and any changes you make to them will be overwritten when you make any changes from the control panel, or worse, will cause these files to be corrupted, causing your server software to fail launching. We want to avoid this possibility, and thankfully VestaCP is a very versatile software that provides methods of customizing the configuration files without risk.</p>
<p>In our case, the Nginx configuration files have hooks for extra configuration files that you can place in the same directory in order to customize them. If you read the contents of the configuration file for a certain domain, you will see near the end of the file that it includes any files with a certain prefix. For example, in the case of my domain <code>bruno.ph</code>, the configuration file <code>~/conf/web/bruno.ph.nginx.conf</code> includes the following line:</p>
<div class="highlight"><pre><code class="language-" data-lang="">include /home/<USERNAME>/conf/web/nginx.bruno.ph.conf*;
</code></pre></div>
<p>This means any file that matches that prefix will be included in the scope of that server configuration. So I created the file <code>/home/<USERNAME>/conf/web/nginx.bruno.ph.conf.ipv6</code> with the following contents:</p>
<div class="highlight"><pre><code class="language-" data-lang="">listen [2a03:b0c0:2:d0::625:d001]:80;
</code></pre></div>
<p>Next I repeated the process by looking for the include prefix in the SSL version of the configuration file, creating the file <code>/home/<USERNAME>/conf/web/snginx.bruno.ph.conf.ipv6</code> (notice the <em>s</em> prefix in the filename) with the following contents:</p>
<div class="highlight"><pre><code class="language-" data-lang="">listen [2a03:b0c0:2:d0::625:d001]:443;
</code></pre></div>
<p>Next, I tested the configuration files by running the Nginx tester tool <code>nginx -t</code>:</p>
<div class="highlight"><pre><code class="language-" data-lang="">$ nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
</code></pre></div>
<p>This is an important step, as a syntax error in these files will cause the nginx restart to fail, and your server to go down! Thus make sure to run this tool every time you make changes to config files.</p>
<blockquote>
<p>As a sidenote, Apache also has a config tester tool. Just run <code>apachectl configtest</code>.</p>
</blockquote>
<p>Knowing the config file is good, we simply need to run <code>service nginx restart</code> to restart the server with the new settings.</p>
<h3 id="testing-ipv6-routing">Testing IPv6 routing</h3>
<p>If you are unsure whether your have IPv6 enabled in your own device, you can visit <a href="https://ip6.nl/">ip6.nl</a> to find out. That page will show the IPv6 routing capabilities of your own connection. In my case, my ISP does not yet provide IPv6 connectivity at all, therefore I can’t test if IPv6 works myself. However that website also provides domain readiness tests, so all you have to do is fill your own domain the filed under the label "test the IPv6 readiness of an internet domain" and it will test the IPv6 capabilities of your server. In my case, everything works fine!</p>
<p><img src="/images/blog/adding-ipv6-support-to-vestacp/test-results.jpg" alt="ip6.nl readiness test results for bruno.ph"></p>
<p>That concludes this tutorial. Hopefully this helps you setup your own VestaCP installation to accept IPv6 traffic! </p>