<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by cetaSYN on Medium]]></title>
        <description><![CDATA[Stories by cetaSYN on Medium]]></description>
        <link>https://medium.com/@cetaSYN?source=rss-614f1f803401------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1rb6Jz8sp7M7C0BBid6w0g.jpeg</url>
            <title>Stories by cetaSYN on Medium</title>
            <link>https://medium.com/@cetaSYN?source=rss-614f1f803401------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 13:36:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cetaSYN/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Bypassing Linux Firewalls with IPv6]]></title>
            <link>https://medium.com/@cetaSYN/bypassing-linux-firewalls-with-ipv6-856a85a021bd?source=rss-614f1f803401------2</link>
            <guid isPermaLink="false">https://medium.com/p/856a85a021bd</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[firewall]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[ipv6]]></category>
            <dc:creator><![CDATA[cetaSYN]]></dc:creator>
            <pubDate>Sat, 08 Jun 2019 04:31:38 GMT</pubDate>
            <atom:updated>2019-12-14T00:12:27.399Z</atom:updated>
            <content:encoded><![CDATA[<h3>Bypassing Linux Firewalls with Link-Local IPv6</h3><p>Disclaimer: I’m not an IPv6 expert, but I do have a semi-working knowledge.</p><h3>Premise</h3><p>During a King-of-the-Hill or Attack/Defend-style Capture the Flag exercise, defenders are under pressure to defend many hosts at once, to the best of their ability, as quickly as possible. This leads to corners being cut that can lead to another team gaining access.<br>With Linux hosts especially, defenders will leverage iptables to quickly lock down remote access, but neglect ip6tables: the IPv6 firewall.</p><h3>Background</h3><p>Very few hosts in private networks (including CTF networks) have intentionally-configured IPv6, so it’s easy to think you don’t have to concern yourself with a protocol that is largely unused. Unfortunately that’s not the case.<br>An IPv6-hands-off network won’t have Global Unicast Addresses (GUAs: Think public IPv4 WAN addresses) or Unique Local Addresses (ULAs: Think private IPv4 LAN addresses), so you most-likely won’t be able to directly access your targets using IPv6.<br>However, any host that supports it will still have Link-Local IPv6 addresses (Think IPv4 APIPA addresses) which operates within a broadcast domain and can be used to pivot between compromised hosts, potentially bypassing IPv4 defenses.<br>Link-Local IPv6 addresses are automatically assigned to every interface on a host, regardless of if they have GUAs or ULAs.</p><h3>Technique Application (Address Discovery)</h3><p>As far as the actual application of this technique, you might be thinking, “Well that’s easy, I’ll just start using IPv6 link-local addresses to pivot! Cool!” Unfortunately there’s a bit more legwork than that, but it’s not too complicated.</p><p>The primary challenge with using IPv6 link-local addresses in a CTF scenario is that the addresses do not directly correlate between IPv4 and IPv6. This creates two problems:<br>Firstly: You need to verify the target you’re attacking is within the scope of the competition.<br>Secondly: If the host doesn’t have any IPv4 defenses, it’s probably not worth the effort to try to pivot using IPv6.<br>Ultimately, matching up targets between IPv4 and IPv6 is critical to utilizing it effectively.</p><p>Correlating isn’t terribly complicated and there’s two way to go about it: cross-referencing the MAC to the NDP and ARP tables, and using the formula that machines use to generate link-local addresses.</p><h4>NDP-ARP Cross-Reference</h4><p>The most reliable method, in my opinion, is to cross-reference Neighbor Discovery Protocol (NDP) and Address Resolution Protocol (ARP). These show the MAC address associated with an address, giving you complete confidence that you’re targeting the correct host.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*09dsi3fOol1QkJ33B6NMgA.png" /><figcaption>Using multicast all-hosts ping to populate NDP table and cross-referencing with ARP table.</figcaption></figure><p>To begin, you must populate your IPv4 ARP table. Just ping the host you wish to target. For example, let’s say you’re targeting 192.168.1.1.<br>ping 192.168.1.1 -c 1<br>Easy peasy.</p><p>Next populate your IPv6 NDP table. This is a bit more complicated since you don’t know what address to target. Luckily, you can use multicast to help you out:<br>ping6 ff02::1%eth0<br>Ctrl-C (after a moment)<br>Congrats, your NDP table is now filled with <em>all</em> the link-local addresses.<br>If you’re unfamiliar with what the above does, bear with me, I’ll get into it below.</p><p>Now that you’ve populated both tables, just use the ip neighbor command to show both tables at once (or ip -6 n / ip -4 n if you want them separate). Compare the MAC addresses between the two protocols to find the link-local address for your target.</p><h4>Multicast in IPv6 (Populating NDP Tables)</h4><p>You may be familiar with broadcast in IPv4. IPv6 doesn’t have broadcast, but it does have reserved multicast addresses that can do essentially the same thing:<br>- ff02::1 — Address all nodes<br>- ff02::2 — Address all routers<br>- ff02::3 — Address all hosts</p><p>If you’re looking to ping6 one of these addresses, be sure not to use the -c option to limit the number of responses. While it may be tempting, ping6 interprets the large number of responses to that address as an error (That’s why you see (DUP!) in all the lines after the first one. You need to let it recieve all the duplicate responses.</p><h4>Direct Conversion</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*ts5lqq047mBl0Om1_sDVfQ.png" /><figcaption>Utilizing a script to convert a MAC address into an IPv6 link-local address</figcaption></figure><p>The second method to get the link-local IPv6 address of a target is to just use the same algorithm that your computer would to generate it’s own IPv6 link-local address. You can type “MAC to Link-Local IPv6 converter” into Google and get plenty of online calculators.</p><p>While this is obviously the easier method of the two, I’ve found pretty consistently (especially in VMWare environments), that the addresses you’re expecting aren’t always the one the host has given itself. I’m not sure why, but if you’re having trouble this might be why.</p><h3>Technique Application (Pivoting)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KF8XcIKw94uFEVLSo0lKlQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*LQ0E1UwxjirFyPp8EUn0YA.png" /><figcaption>Server configurations for two virtual servers.</figcaption></figure><p>Now let’s put this into action.<br>As a reminder, we’ve already compromised a host within our target’s network, but we can’t access our target because they have all IPv4 traffic blocked. They haven’t configured an IPv6 firewall because the IPv6 addresses aren’t routable outside the broadcast domain and were overlooked as an attack vector.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*4R96iTtw6iBUwPfBiWNYjQ.png" /><figcaption>Image showing SSH local tunnel creation and inability to access a target box directly.</figcaption></figure><p>First set up a local SSH tunnel directing your traffic to your intermediate host within that target broadcast domain. In this case we will use 172.16.178.131 as our intermediate host, forwarding all local traffic on port 9999 to the intermediate on 22.<br>ssh -L 9999:localhost:22 user@172.16.178.131</p><p>Next we will create another tunnel, taking all local traffic on port 9998 and forwarding it through our existing tunnel to our target on port 22.</p><p>We will be using fe80::20c:29ff:fe23:cb38 for our example target.<br>ssh -L 9998:[fe80::20c:29ff:fe23:cb39%ens33]:22 user@localhost -p 9999<br>You may notice that the IPv6 address above is enclosed in brackets and followed by ens33. The brackets are simply used to denote an IPv6 address and prevent confusion with the rest of the forwarding statement. The ens33 is the interface that we want to use to send out the traffic. We have to specify this because different interfaces may reside on different broadcast domains and the host can’t make assumptions. ens33 is the interface we will be using on the <strong><em>intermediate</em></strong> host, not our local machine or the target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*IYKj5-Yc3blsb_Piendfsw.png" /><figcaption>Example of using Metasploit ssh_login module across the earlier SSH local tunnels.</figcaption></figure><p>Now that we have our tunnels set up, we can send traffic across to our target. As you may have assumed from the port number of the last tunnel, we’re targeting SSH here.<br>The picture shows ssh_login being used across the tunnel to leverage valid credentials for shell access.<br>This technique isn’t limited to ssh_login. You can use other payloads targeting other services if you adjust the tunnel’s destination port.</p><p>As a parting note on leveraging the tunnel, don’t forget that if your payload is a reverse-type, you may need to use the reverse_ipv6 variant. This depends solely on if the administrator has blocked IPv4 outbound.</p><h3>Mitigation</h3><p>Wanting to defend against this and don’t want to deal with IPv6 at all?<br>ip6tables -P INPUT DROP<br>ip6tables -P OUTPUT DROP<br>Done.</p><h3>Conclusion / Personal Experience</h3><p>I enjoy using this lesser-known technique during competitions and have has pretty good success with discovering services that are available over IPv6 but not IPv4. Usually when I encounter issues, it’s on older hosts that interact with IPv6 in unexpected ways, or older tools that don’t support the addresses. Additionally, Windows doesn’t frequently experience this issue because the protocols are largely unified from a firewall perspective. That said, I have seem a few times where an admin erroneously specified to only apply a rule to IPv4, creating the same scenario.</p><p>I hope that this expands your view as either an attacker or defender: Let’s stop neglecting IPv6.</p><h4>Corrections / After-Notes</h4><p>I woke up in the middle of the night after reading this and realized that the first tunnel in the pivoting section is redundant. In the future, I should sit on a post for a day before publishing it. Ultimately the guide still works as described, but it could be reduced there.</p><p>I’ve had a few people suggest using the IPv4-in-IPv6 notation (::ffff:192.168.1.1), but I can’t seem to get that to work for this. I’ve done some research and it leads me to believe that notation was only used temporarily on certain network stacks and/or is only applicable to GUAs. If you know how to use this, I’d love to get more info on how to improve my process!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=856a85a021bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Qubes OS R4.0: Two-week review / notes]]></title>
            <link>https://medium.com/@cetaSYN/qubes-os-r4-0-two-week-review-notes-3b79a9fca6ea?source=rss-614f1f803401------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b79a9fca6ea</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[qube]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[cetaSYN]]></dc:creator>
            <pubDate>Sun, 06 May 2018 22:27:57 GMT</pubDate>
            <atom:updated>2019-06-09T05:21:53.457Z</atom:updated>
            <content:encoded><![CDATA[<p>NOTE: This story is now quite old and likely does not reflect the current state of QubesOS.</p><p>It has been two weeks since I took the leap to trying Qubes OS as a daily-driver. Here’s my experiences: the good, the bad, and the workarounds.</p><h3>Installation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pehDWGnp8jHL4Uwnzx56-g.png" /><figcaption>Qubes OS Website</figcaption></figure><p>I was very nervous to start the install process. After watching numerous YouTube videos and reading forums, I was under the impression that unless you bought hardware specifically for Qubes, you would be spending weeks troubleshooting, possibly without success.</p><p>The install was a breeze for me. I did have to enable Intel VT-D in my UEFI configs, but aside from that, it was smooth sailing.</p><p>Lastly, sorting my data into separate Qubes is a little-mentioned time sink though, and I’m still not done with that process after these two weeks.</p><h4>The Good</h4><p>Very painless. The one issue I did have was easily remedied and well-documented.</p><h4>The Bad</h4><p>There’s such a negative air regarding Qubes compatibility, even from the official site, it turned me off for a long time. I procrastinated for a long while, expecting to be lacking a workable desktop after the attempt.</p><p>If you plan on bringing your old data along to your new Qubes system, expect to spend some time sorting everything. Frequently where something belongs can be ambiguous, turning it into even more of a headache when you need something later and can’t remember which Qube it ended up in.</p><h4>The Workarounds</h4><p>I wish that, prior to taking the leap, I had created an updated model of my life and planned out how I wanted to isolate my data. Creating a well-organized segmentation of my life on-the-spot was nothing short of a disaster. I’m planning to reorganize my Qubes soon, luckily Qubes makes this process straightforward.</p><h3>QVM Usage</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*U8fH66AlA3X-p3fW.png" /></figure><p>There’s something to say about that Security-Useability-Functionality triangle here. Qubes definitely forces a mindset of security, at the cost of some mild headaches getting data where it needs to go. That said, I appreciate how smooth the Qubes team has made the process. The tools for managing the QVMs themselves are a bit clunky, but manageable.</p><h4>The Good</h4><p>If you force yourself to buy into Qubes’ model of security-by-isolation, it quickly becomes apparent how much overlap there is outside of just a desktop environment. My phone terrifies me, and that’s my next project. Just adopting this mindset was extraordinarily beneficial to me, and I have to thank Qubes for making the process subconscious.</p><p>Moving data between QVMs, either with right-click or terminal qvm-copy/qvm-move, it&#39;s incredibly quick, easy, and intuitive. The occasional Ctrl-C, Ctrl-Shift-C, Ctrl-Shift-V, Ctrl-V, clipboard-transfer is quite nice as well.</p><h4>The Bad</h4><p>The Qubes Manager locks up any time you make a change, and has to be manually refreshed after said change. It got frustrating, so I made some scripts to make things easier. Github below.</p><p>Qubes recommends installing on an SSD. It surprised me that TRIM wasn’t enabled by default. Easy fix below.</p><h4>The Workarounds</h4><p>Scripts to make QVM management a bit easier:<br>(link removed, reach out if you want a copy)<br> <strong>NOTE:</strong> These are by me, for me, so you may need to tweak a bit.</p><p>Enable scheduled TRIM:</p><pre>systemctl enable fstrim.timer<br>systemctl start fstrim.timer<br># Test with:<br>fstrim -av</pre><h3>QVM OS Guest Install</h3><p>Setting up new QVMs is easy for the most part. The template system is well-thought-out and enjoyable to use. Kinda tough to install new OSes though, and I’m not even attempting Windows just yet.</p><h4>The Good</h4><p>Creating a new AppVM is cake. Creating a new TemplateVM based upon a pre-existing VM is slightly-less-than-cake, but still tasty. Makes the security-by-isolation easy to tailor to your own needs.</p><h4>The Bad</h4><p>I have yet to get a from-scratch OS install to work. Someday I’ll dig in more, but for now I’m a bit put off considering how relatively easy everything else has been. Windows terrifies me in this regard.</p><p>Specifically, Kali I couldn’t get to install fresh, dispite multiple attempts. I ended up following the [Kali Linux TemplateVM from a Debian template] (<a href="https://www.qubes-os.org/doc/pentesting/kali/#kali-linux-templatevm-from-a-debian-template--">https://www.qubes-os.org/doc/pentesting/kali/#kali-linux-templatevm-from-a-debian-template--</a>) guide, and still had problems with file conflicts between Qubes and Kali. Luckily there wasn’t any actual changes between the files, so I was able to just force the install process and now I have a working Kali 2018 template.</p><h4>The Workarounds</h4><p>When installing with the earlier guide, Kali install complains that /etc/dconf/profile/user already exists. Hilariously, it’s trying to replace the file with the exact same content. Force it to ignore the conflict with sudo apt -o Dpkg::Options::=&quot;--force-overwrite&quot; install kali-defaults</p><h3>QVM Software</h3><p>Having things isolated is actually nice when you want to run multiple instances of software that doesn’t normally allow it. <em>*coughDiscordcough*</em> That said, I’ve definitely hit a few quirks using software in QVMs, mostly graphical or device-access related.</p><h4>The Good</h4><p>Run multiple instances without conflict. No need to switch between accounts for software that only supports one instance, just run it in a different QVM. Nice.</p><p>Yubikey passes easily into text fields in QVMs since it acts like a keyboard. More of a Yubikey benefit, but still worth mentioning.</p><h4>The Bad</h4><p>Say goodbye to your mouse cursor changing based upon the context of the window. Learn to love the arrow.</p><p>If you’re wanting to use a Yubikey for 2FA on a webpage, it’s not going to see it without some effort, too much effort in my opinion vs other 2FA options.</p><p>Lastly, Java acts wonky as heck. I tried running PyCharm and the right-click menus disappeared almost instantly. Troubleshot for several hours, then moved to Atom for my IDE. (Not regretting that, Atom is nice as heck)</p><h4>The Workarounds</h4><p>N/A</p><h3>Summary</h3><p>I’m really enjoying my experience with Qubes.<br> I look forward to the OS improving over time, and I’m very appreciative of my newfound consideration for data isolation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b79a9fca6ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DNS-over-TLS Part 2: Impeding my network for little benefit]]></title>
            <link>https://medium.com/@cetaSYN/dns-over-tls-part-2-impeding-my-network-for-little-benefit-7671d7942c16?source=rss-614f1f803401------2</link>
            <guid isPermaLink="false">https://medium.com/p/7671d7942c16</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[tls]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[dns-over-tls]]></category>
            <dc:creator><![CDATA[cetaSYN]]></dc:creator>
            <pubDate>Sat, 14 Apr 2018 03:44:38 GMT</pubDate>
            <atom:updated>2019-06-09T05:22:44.923Z</atom:updated>
            <content:encoded><![CDATA[<p>NOTE: This is outdated. pfSense now has GUI options to do the same as what is described here that work better. I am currently using the GUI options and have had no issues as are described below. Furthermore, TLS1.3 is gaining ground quickly.</p><p>Or how I made the other people on my network hate me for doing unnecessary things.</p><p>About a week ago <a href="https://blog.ioncann0ns.com/pfsense-dns-over-tls/">I set up DNS-over-TLS</a>. It was a neat little thing to do, and I enjoyed seeing how it affected my traffic. I can now say, first-hand, it does exactly what it says on the tin. My traffic to and from the DNS resolver was encrypted. Lookups were hidden from those who might have otherwise observed my DNS traffic. Is it worth it? It might be for you, but for myself it wasn’t.</p><h3>Complaints</h3><h4>Confidentiality Bypass</h4><p>Sure, the DNS is encrypted, but it was still very easy to figure out where I was communicating.</p><p>For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QS1ZrTtvZZnnhDJN.png" /></figure><ol><li>Here we see the domain being resolved over 853, DNS-over-TLS.<br>Nothing significant to see.</li><li>Then an HTTPS session starts up with a server hosted on Linode.<br>Since Linode is shared-hosting, we can’t just reverse the IP to figure out what is hosted at that address.</li><li>But take a look at the certificate exchange.<br>The name of the resource being visited is visible in plaintext.<br>I was visiting <a href="https://darksky.net/">DarkSky</a>.</li></ol><p>The destination-confidentiality provided by DNS-over-TLS has just been rendered useless by the communication session itself.<br>This is about the point where I had people tell me, “Well, who is actually gonna break open a packet that deep?”</p><p>Well, <a href="https://www.evilsocket.net/2017/06/30/BetterCap-1-6-1-TLS-Server-Name-Indication-and-Why-We-Need-to-Encrypt-It/">bettercap has support for it.</a> and <a href="https://community.sophos.com/kb/en-us/125683">Sophos Firewall uses it for categorization.</a><br>I’d venture a guess that this is being pulled out in DPI pretty often by anyone with an interest in where you’re going. (See: ISPs)</p><p>So, it’s not the magic “traffic cloaker” that seems to be touted right now.</p><h4>Performance</h4><p>While running DNS-over-TLS, lookup times more than doubled. Everything dragged, especially on domains with a large number of referenced subdomains.<br>Looking at the packet captures, it seemed like a new TLS session was set up for every queried domain and subdomain.</p><p>It was quickly <em>suggested</em> by others using my network to undo whatever the heck I did to cause the slowness.</p><p>I didn’t run any benchmarks myself, but I will link to “<a href="https://www.dnsv6lab.net/2016/03/05/A-performance-test-of-DNS-over-different-transport-protocol/">A performance test of DNS over different transport protocol</a>” by Runxia Wan back in 2016. As shown in their tests, TLS is significantly slower than regular DNS, but this gives me hope for DNS-over-HTTPS in the future.</p><h3>Benefits</h3><p>It’s not a complete wash though. As I said before, it might be worth it to you. Here’s some cases to consider where it would benefit:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9JqbExv8Zr3UJo_i42a0jA.jpeg" /></figure><h4>Transparent DNS Proxying</h4><p><a href="https://www.dnsleaktest.com/what-is-transparent-dns-proxy.html">A nice explanation and graphic from DNSLeakTest.com.</a><br>Some ISPs <em>really really</em> want you to use their DNS servers, so that they can do sneaky logging, redirection, and injection.</p><p>DNS-over-TLS would prevent that, because all the actual DNS request data is encrypted.<br>The worst your ISP could do is block the data altogether, and you’d definitely notice not being able to resolve anything.</p><h4>Embedded User Data</h4><p>The DNS Privacy Project details another concern that I hadn’t considered. <a href="https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+-+The+Problem">Apparently some ISPs embed user metadata in the queries.</a> Being uniquely identified behind NAT is definitely a more significant privacy concern than just traffic eminating from a home network as a whole. Specifically-targeted user-metadata in plaintext? Count me out.<br>My ISP doesn’t do this, so it’s not a problem for me yet. If they start, I’ll probably find a way to improve my encrypted-DNS experience and stick with it.</p><h4>VPN Leaking</h4><p>The internet loves it’s VPNs right now. Whether you’re doing it for privacy at a public spot, to hide your nefarious movie downloads, or other reasons, you’re relying on your DNS to be encapsulated in the VPN tunnel for both confidentiality and integrity.<br>Unfortunately, that’s not always guarenteed. DNS ‘leaking’ outside of a VPN is an easy mistake to make, and could completely undermine the tunnel itself. By setting up the host to use encrypted DNS, you’re ensuring that even if your VPN leaks, it isn’t visible to anyone observing the traffic.</p><h3>The Future</h3><p>The future comes with TLS 1.3. Cloudflare did a nice <a href="https://blog.cloudflare.com/tls-1-3-overview-and-q-and-a/">TLS 1.3 Overview and Q&amp;A</a> if you’re interested. The part that is relevant here is that the certificate is now encrypted, repairing the earlier mentioned confidentiality bypass. There are <a href="https://twitter.com/filosottile/status/689919966900924416">still issues, as discussed by @filosottile</a>, but it’s a significant step in the right direction.<br>When TLS 1.3 starts gaining mainstream acceptance, I may try out DNS-over-HTTPS.</p><h3>Summary</h3><p>There’s significant steps being made to secure DNS. It may be worthwhile for some individuals to jump onboard now, but for myself, I’ll wait a while longer.</p><h3>Credit</h3><h4>Twitter:</h4><p>Thanks to <a href="https://twitter.com/orcakeiko">@orcakeiko</a> for giving me a starting point for further research.</p><h4><a href="https://blog.ioncann0ns.com/dns-over-tls-part-2/themanyhats.club">The Many Hats Club</a>:</h4><p>Thanks to <a href="https://twitter.com/proxyblue">@proxyblue</a> for giving their take on the benefits to encrypted-DNS.<br>Thanks to <a href="https://twitter.com/uncl3dumby">@uncl3dumby</a> for playing both advocate and critic, prompting discussion.<br>Lastly, thanks to sae (Couldn’t find Twitter) for participating in the discussion and prompting further research into TLS 1.3.</p><p>Other references linked inline.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7671d7942c16" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[pfSense DNS-over-TLS]]></title>
            <link>https://medium.com/@cetaSYN/pfsense-dns-over-tls-bb2b69104869?source=rss-614f1f803401------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb2b69104869</guid>
            <category><![CDATA[cloudflare]]></category>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[unbound]]></category>
            <category><![CDATA[pfsense]]></category>
            <category><![CDATA[dns-over-tls]]></category>
            <dc:creator><![CDATA[cetaSYN]]></dc:creator>
            <pubDate>Wed, 04 Apr 2018 01:31:48 GMT</pubDate>
            <atom:updated>2019-06-07T22:01:42.685Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>NOTE: This is outdated. pfSense now has GUI options to do the same as what is described here that work better.</strong></p><p>Cloudflare went public with their new <a href="https://1.1.1.1/">1.1.1.1</a> DNS resolver a couple days ago. Given this, I wanted to not only try it out, but to hop onboard with the <a href="https://developers.cloudflare.com/1.1.1.1/dns-over-https/">DNS-over-TLS</a> feature they support.</p><p>I use <a href="https://www.pfsense.org/">pfSense</a> on my home network. The pfSense Resolver is a front-end for the Unbound DNS resolver. Unbound supports DNS-over-TLS, but pfSense doesn’t have the GUI to configure it easily just yet.</p><p>This was written using the following versions:</p><ul><li>pfSense 2.4.3-RELEASE</li><li>( cat /etc/version )</li><li>Unbound 1.6.8</li><li>( cat /var/log/resolver.log | grep &#39;start of service&#39; )</li></ul><h3>Pre-Change Observation:</h3><p>DNS traffic that was visible outside of my network before the change. Pretty much the norm: UDP over port 53.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/0*BPjFTUYJ51X1oHs4.png" /></figure><h3>Services &gt; DNS Resolver:</h3><p>Configure DNS-over-TLS on pfSense DNS Resolver.</p><ul><li>Un-check ‘DNS Query Forwarding’/’Enable Forwarding Mode’</li></ul><p>( Getting rid of the auto-generated forwarding block and throwing our own in the ‘Custom options’ block later. )</p><ul><li>Custom options: (Added below any pre-existing options)</li></ul><pre># Enable DNS-over-SSL (An alias for tls-upstream)<br>ssl-upstream: yes<br># Forwarding Zone<br>forward-zone:<br>   name: &quot;.&quot;<br>   forward-ssl-upstream: yes<br>   forward-addr: 1.1.1.1@853 # Cloudflare<br>   forward-addr: 1.0.0.1@853 # Cloudflare</pre><p>Just make sure your lines are indented correctly. That’s key.<br> If you wanted to use IPv6 or Google’s DNS resolver, it’s the same thing, written into your forward-zone:</p><pre>    forward-addr: 2606:4700:4700::1111@853 # Cloudflare<br>    forward-addr: 2606:4700:4700::1001@853 # Cloudflare<br>    forward-addr: 8.8.8.8@853 # Google<br>    forward-addr: 8.8.4.4@853 # Google<br>    forward-addr: 2001:4860:4860::8888@853 # Google<br>    forward-addr: 2001:4860:4860::8844@853 # Google</pre><p>In fact, if you wanted to get real funky, take a look at the official docs:<br> <a href="https://www.unbound.net/documentation/unbound.conf.html">https://www.unbound.net/documentation/unbound.conf.html</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mw2tBpYeVTosueG_.png" /></figure><h3>System &gt; General Setup:</h3><p>Have pfSense perform its own lookups over TLS.</p><ul><li>Remove all DNS servers listed in the DNS Server Settings &gt; DNS Servers fields.</li></ul><p>( This is optional unless you skip the next step. )</p><ul><li>Un-check ‘Do not use the DNS Forwarder/DNS Resolver as a DNS Server for the firewall’</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oD7Zj8g6rJxrnU-m.png" /></figure><h3>Reboot:</h3><p>I’m not 100% sure if it’s necessary to reboot here, but I fought a number of hard-to-pin obscure issues, like intermittent failure to resolve on localhost. One reboot and it all worked like magic. <br>Diagnostics &gt; Reboot <br>Also reboot &amp; /flushdns on your client devices. <br>Your blood pressure will thank you.</p><h3>Post-Change Observation:</h3><p>If you have any issues, first try cat /var/unbound/unbound.conf from the Web-Command-Prompt and make sure your formatting doesn&#39;t look wonky.</p><p>I’m still seeing a few stray UDP/53 DNS queries here and there to 8.8.8.8, but they’re all resolving Google services. Maybe one of my Google devices really likes its own servers. Not a big deal.<br>As for the vast majority…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Lg6-xBpV91XvidXc.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/0*zYowjaiQ46rnMNaj.png" /></figure><p>Begone plaintext name resolution!<br>It may be in my head, but it does seem like communication is starting up a bit more slowly. It’s not enough to make the other people on the network complain though, so that’s good enough for me.</p><p>👍</p><p>Credit:</p><ul><li><a href="https://calomel.org/unbound_dns.html">Calomel Unbound DNS Tutorial</a> used to understand config file formatting and some options.</li><li><a href="https://www.unbound.net/documentation/unbound.conf.html">Unbound Documentation</a> used to understand config options.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb2b69104869" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pi-hole Troubleshooting]]></title>
            <link>https://medium.com/@cetaSYN/pi-hole-troubleshooting-my-lessons-learned-244c4ce3cedd?source=rss-614f1f803401------2</link>
            <guid isPermaLink="false">https://medium.com/p/244c4ce3cedd</guid>
            <category><![CDATA[pfsense]]></category>
            <category><![CDATA[pihole]]></category>
            <category><![CDATA[iptables]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[troubleshooting]]></category>
            <dc:creator><![CDATA[cetaSYN]]></dc:creator>
            <pubDate>Tue, 16 Jan 2018 02:00:45 GMT</pubDate>
            <atom:updated>2019-06-09T05:23:19.653Z</atom:updated>
            <content:encoded><![CDATA[<p>NOTE: This story is now quite old and these issues have been resolved in later releases.</p><p>I’ve had a few strange performance issues my Pi-hole and client devices. <br>(Pi-hole v3.2.1/AdminLTE v3.2.1/FTL v2.13.2, though the issue has been for a while)<br>Here’s my short list, with solutions, in hopes that it might help someone else out there:</p><p><strong>Intermittent slowness with clients loading web pages:</strong></p><p>This one plagued me for a while. It happened here and there, but mostly on news sites that were provided through Google AMP. I finally broke down and dug into the network traffic with Wireshark and found that some of the traffic was using the QUIC protocol, which operates over UDP instead of TCP.</p><p>Pi-hole usually operates by telling the querying device that a blackholed site is actually the Pi-hole itself, and when it tries to load that content, it just gets a ‘block’ page serviced by the Pi-hole. But that doesn’t work for UDP. And UDP isn’t connection-oriented. The browser goes out, waits for a response, and it never gets it. It just sits there loading, hanging everything up.</p><p>My solution:</p><p><em>iptables -A INPUT -p tcp --dport 443 -j REJECT --reject-with tcp-reset<br>iptables -A INPUT -p udp --dport 443 -j REJECT --reject-with icmp-port-unreachable<br>iptables -A INPUT -p udp --dport 80 -j REJECT --reject-with icmp-port-unreachable</em></p><p>The same can be applied to<em> ip6tables</em>, if you’re using IPv6.<br>This will cause TCP HTTPS traffic (not handled by Pi-Hole) to recieve a tcp-reset, closing the connection gracefully, as well as solve the issue with QUIC by giving UDP HTTP/HTTPS traffic an icmp-port-unreachable, closing the connection immediately.</p><p><strong>Intermittent slowness with clients, part 2:</strong></p><p><strong>CLARIFICATION</strong>: This section pertains to applying the prior section to the pfSense firewall distribution. It is not for Pi-hole.</p><p>Now everything was working great… except on WiFi?<br>This isn’t actually anything to do with Pi-hole specifically, but I kept getting slowness on my wireless devices and discovered that I had overlooked my vlan rules after fixing the first issue. (❤ Wireshark)</p><p>You could probably accomplish this with most routers/firewalls, but here’s how I handled it with pfSense:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*dUZl1EjRWRKQkpGDluvVuQ.png" /><figcaption>PfSense Firewall Rule Help-Text</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ay5AuClcpOcd2lCDXwEsQQ.png" /><figcaption>PfSense Firewall Rules for Pi-Hole</figcaption></figure><p>pfSense is smart enough to know how to properly reject both TCP and UDP in the most effective manner. (tcp-reset/icmp-port-unreachable, respectively)<br>Firewall rules for non-administrative VLANs should follow this pattern:</p><p><em>ALLOW UDP from &lt;Client subnet&gt; to &lt;Pi-hole Address&gt; on Port 53<br>REJECT TCP/UDP from &lt;Client subnet&gt; to &lt;Pi-hole Address&gt; on Port 80<br>REJECT TCP/UDP from &lt;Client subnet&gt; to &lt;Pi-hole Address&gt; on Port 443</em></p><p>This emulates the iptables rules mentioned in the previous segment on PfSense, eliminating the annoying page-hanging on clients.</p><p><strong>Very slow/stalling Pi-Hole admin page:</strong></p><p>I don’t use IPv6 anywhere on my network. I will someday, but for now nothing uses it. So it came as a shock to me that this was the source of my issues with the admin page stalling. Since I know I don’t use it anywhere, I have a habit of setting my ip6tables to DROP on INPUT, FORWARD, and OUTPUT on all my devices. Apparently Pi-hole does something funny with IPv6 and self-querying, causing a hang.</p><p>Easy fix:</p><p><em>ip6tables -A INPUT-i lo -j ACCEPT</em></p><p>Now the admin page loads like a charm. 👍</p><p>Thanks for reading, hope this helps someone else out there!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=244c4ce3cedd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>