{"id":2785,"date":"2022-07-08T16:28:46","date_gmt":"2022-07-08T08:28:46","guid":{"rendered":"https:\/\/blog.warbel.net\/?p=2785"},"modified":"2023-12-21T12:39:19","modified_gmt":"2023-12-21T04:39:19","slug":"configuring-ubiquiti-powerbeam-with-custom-tls-certificates","status":"publish","type":"post","link":"https:\/\/blog.warbel.net\/index.php\/2022\/07\/08\/configuring-ubiquiti-powerbeam-with-custom-tls-certificates\/","title":{"rendered":"Configuring Ubiquiti Powerbeam with custom TLS Certificates"},"content":{"rendered":"<h1>Background<\/h1>\n<p>I recently re-connected the <a href=\"https:\/\/www.wafreenet.org\/\">WA Freenet<\/a> (<a href=\"https:\/\/discord.gg\/6BqMmEfJVx\">discord here<\/a>), an open WiFi wide-area-network that spans the Perth metropolitan area. Perth has an ideal geography for a WiFi network as it is extraordinarily flat, with an escarpment running along the eastern spine with excellent line-of-site to the suburbs.<\/p>\n<p>I had joined the WAFN many years ago and it is thanks to the other operators on the network that, at the time, I was able to learn how to configure IPv4 subnets, firewalls, and BGP routing, skills that have served me well in my professional career.<\/p>\n<p>Moving forward to the present day, I was pleasantly surprised to find that I was able to connect to an existing AP with links to the backbone of the network from my address. So I purchased two new radios &#8211; a Powerbeam AC 500 for my link in Ardross, and a Powerbeam 5AC Gen2 for my roof at home. Without much hassle, and with the support of the WAFN community, I was able to reconfigure my Ubiquiti Edgerouter with BGP, advertise my routes and accept those advertised to me.<\/p>\n<h1>Problem:<\/h1>\n<p>I personally hate seeing the &#8216;this website is insure&#8217; messages that appear when a site uses self signed certificates. At home, I secure all my internal websites, devices and appliances with my internal CA certificates. So I wanted to do the same for the new radios. However, I was unable to find a website that outlined the entire process end-to-end, so thought I should write one myself.<\/p>\n<h1>Process:<\/h1>\n<p>Firstly, download the custom-script firmware for your device and install it. From the table below, it is easy to deduce the URL to download the appropriate firmware from UBNT.<\/p>\n<table class=\"wikitable\" style=\"height: 229px;\" width=\"731\">\n<caption>Firmware Table Examples<\/caption>\n<tbody>\n<tr>\n<th>Version<\/th>\n<th style=\"text-align: center;\">Model<\/th>\n<th style=\"text-align: center;\">URL of Hardware<\/th>\n<th style=\"text-align: center;\">Non-CS<\/th>\n<th style=\"text-align: center;\">CS<\/th>\n<\/tr>\n<tr>\n<td>8.7.11<\/td>\n<td>Powerbeam 5AC 500<\/td>\n<td style=\"text-align: center;\"><a href=\"https:\/\/store.ui.com\/collections\/operator-airmax-devices\/products\/powerbeam-5ac-500mm-us\">UBNT Website<\/a><\/td>\n<td><a class=\"external free\" href=\"https:\/\/dl.ui.com\/firmwares\/XC-fw\/v8.7.11\/XC.v8.7.11.46972.220614.0419.bin\" rel=\"nofollow\">https:\/\/dl.ui.com\/firmwares\/XC-fw\/v8.7.11\/XC.v8.7.11.46972.220614.0419.bin<\/a><\/td>\n<td><a class=\"external free\" href=\"https:\/\/dl.ui.com\/firmwares\/XC-fw\/v8.7.11\/XC.v8.7.11-cs.46972.220614.0419.bin\" rel=\"nofollow\">https:\/\/dl.ui.com\/firmwares\/XC-fw\/v8.7.11\/XC.v8.7.11-cs.46972.220614.0419.bin<\/a><\/td>\n<\/tr>\n<tr>\n<td>8.7.11<\/td>\n<td>Powerbeam 5AC Gen 2<\/td>\n<td><a href=\"https:\/\/store.ui.com\/collections\/operator-airmax-devices\/products\/powerbeam-5ac-gen2\">UBNT Website<\/a><\/td>\n<td><a class=\"external free\" href=\"https:\/\/dl.ui.com\/firmwares\/XC-fw\/v8.7.11\/WA.v8.7.11.46972.220614.0420.bin\" rel=\"nofollow\">https:\/\/dl.ui.com\/firmwares\/XC-fw\/v8.7.11\/WA.v8.7.11.46972.220614.0420.bin<\/a><\/td>\n<td><a class=\"external free\" href=\"https:\/\/dl.ui.com\/firmwares\/XC-fw\/v8.7.11\/WA.v8.7.11-cs.46972.220614.0420.bin\" rel=\"nofollow\">https:\/\/dl.ui.com\/firmwares\/XC-fw\/v8.7.11\/WA.v8.7.11-cs.46972.220614.0420.bin<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Don&#8217;t forget also, that you will need to setup DNS to point to your device with its internal hostname.&nbsp;<\/p>\n<p>The custom script (CS) firmware version is important because it is necessary to run a script on the device at boot time.<\/p>\n<p>Then, generate your TLS certificates. How you do that is not covered here. I personally use <a href=\"https:\/\/github.com\/OpenVPN\/easy-rsa\">easyrsa<\/a> to manage my internal certificates. I also deploy my root CA certificate to all my devices via AD group policy on Windows, or via Ansible for my linux hosts.<\/p>\n<p>You should have a certificate that looks something like the below, called server3.crt<\/p>\n<pre>-----BEGIN CERTIFICATE-----\r\n\r\nMIIG1TCCB....\r\n\r\n-----END CERTIFICATE-----\r\n\r\n-----BEGIN RSA PRIVATE KEY-----\r\n\r\nTlI0kiQCiPGN...\r\n\r\n-----END RSA PRIVATE KEY-----<\/pre>\n<p>Then upload the certificate to your device:<\/p>\n<pre>scp server3.crt ubnt@&lt;device&gt;:\/etc\/persistent\/https\/server3.pem<\/pre>\n<p>Log into the powerbeam via SSH: Create rc file in &#8216;\/etc\/persistent\/rc.poststart&#8217; with following content<\/p>\n<div class=\"mw-highlight mw-highlight-lang-bash mw-content-ltr\" dir=\"ltr\">\n<pre><span class=\"ch\">#!\/usr\/bin\/sh<\/span>\r\ncp \/etc\/persistent\/https\/server3.pem \/etc\/server.pem\r\n<span class=\"nb\">kill<\/span> <span class=\"k\">$(<\/span>ps <span class=\"p\">|<\/span> grep <span class=\"o\">[<\/span>l<span class=\"o\">]<\/span>ighttpd <span class=\"p\">|<\/span> awk <span class=\"s1\">'{ print $1 }'<\/span><span class=\"k\">)<\/span>\r\n<\/pre>\n<\/div>\n<p>Then make it executable, save the configuration and reboot<\/p>\n<div class=\"mw-highlight mw-highlight-lang-bash mw-content-ltr\" dir=\"ltr\">\n<pre>chmod +x \/etc\/persistent\/rc.poststart\r\nsave\r\nreboot<\/pre>\n<\/div>\n<p>And done!&nbsp;<\/p>\n<p>References: <a href=\"https:\/\/community.ui.com\/questions\/AirOS-8-custom-SSL-certificates-Guide-Resolved\/fcf2d671-1933-4fe1-bdcb-ba33a94020e4\">https:\/\/community.ui.com\/questions\/AirOS-8-custom-SSL-certificates-Guide-Resolved\/fcf2d671-1933-4fe1-bdcb-ba33a94020e4&nbsp;<\/a><\/p>\n<h1>Images<\/h1>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2787\" src=\"https:\/\/blog.warbel.net\/wp-content\/uploads\/2022\/07\/WAFN_Profile.png\" alt=\"\" width=\"909\" height=\"356\" srcset=\"https:\/\/blog.warbel.net\/wp-content\/uploads\/2022\/07\/WAFN_Profile.png 909w, https:\/\/blog.warbel.net\/wp-content\/uploads\/2022\/07\/WAFN_Profile-300x117.png 300w, https:\/\/blog.warbel.net\/wp-content\/uploads\/2022\/07\/WAFN_Profile-768x301.png 768w, https:\/\/blog.warbel.net\/wp-content\/uploads\/2022\/07\/WAFN_Profile-500x196.png 500w\" sizes=\"auto, (max-width: 909px) 100vw, 909px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2788\" src=\"https:\/\/blog.warbel.net\/wp-content\/uploads\/2022\/07\/WAFN_MAP_Profile.png\" alt=\"\" width=\"550\" height=\"584\" srcset=\"https:\/\/blog.warbel.net\/wp-content\/uploads\/2022\/07\/WAFN_MAP_Profile.png 550w, https:\/\/blog.warbel.net\/wp-content\/uploads\/2022\/07\/WAFN_MAP_Profile-283x300.png 283w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2789\" src=\"https:\/\/blog.warbel.net\/wp-content\/uploads\/2022\/07\/Roof.png\" alt=\"\" width=\"719\" height=\"856\" srcset=\"https:\/\/blog.warbel.net\/wp-content\/uploads\/2022\/07\/Roof.png 719w, https:\/\/blog.warbel.net\/wp-content\/uploads\/2022\/07\/Roof-252x300.png 252w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Background I recently re-connected the WA Freenet (discord here), an open WiFi wide-area-network that spans the Perth metropolitan area. Perth has an ideal geography for a WiFi network as it is extraordinarily flat, with an escarpment running along the eastern &hellip; <a href=\"https:\/\/blog.warbel.net\/index.php\/2022\/07\/08\/configuring-ubiquiti-powerbeam-with-custom-tls-certificates\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[91,100,99],"tags":[],"class_list":["post-2785","post","type-post","status-publish","format-standard","hentry","category-networking","category-ubiquiti","category-wafreenet"],"_links":{"self":[{"href":"https:\/\/blog.warbel.net\/index.php\/wp-json\/wp\/v2\/posts\/2785","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.warbel.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.warbel.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.warbel.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.warbel.net\/index.php\/wp-json\/wp\/v2\/comments?post=2785"}],"version-history":[{"count":4,"href":"https:\/\/blog.warbel.net\/index.php\/wp-json\/wp\/v2\/posts\/2785\/revisions"}],"predecessor-version":[{"id":2825,"href":"https:\/\/blog.warbel.net\/index.php\/wp-json\/wp\/v2\/posts\/2785\/revisions\/2825"}],"wp:attachment":[{"href":"https:\/\/blog.warbel.net\/index.php\/wp-json\/wp\/v2\/media?parent=2785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.warbel.net\/index.php\/wp-json\/wp\/v2\/categories?post=2785"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.warbel.net\/index.php\/wp-json\/wp\/v2\/tags?post=2785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}