<?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>Brock&#039;s Blog</title>
	<atom:link href="http://blog.brocktice.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.brocktice.com</link>
	<description>Formerly Virtually Shocking</description>
	<lastBuildDate>Tue, 18 Mar 2025 14:58:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Deploying 464XLAT for IPv6-only clients on a small WISP network with Mikrotik routers</title>
		<link>https://blog.brocktice.com/2017/12/27/deploying-464xlat-for-ipv6-only-clients-on-a-small-wisp-network-with-mikrotik-routers/</link>
					<comments>https://blog.brocktice.com/2017/12/27/deploying-464xlat-for-ipv6-only-clients-on-a-small-wisp-network-with-mikrotik-routers/#comments</comments>
		
		<dc:creator><![CDATA[Brock Tice]]></dc:creator>
		<pubDate>Thu, 28 Dec 2017 01:01:19 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://blog.brocktice.com/?p=1907</guid>

					<description><![CDATA[Motivation The world is out of IPv4 addresses. While some can be bought and traded, ARIN is no longer issuing new assignments to organizations in the USA. My WISP, Black Mesa Wireless, came up against this problem last year when we asked ARIN for another block of IPv4 addresses and were told we were out [&#8230;]]]></description>
										<content:encoded><![CDATA[<h2>Motivation</h2>
<p>The world is out of IPv4 addresses. While some can be bought and traded, ARIN is no longer issuing new assignments to organizations in the USA. My WISP, <a href="https://bmwl.co">Black Mesa Wireless</a>, came up against this problem last year when we asked ARIN for another block of IPv4 addresses and were told we were out of luck. While some ISPs NAT many customers through a few public IP addresses, there are many reasons not to do that and I refuse to. We assign each customer a public IP address. Now we will have to assign most of them IPv6 addresses only, and not IPv4.</p>
<p>It&#8217;s easy to get an allocation of IPv6 addresses, and there are so many that we should not run out for many times my lifetime, if ever. ARIN allocated us a /36 with very little difficulty or fanfare. The first thing we had to do was figure out how to split this up. After doing a bunch of reading about best practices, we came up with a sparse allocation scheme that should be OK should we grow to many times our current size. I will leave that for the reader to research, or maybe one day write a separate article.</p>
<p>All of that settled, we had to figure out how to provide good service to our customers even if they were running with only an IPv6 public address (or rather, subnet) on their WAN. T-Mobile has led the way on this, deploying <a href="https://tools.ietf.org/html/rfc6877">464XLAT</a> on their network over the past few years. I have made use of this as a T-Mobile and then Project Fi customer, and it works just fine. While NAT64 is an option, it still breaks some applications and fails if IP literals (i.e. ip addresses written out rather than host names) are used in web sites or services. 464XLAT uses a scheme to NAT IPv6<br />
traffic out IPv4 addresses and retains those mappings in a stateful way for the duration of a connection. This transparently works for pretty much everything.</p>
<h2>Implementation</h2>
<p>Deploying 464XLAT requires two special functions&#8211; client-side translation (CLAT) to translate client-side IPv4 traffic to encapsulated IPv6, and provider-side translation (PLAT), to translate from encapsulated IPv6 back to IPv4. At this time (December 2017) I am still not aware of any consumer routers that support CLAT out of the box. We would love it if our wireless CPE manufacturers (Ubiquiti and Mimosa) would support CLAT on their devices, or our preferred router manufacturer (Mikrotik) would support it on their devices, but none of them do yet. However, the OpenWRT and LEDE projects (which forked a while ago but are now merging back together) <b>do</b> support CLAT. Therefore, after some research, we found a few models of consumer routers that we could flash with LEDE, and deploy to customers. I will cover this in more detail shortly.</p>
<p>On the provider side, some routers such as Juniper routers do support PLAT, but we are already invested in Mikrotik, and they still do not. However, using the <a href="https://jool.mx">Jool</a> project along with BIND9, it is possible to run PLAT on a Linux server with very minimal setup. We have a Proxmox VE HA cluster on which we run two PLAT nodes, which are set up to fail over using different OSPF costs, and additionally they will fail over to other machines in the cluster if one goes down. As these nodes are <b>required</b> for IPv6 customers to access the IPv4 internet, it is <i>very important</i> that they stay up. In the future we may consider moving to Juniper routers if Mikrotik doesn&#8217;t eventually address this need.</p>
<h3>PLAT Implementation</h3>
<p>Installing and configuring Jool and BIND9 is pretty easy. We are standardized on Ubuntu 16.04 LTS at the moment, so I will use that in my examples. Note that if you are doing this in a virtual machine (as we do), it needs to have full hardware virtualization, and not run in a container, as Jool is a kernel module.</p>
<h4>Jool</h4>
<p>Here are the <a href="http://jool.mx/en/install-mod.html">instructions for installing the Jool kernel module</a>. In this example we will use DKMS.</p>
<p>First, install dependencies:</p>
<pre>root@plat-demo:~# apt -y install build-essential linux-headers-$(uname -r) dkms
... (output) ...
root@plat-demo:~# git clone https://github.com/NICMx/Jool.git
... (output) ...
root@plat-demo:~# dkms install Jool
... (output) ...
DKMS: install completed.
</pre>
<p>Now we must tell the machine to insert the jool module at boot with the correct settings. We are using the well-known prefix of</p>
<pre>64:ff9b::/96</pre>
<p>which is the default used by many CLAT devices on the IPv6 side. You will need to supply your own IPv4 subnet for translation. Here we use a documentation-reserved prefix. Open</p>
<pre>/etc/rc.local</pre>
<p>in your favorite editor and add the line:</p>
<pre>/sbin/modprobe jool pool6=64:ff9b::/96 pool4=192.0.2.0/28
</pre>
<p>You will need to assign the pool4 addresses on the appropriate interface. We are doing this via OSPF so I will omit it for now. You could script it or add all the addresses on alias intefaces, we have it in our QUAGGA configuration. You will also need to make sure you are routing properly to the IPv6 prefix, which is beyond the scope of this writeup. Once all that is done, manually run the command you added to</p>
<pre>/etc/rc.local</pre>
<p>You should then be able to ping an IPv4 address through the PLAT device by pinging, for example,</p>
<pre>64:ff9b::8.8.8.8</pre>
<p>.</p>
<h4>BIND9</h4>
<p>This is even easier than Jool.</p>
<pre>root@plat-demo:~# apt -y install bind9
</pre>
<p>Once that is done, use your favorite editor to open</p>
<pre>/etc/bind/named.conf.options</pre>
<p>and make sure it looks like this:</p>
<pre>acl my_net {
        // Use your public prefixes here, these are documentation prefixes.
        2001:DB8::/32
        198.51.100.0/24;
        203.0.113.0/24;
        // You may want to include any RFC1918 subnets you use on your network
        10.0.0.0/8;
        192.168.0.0/16;
};

options {
        directory "/var/cache/bind";

        dnssec-validation auto;

        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };

        # This is the key. Note that you can write multiple of these if you need
        # more IPv6 prefixes.
        # "64:ff9b::/96" has to be the same as Jool's `pool6`.

        // use the well-known prefix
        dns64 64:ff9b::/96 {
                # Options per prefix (if you need them) here.
                # More info here: https://kb.isc.org/article/AA-01031
        };
        recursion yes;

        allow-recursion { my_net; };
};
</pre>
<p>Save it and restart with:</p>
<pre>systemctl restart bind9
</pre>
<p>Assuming you have proper firewall and routing settings in place, you should now be able to get NAT64 by doing dns lookups to this server. For example, Slashdot still doesn&#8217;t have IPv6 deployed (shame on them). However, BIND9 will synthesize an IPv6 address for you:</p>
<pre>root@plat-demo:~# dig AAAA @(dns-server-ip) slashdot.org

; &lt;&lt;&gt;&gt; DiG 9.10.3-P4-Ubuntu &lt;&lt;&gt;&gt; AAAA @(dns-server-ip) slashdot.org
; (1 server found)
;; global options: +cmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 49918
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;slashdot.org.                  IN      AAAA

;; ANSWER SECTION:
slashdot.org.           292     IN      AAAA    64:ff9b::d822:b52d

;; AUTHORITY SECTION:
slashdot.org.           25241   IN      NS      ns2.dnsmadeeasy.com.
slashdot.org.           25241   IN      NS      ns1.dnsmadeeasy.com.
slashdot.org.           25241   IN      NS      ns3.dnsmadeeasy.com.
slashdot.org.           25241   IN      NS      ns4.dnsmadeeasy.com.

;; Query time: 33 msec
;; SERVER: #53()
;; WHEN: Sat Dec 23 09:52:52 MST 2017
;; MSG SIZE  rcvd: 156
</pre>
<p>As you can see, it has appended the well-known prefix. Now, we can ping this address from a host on the network with a route to the PLAT machine:</p>
<pre>[brock@demo-client]-(~)-&gt; ping6 64:ff9b::d822:b52d
PING 64:ff9b::d822:b52d(64:ff9b::d822:b52d) 56 data bytes
64 bytes from 64:ff9b::d822:b52d: icmp_seq=1 ttl=235 time=73.1 ms
64 bytes from 64:ff9b::d822:b52d: icmp_seq=2 ttl=235 time=72.9 ms
64 bytes from 64:ff9b::d822:b52d: icmp_seq=3 ttl=235 time=73.5 ms
64 bytes from 64:ff9b::d822:b52d: icmp_seq=4 ttl=235 time=73.4 ms

--- 64:ff9b::d822:b52d ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 72.912/73.277/73.587/0.421 ms
</pre>
<p>That completes PLAT setup!</p>
<h3>CLAT Implementation</h3>
<p>This is a bit more tricky&#8211; we have to provide customers with a router that will do CLAT, so that their internal IPv4 devices will send out traffic via IPv6. OpenWRT/LEDE firmware will do this, but you have to find one of the many devices that will support these firmwares, make a firmware image, and then deploy it.</p>
<p>We are using some older linksys routers that are quite adequate for the plans most of our customers use, the EA3500, primarily. We use the LEDE image builder to make a custom image that has what we need in it. You can download that here:</p>
<p><a href="https://downloads.lede-project.org/releases/17.01.4/targets/kirkwood/generic/lede-imagebuilder-17.01.4-kirkwood.Linux-x86_64.tar.xz">LEDE Imagebuilder for Kirkwood</a>.</p>
<p>Note that on this hardware you currently need to install the openwrt factory image first, then the LEDE sysupgrade image.</p>
<p>You can download that here:</p>
<p><a href="https://downloads.openwrt.org/snapshots/trunk/kirkwood/generic/openwrt-kirkwood-linksys-audi-squashfs-factory.bin">OpenWRT Factory Image</a></p>
<p>So, flash the router from factory with the OpenWRT image. Then, on Linux extract the imagebuilder and change into that directory. Run the following command to build with 464xlat:</p>
<pre>umask 022
make image PROFILE=linksys-audi PACKAGES="464xlat luci-ssl"
</pre>
<p>When it finishes you should have a file:</p>
<pre>bin/targets/kirkwood/generic/lede-17.01.4-kirkwood-linksys-audi-squashfs-sysupgrade.tar
</pre>
<p>You need to upgrade the router with that:</p>
<pre>scp bin/targets/kirkwood/generic/lede-17.01.4-kirkwood-linksys-audi-squashfs-sysupgrade.tar root@192.168.1.1:/tmp/sysupgrade.tar
ssh root@192.168.1.1 sysupgrade -n /tmp/sysupgrade.tar
</pre>
<p>When that completes, you should be able to access the router running LEDE at https://192.168.1.1.</p>
<p>You need to log in (default is root, no password), go to network settings, and change the protocol for the IPv4 WAN to 464XLAT. In the IPv6 wan settings, change your DNS server to point to the IPv6 address of your PLAT device.</p>
<p><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-1918" src="https://blog.brocktice.com/wp-content/uploads/2017/12/464xlat_protocol_settings.png" alt="" width="971" height="514" /></p>
<p><img decoding="async" class="aligncenter size-full wp-image-1919" src="https://blog.brocktice.com/wp-content/uploads/2017/12/464xlat_dns_settings.png" alt="" width="986" height="726" /></p>
<p><img decoding="async" class="aligncenter size-full wp-image-1920" src="https://blog.brocktice.com/wp-content/uploads/2017/12/464xlat_v6_wan_settings.png" alt="" width="982" height="604" /></p>
<p>You should then be able to reboot the router, and 464XLAT should be working. Once you have a template router config just how you want it, you can extract the config files and give them as input to the image builder. This will give you a ready-to-go router firmware. We have done this plus additional scripting to set a wifi SSID and password, and print labels automatically.</p>
<h2>Conclusion</h2>
<p>I have seen very good throughput on this setup, basically limited by the client (CLAT) router&#8217;s wireless connection or CPU, the PLAT is pretty performant on VMs on some old Xeon servers. However, you need to make sure that the servers have ethernet offloading disabled as <a href="https://www.jool.mx/en/offloads.html">per this documentation</a>. For me it made the difference between 0.5Mbps and 150Mbps throughput.</p>
<p>I highly recommend you test your setup with this <a href="http://test-ipv6.com">IPv6 tester</a> site.</p>
<p>I am happy to answer questions about this and also to take suggestions. Happy routing!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.brocktice.com/2017/12/27/deploying-464xlat-for-ipv6-only-clients-on-a-small-wisp-network-with-mikrotik-routers/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Booting from a Samba share in old Supermicro IPMI</title>
		<link>https://blog.brocktice.com/2017/11/09/booting-from-a-samba-share-in-old-supermicro-ipmi/</link>
		
		<dc:creator><![CDATA[Brock Tice]]></dc:creator>
		<pubDate>Fri, 10 Nov 2017 02:46:02 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Tools of the Trade]]></category>
		<guid isPermaLink="false">https://blog.brocktice.com/?p=1904</guid>

					<description><![CDATA[I picked up some older Supermicro machines from eBay (GREAT way to get some real server hardware, btw), but they have aÂ VERY old IPMI firmware and no way to upgrade to a more modern version. They can&#8217;t do standard virtual media &#8212; you have to specify a SMB share with an ISO on it to [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I picked up some older Supermicro machines from eBay (GREAT way to get some real server hardware, btw), but they have aÂ <strong>VERY</strong> old IPMI firmware and no way to upgrade to a more modern version.</p>
<p>They can&#8217;t do standard virtual media &#8212; you have to specify a SMB share with an ISO on it to mount. Once you do that, you have to make it bootable in the BIOS and move it up the boot order.</p>
<p>I wasted about an hour trying to figure out why I couldn&#8217;t enable the device &#8220;PepperC Virtual Disc&#8221; in the boot order &#8212; the answer is, you have to use the &#8216;x&#8217; key to remove unused devices from the 8 available boot slots,Â <strong>then</strong> you can select the PepperC device and use the &#8216;x&#8217; key to enable it, and then you can move it up/down the boot order with the +/- keys.</p>
<p>Hopefully this saves someone else some grief, I was losing my mind trying to figure out the problem.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Resizing Cryptswap in Ubuntu 16.04</title>
		<link>https://blog.brocktice.com/2017/02/22/resizing-cryptswap-in-ubuntu-16-04/</link>
		
		<dc:creator><![CDATA[Brock Tice]]></dc:creator>
		<pubDate>Wed, 22 Feb 2017 16:37:04 +0000</pubDate>
				<category><![CDATA[Crypto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://blog.brocktice.com/?p=1898</guid>

					<description><![CDATA[I recently migrated my system to NVMe drives (great decision, by the way), and part of my reason for doing so was much faster swap, for some outrageously memory-hungry finite element mesh generation stuff. I also wanted to enlarge the swap. I use LVM on top of software RAID, and encrypted home directories on top [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I recently migrated my system to NVMe drives (great decision, by the way), and part of my reason for doing so was much faster swap, for some outrageously memory-hungry finite element mesh generation stuff.</p>
<p>I also wanted to enlarge the swap. I use LVM on top of software RAID, and encrypted home directories on top of that, which means the Ubuntu automatically set up encrypted swap for me. I had a non-encrypted swap volume at:</p>
<p>/dev/vg0/swap</p>
<p>I didn&#8217;t have much luck finding information about how the cryptswap is set up by the installer, which is why I&#8217;m writing this. It turns out that the crypt swap is configured in /etc/crypttab, where I have a line like this:</p>
<pre>cryptswap1 /dev/vg0/swap /dev/urandom swap,offset=1024,cipher=aes-xts-plain64</pre>
<p>What this means is that the system will create a crypt device called /dev/mapper/cryptswap1 at boot using a random seed, on top of /dev/vg0/swap. It will then run mkswap and swapon on the encrypted device.</p>
<p>This latter part is specified in /etc/fstab like:</p>
<pre>/dev/mapper/cryptswap1 none swap sw 0 0</pre>
<p>So, if your base unencrypted swap partition is an LVM logical volume, all you have to do is use lvextend to make it larger and (the easiest way) reboot. On reboot the larger device will automatically be used in its entirety.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Exim4 system-wide conditional email forwarding</title>
		<link>https://blog.brocktice.com/2016/10/10/exim4-system-wide-conditional-email-forwarding/</link>
		
		<dc:creator><![CDATA[Brock Tice]]></dc:creator>
		<pubDate>Mon, 10 Oct 2016 20:23:58 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<guid isPermaLink="false">https://blog.brocktice.com/?p=1894</guid>

					<description><![CDATA[This is a guest post written by Steve Goertz after he solved this particular issue. Use: Filtering and forwarding all emails received by exim4 Filtering by specific email components (sender information, subject, etc.) Forwarding all filtered emails to a specific email address or email addresses Assuming a working instance of exim4: Create a filter file [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>This is a guest post written by Steve Goertz after he solved this particular issue.</p>
<p><span style="font-weight: 400;">Use:</span></p>
<ul>
<li style="font-weight: 400;"><span style="font-weight: 400;">Filtering and forwarding all emails received by exim4</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">Filtering by specific email components (sender information, subject, etc.)</span></li>
<li style="font-weight: 400;"><span style="font-weight: 400;">Forwarding all filtered emails to a specific email address or email addresses</span></li>
</ul>
<p><span style="font-weight: 400;">Assuming a working instance of exim4:</span></p>
<p><span style="font-weight: 400;">Create a filter file for exim4 using the appropriate filters and syntax as found in the exim4 filter documentation here: </span><a href="http://www.exim.org/exim-html-current/doc/html/spec_html/filter_ch-exim_filter_files.html"><span style="font-weight: 400;">http://www.exim.org/exim-html-current/doc/html/spec_html/filter_ch-exim_filter_files.html</span></a></p>
<p><span style="font-weight: 400;">You may want to create a directory for exim4 filters and place the file in that directory, like:</span></p>
<pre><span style="font-weight: 400;">/etc/exim4/conf.d/filters/filter_name</span></pre>
<p><span style="font-weight: 400;">For our particular use, a conditional section and Â </span><span style="font-weight: 400;">deliver </span><span style="font-weight: 400;">command were the only necessary components.Â </span><span style="font-weight: 400;">A filter file will look something like this:</span></p>
<pre><span style="font-weight: 400;">#Exim filter &lt;&lt;== do not edit or remove this line!</span>

<span style="font-weight: 400;">##Filter description, so you remember what you were trying to do.</span>
<span style="font-weight: 400;">
if</span>
<span style="font-weight: 400;"> Â $sender_address is â€œsender@address.exampleâ€ and </span>
<span style="font-weight: 400;"> Â $header_subject does not contain â€œfooâ€ and </span>
<span style="font-weight: 400;"> Â $message_body contains â€œbarâ€</span>
<span style="font-weight: 400;">then</span>
<span style="font-weight: 400;"> Â deliver â€œrecipient@other.exampleâ€</span>
<span style="font-weight: 400;">endif</span></pre>
<p><span style="font-weight: 400;">Filters will then be placed as the first router in the exim4 router config ( found at </span><strong>/etc/exim4/conf.d/router/router_name</strong><span style="font-weight: 400;"> ). Depending on your configuration the router name may vary, or you may need to add one. The filter should be formatted as follows:</span></p>
<pre><span style="font-weight: 400;">filter_name:</span>
<span style="font-weight: 400;"> Â driver = redirect</span>
<span style="font-weight: 400;"> Â allow_filter</span>
<span style="font-weight: 400;"> Â file = /path/to/filter (in this case /etc/exim4/conf.d/filters/filter_name)</span>
<span style="font-weight: 400;"> Â user = exim4_user</span></pre>
<p><span style="font-weight: 400;">It is essential that the Â </span><span style="font-weight: 400;">user </span><span style="font-weight: 400;">variable match the user that owns exim4. Â If not, the filter will not function and email traffic will not pass through the first filter to the remaining filters and all regular email processing will stop. You can probably figure this out by checking the init script for exim4 or using the command: </span></p>
<pre><span style="font-weight: 400;">ps aux | grep exim4 </span></pre>
<p><span style="font-weight: 400;">to see whom exim4 is running as.</span></p>
<p><span style="font-weight: 400;">After the filter file has been generated and correctly referenced in the router config, rebuild the exim4 config using: </span></p>
<pre><span style="font-weight: 400;">sudo update-exim4.conf.template -r</span><span style="font-weight: 400;">
</span></pre>
<p><span style="font-weight: 400;">And restart the service</span></p>
<pre><span style="font-weight: 400;">sudo service exim4 restart</span></pre>
<p><span style="font-weight: 400;">Test the email server to ensure that it is working as intended.</span></p>
<p><span style="font-weight: 400;">This configuration will prevent emails from arriving at their intended destination, which was our need. Also, if the incoming email does not meet all of the requirements above, it will pass through to the next router in the router configuration file.</span></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Dealing With Dogs While Cycling</title>
		<link>https://blog.brocktice.com/2016/09/12/dealing-with-dogs-while-cycling/</link>
		
		<dc:creator><![CDATA[Brock Tice]]></dc:creator>
		<pubDate>Tue, 13 Sep 2016 01:51:32 +0000</pubDate>
				<category><![CDATA[Other]]></category>
		<guid isPermaLink="false">https://blog.brocktice.com/?p=1890</guid>

					<description><![CDATA[I&#8217;ve been cycling a lot this season, but off-leash dogs are the rule here rather than the exception. They like to chase me on the bike, and even the ones that don&#8217;t seem likely to directly harm me are liable to cause an accident. To combat this, I use pepper spray. To keep the pepper [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve been cycling a lot this season, but off-leash dogs are the rule here rather than the exception. They like to chase me on the bike, and even the ones that don&#8217;t seem likely to directly harm me are liable to cause an accident.</p>
<p>To combat this, I use pepper spray. To keep the pepper spray handy, I use&nbsp;<a href="Pepper Spray Bike Mount (for stem) - Fits Many Sprays - Fox Labs, Sabre, Freeze +P, Wildfire, Police Magnum - Mount Only https://www.amazon.com/dp/B00LBAJGL2/ref=cm_sw_r_cp_apa_FY11xb5VPFSY5">this simple device</a>&nbsp;I found on&nbsp;Amazon.com. I was skeptical when I first saw it that it would be stable enough, but actually it has worked quite well. I use Fox OC spray with it, and it has never failed to stop an aggressive dog.</p>
<p>The spray is a bit pricey, but if you ride the same route or routes regularly the dogs eventually start to learn and you don&#8217;t need it that much.</p>
<p>I have a dog and I don&#8217;t like pepper spraying dogs, but irresponsible owners have created dangerous conditions for me and other cyclists and pedestrians, so it has come to this.</p>
<p>Ride safely.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Explanation of Question G8B07 on the US Ham Radio General License Exam</title>
		<link>https://blog.brocktice.com/2015/04/12/explanation-of-question-g8b07-on-the-us-ham-radio-general-license-exam/</link>
		
		<dc:creator><![CDATA[Brock Tice]]></dc:creator>
		<pubDate>Sun, 12 Apr 2015 23:22:21 +0000</pubDate>
				<category><![CDATA[Ham Radio]]></category>
		<guid isPermaLink="false">https://blog.brocktice.com/?p=1883</guid>

					<description><![CDATA[I am studying for the General license exam and came across question G8B07 (as of April 2015, it will change at some point), asking the following: What is the frequency deviation for a 12.21-MHz reactance-modulated oscillator in a 5-kHz deviation, 146.52-MHz FM-phone transmitter? The answer is given as 416.7 Hz, but I looked and couldn&#8217;t [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I am studying for the General license exam and came across question G8B07 (as of April 2015, it will change at some point), asking the following:</p>
<blockquote><p>
What is the frequency deviation for a 12.21-MHz reactance-modulated oscillator in a 5-kHz deviation, 146.52-MHz FM-phone transmitter?
</p></blockquote>
<p>The answer is given as 416.7 Hz, but I looked and couldn&#8217;t find an explanation. Finally I found one <a href="http://educypedia.karadimov.info/library/reading34.pdf">here</a>, sort of. After reading about how the FM phone modulation is done and puzzling a bit at the numbers it became clear.</p>
<p>To understand the question, you must understand that the reactance-modulated oscillator produces a carrier frequency of 12.21 MHz (as specified). With no input, this is multiplied by some circuits aptly called multipliers that result in the output frequency, given here as 146.52 MHz. Simply dividing 146.52/12.21 shows you that a multiplier of 12x is in effect in this question.</p>
<p>Now, what the question is asking (and this took me a while to figure out) is what change in modulation of the reactance-modulated oscillator will result in a 5 kHz deviation of the <b>output</b>? Since we know that whatever change happens in the oscillator is going to be multiplied 12x, we can divide the output deviation (5 kHz) by the multiplier (12) to get 416.7 Hz. In other words, a 416.7 Hz deviation in the reactance-modulated oscillator will be multiplied 12x to 5 kHz by the multipliers before being output.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Disabling Mikrotik Hotspot DNS Proxying for Authenticated Users</title>
		<link>https://blog.brocktice.com/2015/01/09/disabling-mikrotik-hotspot-dns-proxying-for-authenticated-users/</link>
		
		<dc:creator><![CDATA[Brock Tice]]></dc:creator>
		<pubDate>Fri, 09 Jan 2015 17:48:27 +0000</pubDate>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[RouterOS]]></category>
		<category><![CDATA[Tech]]></category>
		<guid isPermaLink="false">https://blog.brocktice.com/?p=1880</guid>

					<description><![CDATA[My wireless ISP (WISP) uses the Mikrotik hotspot feature with RADIUS on the back end to authenticate our users. This implements a captive portal that redirects all DNS requests so that the user is taken to a login page if they&#8217;re not logged in. Once they log in once, the system associates their radio with [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="http://blackmesawireless.com">My wireless ISP (WISP)</a> uses the Mikrotik hotspot feature with RADIUS on the back end to authenticate our users. This implements a captive portal that redirects all DNS requests so that the user is taken to a login page if they&#8217;re not logged in. Once they log in once, the system associates their radio with their account, and they don&#8217;t have to log in anymore under normal circumstances.</p>
<p>However, once logged in, users still have all their DNS requests proxied through the routers. A lot of users want to use their own DNS (like OpenDNS or Google Public DNS), and that&#8217;s fine with me, but a user ran the <code>namebench</code> utility and found that their DNS was being forcibly proxied.</p>
<p>It took some hunting, but I finally found <a href="http://forum.mikrotik.com/viewtopic.php?f=2&#038;t=83768">this post on the Mikrotik forums</a> which details how to get around this. Basically:</p>
<ul>
<li>The hotspot adds dynamic DNS redirect rules. If you go to <code>/ip firewall nat</code> and just <code>print</code>, these rules don&#8217;t show up. If you do <code>print dynmic</code> they do. The relevant lines are:<br />
<code><br />
2  D chain=hotspot action=redirect to-ports=64872 protocol=udp dst-port=53 log=no log-prefix=""<br />
3  D chain=hotspot action=redirect to-ports=64872 protocol=tcp dst-port=53 log=no log-prefix=""<br />
</code>
</li>
<li>We still want non-logged-in-users to have their DNS redirected, so we need to add something here that will enable authenticated hotspot users through. The magic incantation here (because it&#8217;s entries 2 and 3) is <code>set 2,3 hotspot=!auth</code>, which results in the following:<br />
<code><br />
2  D chain=hotspot action=redirect to-ports=64872 protocol=udp hotspot=!auth dst-port=53 log=no log-prefix=""<br />
3  D chain=hotspot action=redirect to-ports=64872 protocol=tcp hotspot=!auth dst-port=53 log=no log-prefix=""<br />
</code>
</ul>
<p>And now namebench works as expected.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Less than a week until Taos Ski Valley opens for the season</title>
		<link>https://blog.brocktice.com/2014/11/23/less-than-a-week-until-taos-ski-valley-opens-for-the-season/</link>
		
		<dc:creator><![CDATA[Brock Tice]]></dc:creator>
		<pubDate>Sun, 23 Nov 2014 17:58:50 +0000</pubDate>
				<category><![CDATA[New Mexico]]></category>
		<category><![CDATA[Skiing]]></category>
		<guid isPermaLink="false">https://blog.brocktice.com/?p=1877</guid>

					<description><![CDATA[And it&#8217;s looking good today. 🙂]]></description>
										<content:encoded><![CDATA[<p>And it&#8217;s looking good today. <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><a href="https://blog.brocktice.com/wp-content/uploads/2014/11/wpid-wp-1416765434029.jpeg"><img decoding="async" title="wp-1416765434029" class="alignnone size-full"  alt="image" src="https://blog.brocktice.com/wp-content/uploads/2014/11/wpid-wp-1416765434029.jpeg" /></a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Preventing BGP Advertised Route Flapping in Mikrotik RouterOS</title>
		<link>https://blog.brocktice.com/2014/11/03/preventing-bgp-advertised-route-flapping-in-mikrotik-routeros/</link>
		
		<dc:creator><![CDATA[Brock Tice]]></dc:creator>
		<pubDate>Mon, 03 Nov 2014 23:39:15 +0000</pubDate>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[RouterOS]]></category>
		<category><![CDATA[Tech]]></category>
		<guid isPermaLink="false">https://blog.brocktice.com/?p=1858</guid>

					<description><![CDATA[I am not an expert on this, I just wanted to document a problem I had and a solution I found today, in a concise way. Comments correcting me or suggesting better ways are very welcome. I have a network running OSPF internally, and advertising routes to the upstream ISP over BGP at two separate [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I am not an expert on this, I just wanted to document a problem I had and a solution I found today, in a concise way. Comments correcting me or suggesting better ways are very welcome.</p>
<p>I have a network running OSPF internally, and advertising routes to the upstream ISP over BGP at two separate edge routers (multi-homed, single ISP). We discovered last night that internally bringing down any of the subnets we advertise results in the dropping of those routes from the tables of the edge routers (as expected). This drops the advertisements. What we did NOT expect was that flap damping from upstream of us then null-routes that subnet for up to a few hours.</p>
<p>So, how do we retain our adaptive internal routing (OSPF) while avoiding route flap? I was a bit stumped about this, but I found a more complex article that <a href="http://robert.penz.name/779/howto-setup-a-redundant-and-secure-bgp-full-table-internet-connection-with-mikrotik-routers/">describes a multi-homed BGP setup</a>. A key part of that setup was a little trick to avoid this problem. Nameley, set up a static, black hole route for the subnet on the edge router, with maximum distance. This way, even if the OSPF route disappears, the router still &#8220;knows&#8221; a route to the subnet and won&#8217;t drop the advertisement.</p>
<p>For example, if you want to advertise the subnet 1.1.1.0/24, you should add a static route like</p>
<p><code><br />
/ip route add dst-address=1.1.1.0/24 type=blackhole distance=254 comment="prevent flapping of the route over BGP"<br />
</code></p>
<p>I&#8217;ve tested it and it seems to work as expected. The route is not active as long as the OSPF route is in the routing table. If it disappears, the black hole route becomes active.</p>
<p>Comments? Suggestions?</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Armed Citizens, Revolution, and Costs</title>
		<link>https://blog.brocktice.com/2014/10/21/armed-citizens-revolution-and-costs/</link>
					<comments>https://blog.brocktice.com/2014/10/21/armed-citizens-revolution-and-costs/#comments</comments>
		
		<dc:creator><![CDATA[Brock Tice]]></dc:creator>
		<pubDate>Tue, 21 Oct 2014 16:10:14 +0000</pubDate>
				<category><![CDATA[Other]]></category>
		<guid isPermaLink="false">https://blog.brocktice.com/?p=1859</guid>

					<description><![CDATA[I have been trying, without success, to come up with a cogent explanation of my thoughts on firearms ownership by citizens, government tyranny, those that call for violent revolution, and the costs of police and military intervention. This post is my first attempt to lay out those thoughts in an integrated way. It was prompted [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I have been trying, without success, to come up with a cogent explanation of my thoughts on firearms ownership by citizens, government tyranny, those that call for violent revolution, and the costs of police and military intervention. This post is my first attempt to lay out those thoughts in an integrated way. It was prompted by this tweet, though I had been thinking about it before.</p>
<blockquote class="twitter-tweet" lang="en">
<p>Worth linking again. Too late to overthrow the American gov&#39;t with guns. Be a grown-up and get politically active. <a href="http://t.co/ROwk8yQrvy">http://t.co/ROwk8yQrvy</a></p>
<p>&mdash; Les Orchard (@lmorchard) <a href="https://twitter.com/lmorchard/status/522957862793134080">October 17, 2014</a></p></blockquote>
<p><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script></p>
<p>The founders of the US thought it was so important to protect the right to keep and bear arms that they listed it in the bill of rights right after freedom of speech (which I agree is more important). It&#8217;s common to hear arguments that &#8220;only a well-regulated militia&#8221; &#8212; sometimes interpreted to be the military &#8212; is supposed to bear arms, but a review of the prior drafts of the amendment and other statements by those that drafted it makes it clear they meant the whole of the citizenry were the militia, and the constitution was never meant to be interpreted to bar law-abiding citizens the right to keep and bear arms. Recent decisions by the Supreme Court have supported this interpretation. For example, here is an early version proposed by Samuel Adams:</p>
<blockquote><p>
And that the said Constitution be never construed to authorize Congress to infringe the just liberty of the press, or the rights of conscience; or to prevent the people of the United States, who are peaceable citizens, from keeping their own arms. (<a href="http://en.wikipedia.org/wiki/Second_Amendment_to_the_United_States_Constitution">citation</a>)
</p></blockquote>
<p>Furthermore, it was thought by them that an unarmed citizenry was a citizenry destined to be ruled by tyranny. Wikipedia does a pretty good job of covering his <a href="http://en.wikipedia.org/wiki/Second_Amendment_to_the_United_States_Constitution">here</a>, but here are some choice quotes:</p>
<blockquote><p>
As civil rulers, not having their duty to the people duly before them, may attempt to tyrannize, and as the military forces which must be occasionally raised to defend our country, might pervert their power to the injury of their fellow citizens, the people are confirmed by the next article in their right to keep and bear their private arms. &#8212; Tench Coxe, 1792 (ibid.)
</p></blockquote>
<blockquote><p>
This may be considered as the true palladium of liberty&#8230;. The right of self defence is the ï¬rst law of nature: in most governments it has been the study of rulers to conï¬ne this right within the narrowest limits possible. Wherever standing armies are kept up, and the right of the people to keep and bear arms is, under any colour or pretext whatsoever, prohibited, liberty, if not already annihilated, is on the brink of destruction. In England, the people have been disarmed, generally, under the specious pretext of preserving the game : a never failing lure to bring over the landed aristocracy to support any measure, under that mask, though calculated for very different purposes.  &#8212; St. George Tucker (ibid.)
</p></blockquote>
<blockquote><p>
Abolitionist Lysander Spooner, commenting on bills of rights, stated that the object of all bills of rights is to assert the rights of individuals against the government and that the Second Amendment right to keep and bear arms was in support of the right to resist government oppression, as the only security against the tyranny of government lies in forcible resistance to injustice, for injustice will certainly be executed, unless forcibly resisted. (ibid.)
</p></blockquote>
<blockquote><p>
The tree of liberty must be refreshed from time to time with the blood of patriots and tyrants. &#8212; Thomas Jefferson (<a href="http://www.monticello.org/site/jefferson/tree-liberty-quotation">citation</a>)
</p></blockquote>
<p>People, even those generally sympathetic to Second Amendment rights, rightly point out that the government, with bombers, nuclear weapons, the NSA, and a large standing military could easily put down an insurrection. (<a href="http://solutions-institute.org/blog/is-it-time-for-a-violent-revolution/">Is it time for a violent revolution?</a>). That article does a pretty good job of being realistic in evaluating the pros and cons of such a revolution. I am going to make clear that I think it&#8217;s definitely a <b>Bad Idea</b>. That doesn&#8217;t mean an armed citizenry is worthless. A very interesting and recent example is the <a href="https://en.wikipedia.org/wiki/Bundy_standoff">Bundy Standoff</a> and its contrast with the <a href="http://en.wikipedia.org/wiki/2014_Ferguson_unrest">Ferguson unrest</a>. Before I get going let me state that I think Bundy (aside from being a racist and generally a moron) was/is in the wrong. I in no way support his claims.</p>
<p>What I find fascinating is that Bundy and his well-armed supporters were able to <i>raise the cost of the government&#8217;s intervention</i> enough to get them to back down. The government can be viewed as a massive, powerful monolith, that doesn&#8217;t need the approval of the people to do what it wants, but that&#8217;s a mistaken view. The federal government is made of real people with consciences and scruples. Furthermore, if it loses enough public support, and support from a significant portion of the military, it may even leave itself vulnerable to being overthrown. Therefore it&#8217;s in the interests of the government and its members not to do things that will widely be perceived as pernicious and overreaching. I think the BLM and Las Vegas PD decided that shooting Bundy and his supporters over some cattle grazing on public lands would have been widely condemned. Without that resistance, I&#8217;m fairly certain the BLM would have had their way (which, to be clear, I think was right). I didn&#8217;t realize until today that the LVPD actually took steps to tone down their response to Bundy in order to avoid provoking them.</p>
<blockquote><p>
Metro officers deal with large crowds all the time, but nothing like this. The crowd included former military men and ex-cops, people with various motives, their fingers poised just above the triggers of powerful weapons. With so much firepower in so many hands, a small incident could have set off a bloodbath and left nearly two dozen officers dead.</p>
<p>Assist. Sheriff Joe Lombardo:&#8221;We were outgunned, outmanned and there would not have been a good result from it.&#8221;<br />
I-Team reporter George Knapp: &#8220;A lot of scenarios could have played out that would have left a lot of dead officers.&#8221;<br />
Assist. Sheriff Joe Lombardo: &#8220;If you just have a backfire, somebody pops a firecracker, then it&#8217;s over. We&#8217;re done. We are going to lose that battle that day.&#8221;</p>
<p>Metro pointedly did not allow officers to put on helmets or protective gear for fear it might be seen as a provocation. At the urging of Cliven Bundy, the crowd moved toward the BLM compound. Rhetoric grew more heated, and guns were pointed at officers.<br />
<a href="http://www.8newsnow.com/story/25395552/i-team-police-faced-possible-bloodbath-at-bundy-protest">citation</a>
</p></blockquote>
<p>What you see there is that the Bundy protesters made the cost of a powerful, armed showing by the police higher than the police were willing to bear. Contrast that with the events during the protests in Ferguson, MO after the police shooting of Michael Brown.</p>
<p><a href="https://www.flickr.com/photos/jbouie/14907066986/in/set-72157646091879339"><img loading="lazy" decoding="async" src="https://blog.brocktice.com/wp-content/uploads/2014/10/Sharpshooter_facing_camera.jpg" alt="Sharpshooter_facing_camera" width="2880" height="1908" class="aligncenter size-full wp-image-1862" /></a> <small><b>Sharpshooter aims at unarmed protesters</b> CC BY 2.0 &#8211; Jamelle Bouie &#8211; https://www.flickr.com/photos/jbouie/14907066986/in/set-72157646091879339</small></p>
<p><a href="http://en.wikipedia.org/wiki/2014_Ferguson_unrest#mediaviewer/File:Ferguson_Day_6,_Picture_53.png"><img loading="lazy" decoding="async" src="https://blog.brocktice.com/wp-content/uploads/2014/10/Ferguson_Day_6_Picture_53.png" alt="Ferguson_Day_6,_Picture_53" width="1000" height="664" class="aligncenter size-full wp-image-1864" /></a><small>Contingent of police in riot gear with military-type armored vehicles &#8211; By Loavesofbread &#8211; <a href="http://creativecommons.org/licenses/by-sa/4.0">CC-BY-SA 4.0</a></small></p>
<p>The Ferguson PD had no such qualms about making a show of force, and it almost certainly agitated the protesters, but for a variety of reasons, most of them were not visibly armed. There&#8217;s a whole separate line of reasoning here that the protesters in Ferguson were black, and the folks at the Bundy incident were white, and that&#8217;s why the police didn&#8217;t crack down on them the same way. I buy that that had some influence, but I don&#8217;t think it nearly covers the issue. The quote from LVPD above should make that clear.</p>
<p>What this comes down to, for me, is that even though private ownership of firearms (especially &#8220;military-type&#8221; firearms that &#8220;nobody needs&#8221; &#8212; which were used by Bundy&#8217;s supporters) may not be sufficient for an <i>ex-nihilo</i> overthrow of the government, that private ownership is nonetheless essential to raising the cost of abuse of power by the government.</p>
<p><b>But in other civilized countries&#8230;</b></p>
<p>There&#8217;s another common rebuttal that other countries don&#8217;t have the degree of allowed firearm ownership that the USA has, and yet they are able to resolve their problems democratically. All I can say to this is that there are very few democracies that have been around very long on a historical time scale, and we will have to wait and see. Certainly in places like England, which have slowly had their firearms rights (once considered inviolable natural rights) taken away, people have lost much of not only the ability but the right to self-defense. (See <a href="http://www.amazon.com/Guns-Violence-The-English-Experience/dp/0674016084/ref=sr_1_1?ie=UTF8&#038;qid=1413906947&#038;sr=8-1&#038;keywords=guns+and+violence+the+english+experience">Guns and Violence: The English Experience</a> for a fascinating history.) That&#8217;s something I&#8217;d like to see the USA avoid.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.brocktice.com/2014/10/21/armed-citizens-revolution-and-costs/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>