<?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>The musing of Philip Roche</title>
	<atom:link href="https://philroche.net/feed/" rel="self" type="application/rss+xml" />
	<link>https://philroche.net/</link>
	<description></description>
	<lastBuildDate>Fri, 15 Oct 2021 12:55:27 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.7.3</generator>
	<item>
		<title>Debugging Ansible collections in Pycharm</title>
		<link>https://philroche.net/2021/10/15/debugging-ansible-collections-in-pycharm/</link>
		
		<dc:creator><![CDATA[philroche]]></dc:creator>
		<pubDate>Fri, 15 Oct 2021 12:08:19 +0000</pubDate>
				<category><![CDATA[ansible]]></category>
		<category><![CDATA[openstack]]></category>
		<category><![CDATA[os-migrate]]></category>
		<category><![CDATA[pycharm]]></category>
		<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://philroche.net/?p=432</guid>

					<description><![CDATA[In my day job at Red Hat I work on the os-migrate project which allows users to migrate their workloads from one Openstack deployment to another. The project uses ansible to achieve this. My colleague has a nice write up on os-migrate @ https://www.jistr.com/blog/2021-07-12-introduction-to-os-migrate/ and you can see the official docs @ https://os-migrate.github.io/os-migrate/. I am [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>In my day job at <a href="https://www.redhat.com/en" data-type="URL" data-id="https://www.redhat.com/en">Red Hat</a> I work on the <a href="https://os-migrate.github.io/os-migrate/">os-migrate project</a> which allows users to migrate their workloads from one <a href="https://www.openstack.org/">Openstack</a> deployment to another.</p>



<p>The project uses <a href="https://www.ansible.com/">ansible</a> to achieve this.</p>



<p>My colleague has a nice write up on os-migrate @ <a href="https://www.jistr.com/blog/2021-07-12-introduction-to-os-migrate/">https://www.jistr.com/blog/2021-07-12-introduction-to-os-migrate/</a> and you can see the official docs @ <a href="https://os-migrate.github.io/os-migrate/">https://os-migrate.github.io/os-migrate/</a>.</p>



<p>I am working on a new feature and I need to be able to debug my code changes in a nice debugger where I can step through and inspect code.</p>



<p>With ansible collections this isn&#8217;t as easy as regular python script or web projects as the ansible playbooks are by default run from the `~/.ansible` directory after installation using <code><a href="https://docs.ansible.com/ansible/latest/cli/ansible-galaxy.html">ansible-galaxy</a></code>.</p>



<p>I use <a href="https://www.jetbrains.com/pycharm/">Pycharm</a> primarily and with the help of <a href="https://medium.com/@deepak.kothandan/debugging-custom-ansible-modules-with-pycharm-a2d83a5cb28c">Deepak Kothandan&#8217;s excellent Debugging Custom Ansible Modules with PyCharm</a> post I have found a very neat way to debug the os-migrate ansible collection using the Python Debug Server built in to Pycharm and a local python virtual environment.</p>



<p>These are the steps I followed:</p>



<ul><li>Install the <a href="https://pypi.org/project/pydevd-pycharm/">pydevd-pycharm</a> module in your python virtual environment<br></li></ul>



<pre class="wp-block-code"><code>pip install pydevd-pycharm~=212.5284.44 # this will differ for your installed Pycharm version</code></pre>



<ul><li>Create a &#8220;Python Debug Server&#8221; Run/Debug configuration to start the debug server<br></li></ul>



<figure class="wp-block-image size-large"><img loading="lazy" width="1031" height="756" src="https://philroche.net/wp-content/uploads/2021/10/ksnip_20211015-125109.png" alt="a Run/Debug configuration to start the debug server" class="wp-image-436"/></figure>



<ul><li>Start the Debug server</li><li>Add <code>settrace</code> code to the code you wish to debug<br></li></ul>



<pre class="wp-block-code"><code>import pydevd_pycharm
pydevd_pycharm.settrace('localhost', port=40671, stdoutToServer=True, stderrToServer=True) # The port number here might differ depending on your debug configuration above</code></pre>



<ul><li>Build and install your ansible collection so your up to date code is used<br>For os-migrate I can use our <a href="https://github.com/os-migrate/os-migrate/blob/main/Makefile">Makefile</a> to do this<br></li></ul>



<pre class="wp-block-code"><code>make reinstall</code></pre>



<ul><li>Run the code you wish to test either manually or using a different Run/Debug configuration in Pycharm. In the snippet below I am running the export networks playbook using my custom auth creds.</li></ul>



<pre class="wp-block-code"><code>export OSM_DIR=/home/philroche/.ansible/collections/ansible_collections/os_migrate/os_migrate
export CUSTOM_VARIABLES="/home/philroche/Working/os-migrate/local/proche-variables.yaml"
export CUSTOM_VARIABLES_OVERRIDE="/home/philroche/Working/os-migrate/local/proche-variables-local.yaml"
export OSM_CMD="ansible-playbook -vvv -i ${OSM_DIR}/localhost_inventory.yml -e @${CUSTOM_VARIABLES} -e @${CUSTOM_VARIABLES_OVERRIDE}"
$OSM_CMD $OSM_DIR/playbooks/export_networks.yml</code></pre>



<ul><li>When the <code>settrace</code> code is reached then a debug session is started in Pycharm allowing you to step through and into your code in the Pycharm debugger interface.</li></ul>



<figure class="wp-block-image size-large"><img loading="lazy" width="1469" height="742" src="https://philroche.net/wp-content/uploads/2021/10/image-1.png" alt="Step through and into your code in the Pycharm debugger interface" class="wp-image-437"/></figure>



<p>I have found this very helpful in being able to quickly iterate on changes to code in an ansible collection instead of having to wait for each `ansible-playbook` run to complete.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Package changes between two Ubuntu images</title>
		<link>https://philroche.net/2020/10/20/package-changes-between-two-ubuntu-images/</link>
		
		<dc:creator><![CDATA[philroche]]></dc:creator>
		<pubDate>Tue, 20 Oct 2020 17:50:10 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Snapcraft]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu Cloud Images]]></category>
		<guid isPermaLink="false">https://philroche.net/?p=385</guid>

					<description><![CDATA[I work on the Canonical Public Cloud team and we publish all of the Ubuntu server images used in the cloud. We often get asked what the differences are between two released images. For example what is the difference between the Ubuntu 20.04 LTS image kvm optimised image from 20200921 and the Ubuntu 20.04 LTS [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>I work on the Canonical Public Cloud team and we publish all of the Ubuntu server images used in the cloud.</p>



<p>We often get asked what the differences are between two released images. For example what is the difference between the Ubuntu 20.04 LTS image kvm optimised <a href="http://cloud-images.ubuntu.com/releases/focal/release-20200921.1/">image from 20200921</a> and the Ubuntu 20.04 LTS image kvm optimised <a href="http://cloud-images.ubuntu.com/releases/focal/release-20201014/">image from 20201014</a>, specifically what packages changed and what was included in those changes?</p>



<p>For each of our download images published to <a href="http://cloud-images.ubuntu.com/">http://cloud-images.ubuntu.com/</a> we publish a package version manifest which lists all the packages installed and the versions installed at that time. It also lists any installed snaps the the revision of that snap currently installed. This is very useful for checking to see if an image you are about to use has the expected package version for your requirements or has the expected package version that addresses a vulnerability.</p>



<p>Example snippet from a package version manifest:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
&lt;snip&gt;
python3-apport	2.20.11-0ubuntu27.9
python3-distutils	3.8.5-1~20.04.1
&lt;/snip&gt;
</pre></div>


<p>This manifest is also useful to determine the differences between two images. You can do a simple diff of the manifests which will show you the version changes but you can also, with the help of a new <a href="https://snapcraft.io/ubuntu-cloud-image-changelog">ubuntu-cloud-image-changelog</a> command line utility I have published to the <a href="https://snapcraft.io/store">Snap store</a>, determine what changed in those packages.</p>



<figure class="wp-block-image size-large"><a href="https://snapcraft.io/ubuntu-cloud-image-changelog"><img loading="lazy" width="1146" height="182" src="https://philroche.net/wp-content/uploads/2020/10/2020-10-20_18-52.png" alt="ubuntu-cloud-image-changelog available from the snap store" class="wp-image-389"/></a><figcaption><a href="https://snapcraft.io/ubuntu-cloud-image-changelog">ubuntu-cloud-image-changelog available from the snap store</a><a href="https://snapcraft.io/ubuntu-cloud-image-changelog"></a><a href="https://snapcraft.io/ubuntu-cloud-image-changelog"></a></figcaption></figure>



<p>I&#8217;ll work through an example of how to use this tool now:</p>



<p>Using the the <a href="http://cloud-images.ubuntu.com/releases/focal/release-20200921.1/ubuntu-20.04-server-cloudimg-amd64-disk-kvm.manifest">Ubuntu 20.04 LTS image kvm optimised image from 20200921 manifest</a>  and the <a href="http://cloud-images.ubuntu.com/releases/focal/release-20201014/ubuntu-20.04-server-cloudimg-amd64-disk-kvm.manifest">Ubuntu 20.04 LTS image kvm optimised image from 20201014 manifest</a> we can find the package version diff.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
$ diff 20200921.1-ubuntu-20.04-server-cloudimg-amd64-disk-kvm.manifest 20201014-ubuntu-20.04-server-cloudimg-amd64-disk-kvm.manifest
&lt;snip&gt;
426c426
&lt; python3-apport	2.20.11-0ubuntu27.8
---
&gt; python3-apport	2.20.11-0ubuntu27.9
446c446
&lt; python3-distutils	3.8.2-1ubuntu1
---
&gt; python3-distutils	3.8.5-1~20.04.1
&lt;/snip&gt;

</pre></div>


<p>This snippet above is a subset of the packages that changed but you can easily see the version changes. Full diff available @ <a href="https://pastebin.ubuntu.com/p/mzVBzfC5tw/">https://pastebin.ubuntu.com/p/mzVBzfC5tw/</a> .</p>



<p>To see the actual changelog for those package version changes&#8230;</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
$ #install ubuntu-cloud-image-changelog
$ sudo snap install ubuntu-cloud-image-changelog
$ ubuntu-cloud-image-changelog --from-manifest=20200921.1-ubuntu-20.04-server-cloudimg-amd64-disk-kvm.manifest --to-manifest=20201014-ubuntu-20.04-server-cloudimg-amd64-disk-kvm.manifest
&lt;snip&gt;
Snap packages added: &#91;]
Snap packages removed: &#91;]
Snap packages changed: &#91;'snapd']
Deb packages added: &#91;'linux-headers-5.4.0-1026-kvm', 'linux-image-5.4.0-1026-kvm', 'linux-kvm-headers-5.4.0-1026', 'linux-modules-5.4.0-1026-kvm', 'python3-pexpect', 'python3-ptyprocess']
Deb packages removed: &#91;'linux-headers-5.4.0-1023-kvm', 'linux-image-5.4.0-1023-kvm', 'linux-kvm-headers-5.4.0-1023', 'linux-modules-5.4.0-1023-kvm']
Deb packages changed: &#91;'alsa-ucm-conf', 'apport', 'bolt', 'busybox-initramfs', 'busybox-static', 'finalrd', 'gcc-10-base:amd64', 'gir1.2-packagekitglib-1.0', 'language-selector-common', 'libbrotli1:amd64', 'libc-bin', 'libc6:amd64', 'libgcc-s1:amd64', 'libpackagekit-glib2-18:amd64', 'libpython3.8:amd64', 'libpython3.8-minimal:amd64', 'libpython3.8-stdlib:amd64', 'libstdc++6:amd64', 'libuv1:amd64', 'linux-headers-kvm', 'linux-image-kvm', 'linux-kvm', 'locales', 'mdadm', 'packagekit', 'packagekit-tools', 'python3-apport', 'python3-distutils', 'python3-gdbm:amd64', 'python3-lib2to3', 'python3-problem-report', 'python3-urllib3', 'python3.8', 'python3.8-minimal', 'secureboot-db', 'shim', 'shim-signed', 'snapd', 'sosreport', 'zlib1g:amd64']

&lt;/snip&gt;

&lt;snip&gt;
======================================================================
python3-apport changed from version '2.20.11-0ubuntu27.8' to version '2.20.11-0ubuntu27.9'

Source: apport
Version: 2.20.11-0ubuntu27.9
Distribution: focal
Urgency: medium
Maintainer: Brian Murray &lt; - &gt;
Timestamp: 1599065319
Date: Wed, 02 Sep 2020 09:48:39 -0700
Changes:
 apport (2.20.11-0ubuntu27.9) focal; urgency=medium
 .
   &#91; YC Cheng ]
   * apport/apport/hookutils.py: add acpidump using built-in
     dump_acpi_tables.py. (LP: #1888352)
   * bin/oem-getlogs: add &quot;-E&quot; in the usage, since we'd like to talk to
     pulseaudio session and that need environment infomation. Also remove
     acpidump since we will use the one from hook.
 .
 apport (2.20.11-0ubuntu27.8) focal; urgency=medium
 .
   &#91;Brian Murray]
   * Fix pep8 errors regarding ambiguous variables.

======================================================================
python3-distutils changed from version '3.8.2-1ubuntu1' to version '3.8.5-1~20.04.1'

Source: python3-stdlib-extensions
Version: 3.8.5-1~20.04.1
Distribution: focal-proposed
Urgency: medium
Maintainer: Matthias Klose &lt;-&gt;
Timestamp: 1597062287
Date: Mon, 10 Aug 2020 14:24:47 +0200
Closes: 960653
Changes:
 python3-stdlib-extensions (3.8.5-1~20.04.1) focal-proposed; urgency=medium
 .
   * SRU: LP: #1889218. Backport Python 3.8.5 to 20.04 LTS.
   * Build as well for 3.9, except on i386.
 .
 python3-stdlib-extensions (3.8.5-1) unstable; urgency=medium
 .
   * Update 3.8 extensions and modules to the 3.8.5 release.
 .
 python3-stdlib-extensions (3.8.4-1) unstable; urgency=medium
 .
   * Update 3.8 extensions and modules to the 3.8.4 release.
 .
 python3-stdlib-extensions (3.8.4~rc1-1) unstable; urgency=medium
 .
   * Update 3.8 extensions and modules to 3.8.4 release candidate 1.
 .
 python3-stdlib-extensions (3.8.3-2) unstable; urgency=medium
 .
   * Remove bytecode files for 3.7 on upgrade. Closes: #960653.
   * Bump debhelper version.
 .
 python3-stdlib-extensions (3.8.3-1) unstable; urgency=medium
 .
   * Stop building extensions for 3.7.
   * Update 3.8 extensions and modules to 3.8.3 release.

======================================================================
&lt;/snip&gt;
</pre></div>


<p>Above is a snippet of the output where you can see the exact changes made between the two versions. Full changelog available @ <a href="https://pastebin.ubuntu.com/p/cJVwVqzfgh/">https://pastebin.ubuntu.com/p/cJVwVqzfgh/</a>.</p>



<p>I have found this very useful when tracking why a package version changes and also if a package version change includes patches addressing a specific vulnerability.</p>



<p>We don&#8217;t yet publish package version manifests for all of our cloud images so to help in generating manifests I published the <a href="https://snapcraft.io/ubuntu-package-manifest">ubuntu-package-manifest</a> command line utility to easily generate a package version manifest for any Ubuntu or Debian based image or running instance for later use with <a href="https://snapcraft.io/ubuntu-cloud-image-changelog">ubuntu-cloud-image-changelog</a>.</p>



<figure class="wp-block-image size-large"><a href="https://snapcraft.io/ubuntu-package-manifest"><img loading="lazy" width="1145" height="197" src="https://philroche.net/wp-content/uploads/2020/10/2020-10-20_18-50.png" alt="ubuntu-package-manifest available from the snap store" class="wp-image-390"/></a><figcaption><a href="https://snapcraft.io/ubuntu-package-manifest">ubuntu-package-manifest available from the snap store</a></figcaption></figure>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
$ sudo snap install ubuntu-package-manifest
$ # This is a strict snap and requires you to connect the system-backup interface
$ # https://snapcraft.io/docs/the-system-backup-interface 
$ # to access the host system package list. This is access read-only.
$ snap connect ubuntu-package-manifest:system-data
$ sudo ubuntu-package-manifest
</pre></div>


<p>You can even use this on a running desktop install to track package version changes.</p>



<p>ps. We&#8217;re hiring in the <a href="https://canonical.com/careers/2262801">Americas</a> and in <a href="https://canonical.com/careers/2262859">EMEA</a> <img src="https://s.w.org/images/core/emoji/13.0.1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" />  </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Using Snaps to package old software</title>
		<link>https://philroche.net/2020/10/08/using-snaps-to-package-old-software/</link>
		
		<dc:creator><![CDATA[philroche]]></dc:creator>
		<pubDate>Thu, 08 Oct 2020 13:09:21 +0000</pubDate>
				<category><![CDATA[Snapcraft]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://philroche.net/?p=377</guid>

					<description><![CDATA[On Ubuntu Linux snaps are app packages for desktop, cloud and IoT that are easy to install, secure, cross‐platform and dependency‐free and their main selling point is security and confinement. Traditionally packaging for Ubuntu is via .deb packages but much as I try, I never find it straight forward to create or maintain deb packages [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>On Ubuntu Linux <a href="https://snapcraft.io/about">snaps</a> are app packages for desktop, cloud and IoT that are easy to install, secure, cross‐platform and dependency‐free and their main selling point is security and <a href="https://snapcraft.io/docs/snap-confinement">confinement</a>. </p>



<p>Traditionally packaging for Ubuntu is via .deb packages but much as I try, I never find it straight forward to create or maintain deb packages and I find creating snap packages much easier. </p>



<p>One use case of snaps which doesn&#8217;t get talked about much is using snaps to bring no longer supported software back to life. For example, in Ubuntu 20.10 (Groovy Gorilla) which is soon to be released there is no longer support for python2 by default and many other packages have been deprecated too in favour of newer and better replacements. This does mean though that packages which depended on these deprecated packages are not installable and will not run. Snaps can fix this.</p>



<p>Snaps have the concept of <a href="https://snapcraft.io/docs/base-snaps">Base snaps</a> where is snap can specify a runtime which is based on a previous release of Ubuntu.</p>



<ul><li>core20 base is based on Ubuntu 20.04</li><li>core18 base is based on Ubuntu 18.04</li><li>core base is based on Ubuntu 16.04</li></ul>



<p>As such you can create snap packages of any software that is installable on any of these previous Ubuntu releases and run that snap on newer releases of Ubuntu.</p>



<p>My workflow relies on many applications, most of which are still installable on Ubuntu 20.10 but I have found three that are not.</p>



<ul><li><a href="http://doc.bazaar.canonical.com/explorer/en/">bzr-explorer</a></li><li><a href="https://github.com/kozec/syncthing-gtk">syncthing-gtk</a></li><li><a href="https://kitematic.com/">kitematic</a></li></ul>



<p>To unblock my workflow I created snaps of these @ <a href="https://github.com/philroche/bzr-explorer-snap">https://github.com/philroche/bzr-explorer-snap</a>, <a href="https://github.com/philroche/syncthing-gtk-snap">https://github.com/philroche/syncthing-gtk-snap</a> and <a href="https://github.com/philroche/kitematic-snap">https://github.com/philroche/kitematic-snap</a> which are all snaps using the core18 and core20 base snaps.</p>



<p>Note that these snaps are classic snaps and are not confined as is <a href="https://snapcraft.io/docs/snap-confinement">recommended for most snaps</a> but it does unblock my workflow and is a neat use of snap packaging. </p>



<p>If you need help packaging a deprecated deb package as a snap please reach out. </p>



<figure class="wp-block-image size-large"><a href="https://github.com/philroche/bzr-explorer-snap"><img loading="lazy" width="804" height="315" src="https://philroche.net/wp-content/uploads/2020/10/2020-10-08_14-00.png" alt="Bazaar Explorer as a snap" class="wp-image-379"/></a><figcaption>Bazaar Explorer as a snap</figcaption></figure>



<figure class="wp-block-image size-large"><a href="https://github.com/philroche/bzr-explorer-snap"><img loading="lazy" width="903" height="161" src="https://philroche.net/wp-content/uploads/2020/10/2020-10-08_14-02.png" alt="Syncthing-gtk as a snap" class="wp-image-380"/></a><figcaption>Syncthing-gtk as a snap</figcaption></figure>



<figure class="wp-block-image size-large"><a href="https://github.com/philroche/kitematic-snap"><img loading="lazy" width="974" height="423" src="https://philroche.net/wp-content/uploads/2020/10/image.png" alt="kitematic as a snap" class="wp-image-378"/></a><figcaption>kitematic as a snap</figcaption></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Migrating away from WordPress&#8230; but not really</title>
		<link>https://philroche.net/2018/05/22/migrating-away-from-wordpress-but-not-really/</link>
		
		<dc:creator><![CDATA[philroche]]></dc:creator>
		<pubDate>Tue, 22 May 2018 19:46:09 +0000</pubDate>
				<category><![CDATA[Uncategorised]]></category>
		<guid isPermaLink="false">https://philroche.net/?p=365</guid>

					<description><![CDATA[For as long as I can remember I have hosted this blog on Dreamhost using WordPress. Last year I migrated to their Dreampress service but for the tiny amounts of traffic it wasn&#8217;t worth it. Well that and the non stop emails about my wordpress install being vulnerable. The cost and the hassle are what [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>For as long as I can remember I have hosted this blog on <a href="https://www.dreamhost.com/">Dreamhost</a> using <a href="https://wordpress.com/">WordPress</a>. Last year I migrated to their <a href="https://www.dreamhost.com/wordpress/">Dreampress</a> service but for the tiny amounts of traffic it wasn&#8217;t worth it. Well that and the non stop emails about my wordpress install being vulnerable.</p>
<p>The cost and the hassle are what prompted my move away from this set up. I wanted to start serving a  static blog using something like <a href="https://gohugo.io/">Hugo</a>, <a href="https://jekyllrb.com/">Jekyll</a>, <a href="https://getnikola.com/">Nikola</a> or <a href="https://blog.getpelican.com/">Pelican</a> but that meant  importing all my wordpress posts and which I didn&#8217;t fancy doing so I settled on using a local install of WordPress (on my <a href="http://www.freenas.org/">Freenas</a> server) and the excellent <a href="https://wordpress.org/plugins/simply-static/">Simply Static</a> plugin to generate a static site from a WordPress install.</p>
<p><img loading="lazy" class="alignnone wp-image-366 size-full" src="https://philroche.net/wp-content/uploads/2018/05/Selection_001.png" alt="" width="579" height="272" srcset="https://philroche.net/wp-content/uploads/2018/05/Selection_001.png 579w, https://philroche.net/wp-content/uploads/2018/05/Selection_001-300x141.png 300w" sizes="(max-width: 579px) 100vw, 579px" /></p>
<p>The install of WordPress is only accessible on my network so no more vulerability issues. I get all the benefits of WordPress like <a href="https://wordpress.org/plugins/simple-share-buttons-adder/">Social links</a> and <a href="https://wordpress.org/plugins/google-analytics-for-wordpress/">Analytics</a> plugins with the added bonus of a blazing fast static site.</p>
<p>So far I have been very happy with the set up. If you notice any issues pelase let me know <a href="https://twitter.com/philroche">@philroche</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Ubuntu cloud images and how to find the most recent cloud image &#8211; part 2/3</title>
		<link>https://philroche.net/2018/05/15/ubuntu-cloud-images-and-how-to-find-the-most-recent-cloud-image-part-2-of-3/</link>
		
		<dc:creator><![CDATA[philroche]]></dc:creator>
		<pubDate>Tue, 15 May 2018 22:41:39 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu Cloud Images]]></category>
		<guid isPermaLink="false">https://philroche.net/?p=361</guid>

					<description><![CDATA[TLDR; sudo snap install image-status This will install a snap of the very useful `image-status` utility. image-status cloud-release bionic This will show you the serial for the most recent Ubuntu 18.04 Bionic cloud image in QCOW format. image-status ec2-release bionic This will show you the AWS EC2 AMIs for the most recent Ubuntu 18.04 Bionic [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>TLDR;</strong></p>
<pre>sudo snap install image-status</pre>
<p>This will install a <a href="https://snapcraft.io/">snap</a> of the very useful `<a href="https://snapcraft.io/image-status">image-status</a>` utility.</p>
<pre>image-status cloud-release bionic</pre>
<p>This will show you the serial for the most recent Ubuntu 18.04 Bionic cloud image in QCOW format.</p>
<pre>image-status ec2-release bionic</pre>
<p>This will show you the AWS EC2 AMIs for the most recent Ubuntu 18.04 Bionic AWS EC2 cloud images.</p>
<hr />
<p>Part two of a <a href="/category/ubuntu/ubuntu-cloud-images/">three part series</a>.</p>
<p>Following on from <a href="/2018/02/12/ubuntu-cloud-images-and-how-to-find-the-most-recent-cloud-image-part-1-of-3/">part 1</a> where I detailed simplestreams and sstream-query I present to you the `<a href="https://snapcraft.io/image-status">image-status</a>` utility which is a very neat and useful wrapper around <a href="https://launchpad.net/simplestreams">sstream-query</a>.</p>
<p>image-status is hosted on github as part of <a href="https://launchpad.net/~smoser">Scott Moser</a>&#8216;s <a href="https://github.com/smoser/talk-simplestreams/">talk-simplestreams repo</a>.</p>
<p>I recently <a href="https://github.com/smoser/talk-simplestreams/pull/6">submitted a pull request</a> which added the ability to package image-status as a <a href="https://snapcraft.io/">snap</a>. This was merged and you can now install image-status on any linux distribution supporting snaps using the following command.</p>
<pre>sudo snap install image-status</pre>
<p>Once installed you can start querying the simplestreams feeds for details on the most recent Ubuntu cloud images.</p>
<p>Usage:</p>
<pre>image-status --help # to see all available options

image-status cloud-release bionic # to see most recent Ubuntu Bionic release images on <a class="p-link--external" href="http://cloud-images.ubuntu.com/" rel="nofollow">http://cloud-images.ubuntu.com/</a>
image-status cloud-daily bionic # to see most recent Ubuntu Bionic daily images on <a class="p-link--external" href="http://cloud-images.ubuntu.com/" rel="nofollow">http://cloud-images.ubuntu.com/</a>

image-status gce-release bionic # to see most recent Ubuntu Bionic release images on GCE
image-status gce-dailybionic # to see most recent UbuntuBionic daily images on GCE

image-status ec2-release bionic # to see most recent Ubuntu Bionic release AMIs on EC2
image-status ec2-daily bionic # to see most recent UbuntuBionic daily AMIs on EC2

image-status azure-release bionic # to see most recent Ubuntu Bionic release images on Azure
image-status azure-daily bionic # to see most recent UbuntuBionic daily images on Azure

image-status maas-release bionic # to see most recent Ubuntu Bionic release images for maas V2
image-status maas-daily bionic # to see most recent UbuntuBionic daily images for maas V2

image-status maas3-release bionic # to see most recent Ubuntu Bionic release images for maas V3
image-status maas3-daily bionic # to see most recent Ubuntu Bionic daily images for maas V3</pre>
<p>I find this very useful when trying to quickly see what is the most recent Ubuntu release on any particular public cloud. eg:</p>
<pre>image-status ec2-release bionic | grep eu-west-1 | grep hvm | grep ssd | awk '{split($0,a," "); print a[6]}'</pre>
<p>This will return the ID for the most recent HVM EBS Ubuntu 18.04 (Bionic) in the eu-west-1 AWS EC2 region. This can be achieved using sstream-query too but I find filtering using grep to be easier to understand and iterate with.</p>
<p>I hope the above is helpful with your automation.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Google Photos Programming “API” Hack</title>
		<link>https://philroche.net/2018/02/21/google-photos-programming-api-hack/</link>
		
		<dc:creator><![CDATA[philroche]]></dc:creator>
		<pubDate>Wed, 21 Feb 2018 13:05:39 +0000</pubDate>
				<category><![CDATA[Google Photos]]></category>
		<guid isPermaLink="false">https://philroche.net/?p=351</guid>

					<description><![CDATA[When investigating using the python api for Google Photos it soon became apparent that it was no longer possible to add existing photos to an existing album. The video shows how I managed to do this by recording http requests in Google Chrome and exporting to Curl Command. You will have to export the request every time [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>When investigating using the <a href="https://web.archive.org/web/20180412100138/https://developers.google.com/picasa-web/docs/1.0/developers_guide_python">python api for Google Photos</a> it soon became apparent that it was no longer possible to add existing photos to an existing album.</p>
<p>The video shows how I managed to do this by recording http requests in Google Chrome and exporting to Curl Command.</p>
<p>You will have to export the request every time your logged in session expires but for my usecase this is not a problem.</p>
<p>I hope this helps someone.</p>
<p><iframe loading="lazy" width="625" height="352" src="https://www.youtube.com/embed/ndBObJHnWa4?feature=oembed" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></p>
<div id="selenium-highlight"></div>
<div id="selenium-highlight"></div>
<div id="selenium-highlight"></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Ubuntu cloud images and how to find the most recent cloud image &#8211; part 1/3</title>
		<link>https://philroche.net/2018/02/12/ubuntu-cloud-images-and-how-to-find-the-most-recent-cloud-image-part-1-of-3/</link>
		
		<dc:creator><![CDATA[philroche]]></dc:creator>
		<pubDate>Mon, 12 Feb 2018 11:50:17 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu Cloud Images]]></category>
		<guid isPermaLink="false">https://www.philroche.net/?p=348</guid>

					<description><![CDATA[TLDR; sstream-query --json --max=1 --keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg http://cloud-images.ubuntu.com/releases/streams/v1/com.ubuntu.cloud:released:download.sjson arch=amd64 release_codename='Xenial Xerus' ftype='disk1.img' &#124; jq -r '.[].item_url' This will show you the URL for the most recent Ubuntu 16.04 Xenial cloud image in QCOW format. Part one of a three part series. There are a few ways to find the most recent Ubuntu cloud image an the simplest [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>TLDR;</strong></p>
<pre>sstream-query --json --max=1 --keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg http://cloud-images.ubuntu.com/releases/streams/v1/com.ubuntu.cloud:released:download.sjson arch=amd64 release_codename='Xenial Xerus' ftype='disk1.img' | jq -r '.[].item_url'</pre>
<p>This will show you the URL for the most recent Ubuntu 16.04 Xenial cloud image in QCOW format.</p>
<hr />
<p>Part one of a <a href="/category/ubuntu/ubuntu-cloud-images/">three part series</a>.</p>
<p>There are a few ways to find the most recent Ubuntu cloud image an t<span style="font-size: 1rem;">he simplest method is to view the<a href="http://cloud-images.ubuntu.com/releases/16.04/release/"> release page</a> which lists the most recent release.</span></p>
<p>Another method is to use the <a href="http://cloud-images.ubuntu.com/releases/streams/v1/">cloud image simple streams data</a> which we also update every time <a href="https://partners.ubuntu.com/programmes/public-cloud">we (I work on the Certified Public Cloud team @ Canonical)</a> publish an image.</p>
<p>We publish simple streams data for major public clouds too but this post deals with the base Ubuntu cloud image. I will follow up this post with details on how to use the cloud specific streams data.</p>
<p><strong>Simple streams</strong></p>
<p>Simple streams is a structured format describing the Ubuntu cloud image releases.</p>
<p>You can parse the <a href="http://cloud-images.ubuntu.com/releases/streams/v1/com.ubuntu.cloud:released:download.json">Ubuntu&#8217;s release cloud image stream json</a> yourself or you can use a combination of sstream-query and jq (install packages &#8220;<a href="https://launchpad.net/ubuntu/+source/ubuntu-cloudimage-keyring">ubuntu-cloudimage-keyring</a>&#8220;, &#8220;<a href="https://launchpad.net/ubuntu/+source/simplestreams">simplestreams</a>&#8221; and &#8220;<a href="https://launchpad.net/ubuntu/+source/jq">jq</a>&#8220;) to get all or specific data about the most recent release.</p>
<p><em>Query all data from most recent release</em></p>
<pre>sstream-query --json --max=1 --keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg http://cloud-images.ubuntu.com/releases/ arch=amd64 release='xenial' ftype='disk1.img'</pre>
<p>This will return all data on the release including date released and also the checksums of the file.</p>
<pre>[
 {
 "aliases": "16.04,default,lts,x,xenial",
 "arch": "amd64",
 "content_id": "com.ubuntu.cloud:released:download",
 "datatype": "image-downloads",
 "format": "products:1.0",
 "ftype": "disk1.img",
 "item_name": "disk1.img",
 "item_url": "http://cloud-images.ubuntu.com/releases/server/releases/xenial/release-20180126/ubuntu-16.04-server-cloudimg-amd64-disk1.img",
 "label": "release",
 "license": "http://www.canonical.com/intellectual-property-policy",
 "md5": "9cb8ed487ad8fbc8b7d082968915c4fd",
 "os": "ubuntu",
 "path": "server/releases/xenial/release-20180126/ubuntu-16.04-server-cloudimg-amd64-disk1.img",
 "product_name": "com.ubuntu.cloud:server:16.04:amd64",
 "pubname": "ubuntu-xenial-16.04-amd64-server-20180126",
 "release": "xenial",
 "release_codename": "Xenial Xerus",
 "release_title": "16.04 LTS",
 "sha256": "da7a59cbaf43eaaa83ded0b0588bdcee4e722d9355bd6b9bfddd01b2e7e372e2",
 "size": "289603584",
 "support_eol": "2021-04-21",
 "supported": "True",
 "updated": "Wed, 07 Feb 2018 03:58:59 +0000",
 "version": "16.04",
 "version_name": "20180126"
 }
 ]</pre>
<p><em>Query only the url to the most recent release</em></p>
<pre>sstream-query --json --max=1 --keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg http://cloud-images.ubuntu.com/releases/streams/v1/com.ubuntu.cloud:released:download.sjson arch=amd64 release_codename='Xenial Xerus' ftype='disk1.img' | jq -r '.[].item_url'</pre>
<p>This will show you the URL for the most recent Ubuntu 16.04 Xenial cloud image in QCOW format.</p>
<pre>"http://cloud-images.ubuntu.com/releases/server/releases/xenial/release-20180126/ubuntu-16.04-server-cloudimg-amd64-disk1.img"</pre>
<p><em>Query only the serial of the most recent release</em></p>
<pre>sstream-query --json --max=1 --keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg http://cloud-images.ubuntu.com/releases/ arch=amd64 release_codename='Xenial Xerus' ftype='disk1.img' | jq ".[].version_name"</pre>
<p>This will show you the serial of the most recent Ubuntu 16.04 Xenial cloud image.</p>
<pre>"20180126"</pre>
<p>The above streams are signed using keys in the ubuntu-cloudimage-keyring keyring but you can replace the &#8211;keyring option with &#8211;no-verify to bypass any signing checks. Another way to bypass the checks is to to use the <a href="http://cloud-images.ubuntu.com/releases/streams/v1/com.ubuntu.cloud:released:download.json">unsigned streams</a>.</p>
<p>It is also worth noting that OpenStack can be configured to use streams too.</p>
<p>I hope the above is helpful with your automation.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Xerox DocuMate 3220 scanner on Ubuntu</title>
		<link>https://philroche.net/2017/10/10/xerox-documate-3220-scanner-on-ubuntu/</link>
		
		<dc:creator><![CDATA[philroche]]></dc:creator>
		<pubDate>Tue, 10 Oct 2017 09:41:08 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[USB]]></category>
		<guid isPermaLink="false">https://www.philroche.net/?p=210</guid>

					<description><![CDATA[Confirmation that the Xerox DocuMate 3220 does work on Ubuntu]]></description>
										<content:encoded><![CDATA[<p><b>TLDR;</b> This blog post is confirming that the Xerox DocuMate 3220 does work on Ubuntu and shows how to add permissions for non root users to use it.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>I was using my wife&#8217;s <a href="https://support.hp.com/us-en/product/hp-photosmart-c4400-all-in-one-printer-series/3655558">old printer/scanner all in one</a> for scanning documents and it worked well but it was a pain to scan multiple documents so I decided to get a business scanner with auto feed and duplex scanning.</p>
<p>I went for the <a href="http://www.xeroxscanners.com/en/uk/products/item.asp?PN=DM3220">Xerox DocuMate 3220</a> as it stated it was SANE compatible so would work on Linux.</p>
<p><img loading="lazy" class="alignnone size-full wp-image-315" src="https://philroche.net/wp-content/uploads/2017/10/DM3220_img1-1.jpg" alt="DM3220_img1.jpg" width="640" height="440" srcset="https://philroche.net/wp-content/uploads/2017/10/DM3220_img1-1.jpg 640w, https://philroche.net/wp-content/uploads/2017/10/DM3220_img1-1-300x206.jpg 300w" sizes="(max-width: 640px) 100vw, 640px" /></p>
<p>With an RRP of ~€310 I managed to get a refurbished model for €98 delivered from ebay but sadly I didn&#8217;t do enough research as the scanner is <a href="http://www.sane-project.org/sane-backends.html">not SANE supported</a>.</p>
<p>In my research in trying to add the scanner to the xerox_mfp SANE backend config (which didn&#8217;t work) I discovered that <a href="https://www.hamrick.com/">VueScan</a> was available for Linux and it&#8217;s <a href="https://www.hamrick.com/vuescan/xerox.html#scanner-drivers">supported scanners</a> did list some of the Xerox DocuMate series. I had used VueScan on my old MacBook Pro and was very happy with so I gave it a shot. Note that VueScan is not Open Source and not free but it is excellent software and well worth the €25 purchase price.</p>
<p>Lo and behold it found the scanner and it supported all of the scanner&#8217;s features.</p>
<ul>
<li>Flatbed scanning</li>
<li>Auto feed</li>
<li>Duplex auto feed</li>
</ul>
<p>However VueScan would only detect the scanner when run as root due to libusb permissions.</p>
<p>To add permissions for non root users to use the scanner I made the following changes. This guide should also be helpful when changing permissions for any USB device. The following changes were made on an Ubuntu 17.10 machine.</p>
<p><i># Add myself to the scanner group. You can do this through the &#8220;Users and Groups&#8221; GUI too.</i></p>
<pre>philroche@bomek:$ sudo usermod -a -G scanner philroche</pre>
<p><i># Find the scanner vendor id and product id</i></p>
<p>Running dmesg we can see the scanner listed with idVendor=04a7 and idProduct=04bf</p>
<pre>philroche@bomek$ dmesg
usb 1-2.4.3: new high-speed USB <b>device number 26</b> using xhci_hcd
usb 1-2.4.3: New USB device found, <b>idVendor=04a7, idProduct=04bf</b>
usb 1-2.4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-2.4.3: Product: DM3220
usb 1-2.4.3: Manufacturer: Xerox
usb 1-2.4.3: SerialNumber: 3ASDHC0333</pre>
<p>Note: The device number will most likley be different on your system.</p>
<p>Running <code>lsusb</code> we can see that the scanner is also listed as &#8220;Visioneer&#8221;</p>
<pre>philroche@bomek:$ lsusb
Bus <b>001</b> Device <b>026</b>: ID 04a7:04bf <b>Visioneer</b></pre>
<p>Note: As with the the device number, the Bus used is likley to be different on your system.</p>
<p>We can see above that the device is on bus 001 as device 026. Using this info we can get full <a href="http://manpages.ubuntu.com/manpages/xenial/man7/udev.7.html">udev</a> (Dynamic device management) info.</p>
<pre>philroche@bomek:$ udevadm info -a -p $(udevadm info -q path -n /dev/bus/usb/001/026)
looking at device '/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.4/1-2.4.3':
 KERNEL=="1-2.4.3"
 SUBSYSTEM=="usb"
 DRIVER=="usb"
 ATTR{authorized}=="1"
 ATTR{avoid_reset_quirk}=="0"
 ATTR{bConfigurationValue}=="1"
 ATTR{bDeviceClass}=="00"
 ATTR{bDeviceProtocol}=="00"
 ATTR{bDeviceSubClass}=="00"
 ATTR{bMaxPacketSize0}=="64"
 ATTR{bMaxPower}=="0mA"
 ATTR{bNumConfigurations}=="1"
 ATTR{bNumInterfaces}==" 1"
 ATTR{bcdDevice}=="0001"
 ATTR{bmAttributes}=="c0"
 ATTR{busnum}=="1"
 ATTR{configuration}==""
 ATTR{devnum}=="26"
 ATTR{devpath}=="2.4.3"
 ATTR{idProduct}=="04bf"
 ATTR{idVendor}=="04a7"
 ATTR{ltm_capable}=="no"
 ATTR{manufacturer}=="Xerox"
 ATTR{maxchild}=="0"
 ATTR{product}=="DM3220"
 ATTR{quirks}=="0x0"
 ATTR{removable}=="unknown"
 ATTR{serial}=="3ASDHC0333"
 ATTR{speed}=="480"
 ATTR{urbnum}=="1251"
 ATTR{version}==" 2.00"</pre>
<p>This is the info we need to create our udev rule</p>
<p><i># Add Udev rules allowing non root users access to the scanner</i></p>
<p>Create a new udev rule</p>
<pre>philroche@bomek:$ sudo nano /etc/udev/rules.d/71-xeroxdocument3220.rules</pre>
<p>Paste the following text to that new file</p>
<pre>SUBSYSTEM=="usb", ATTR{manufacturer}=="Xerox", ATTR{product}=="DM3220", ATTR{idVendor}=="04a7", ATTR{idProduct}=="04bf", MODE="0666", GROUP="scanner"</pre>
<p>This adds a rule to allow any user in the &#8220;scanner&#8221; group (which we added ourselves to earlier) permission to use the usb device with vendor 04a7 and product 04bf.</p>
<p>Note you will have to log out and log in for any group changes to take effect or run <code>su - $USER</code></p>
<p><i># Reload the udev rules</i></p>
<pre>philroche@bomek:$ sudo udevadm control --reload-rules</pre>
<p><i># Test these new udev rules</i></p>
<pre>philroche@bomek:$ udevadm test $(udevadm info -q path -n /dev/bus/usb/001/026)</pre>
<p>You shouldn&#8217;t see any permissions related errors.</p>
<p>Now when you run VueScan as a non-root user you should see no permissions errors.</p>
<p><i># Start VueScan</i></p>
<pre>philroche@bomek:$ ./vuescan</pre>
<p><img loading="lazy" class="alignnone size-full wp-image-308" src="https://philroche.net/wp-content/uploads/2017/10/Selection_238.png" alt="Selection_238.png" width="858" height="796" srcset="https://philroche.net/wp-content/uploads/2017/10/Selection_238.png 858w, https://philroche.net/wp-content/uploads/2017/10/Selection_238-300x278.png 300w, https://philroche.net/wp-content/uploads/2017/10/Selection_238-768x713.png 768w" sizes="(max-width: 858px) 100vw, 858px" /></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Creating a VPN server on AWS using PiVPN</title>
		<link>https://philroche.net/2017/05/29/creating-a-vpn-server-on-aws-using-pivpn/</link>
		
		<dc:creator><![CDATA[philroche]]></dc:creator>
		<pubDate>Mon, 29 May 2017 10:06:10 +0000</pubDate>
				<category><![CDATA[aws]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VPN]]></category>
		<guid isPermaLink="false">https://www.philroche.net/?p=49</guid>

					<description><![CDATA[Step by step guide to setting up a VPN server on AWS using PiVPN]]></description>
										<content:encoded><![CDATA[<p>One of the streaming services I use called <a href="https://www.nowtv.com/">NowTV</a> recently launched an Irish service alongside their UK service which I was using. The Irish service costs <strong>_double_</strong>  the cost in UK. They have also begun geoblocking all Irish users and also users of VPN Services like <a href="https://www.expressvpn.com/">ExpressVPN</a> and <a href="https://www.privateinternetaccess.com/">PrivateInternetAccess</a> from using the UK service.</p>
<p>To get around this I decided to set up my own VPN server on AWS in their <a href="https://aws.amazon.com/blogs/aws/now-open-aws-london-region/">London datacenter</a> to get around the geoblocking.</p>
<p>The easiest way I have found to set up a VPN server is to use <a href="http://www.pivpn.io/">PiVPN</a> (<a href="http://www.pivpn.io/">http://www.pivpn.io/</a>) which was designed for use on Raspberry Pi but can be installed on any Debian based machine.</p>
<p>There has been a few <a href="http://www.pivpn.io/#tech">recent guides</a> on how to install PiVPN but this one focusses on installing on AWS.</p>
<p>A prerequisite for this guide is that you have an <a href="https://aws.amazon.com/">AWS account</a>. If this is your first time using AWS then you can avail of their <a href="https://aws.amazon.com/free/">free tier</a> for the first year which means you could have the use of a reliable VPN server free for a whole year. You will also need an <a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2">SSH keypair</a>.</p>
<p>The steps are as follows:</p>
<ol>
<li><a href="#step1">Start up an instance of Ubuntu Server on AWS in the London region</a></li>
<li><a href="#step2">Install PiVPN</a></li>
<li><a href="#step3">Download VPN configuration files for use locally</a></li>
</ol>
<h3 id="step1">1. Start up an instance of Ubuntu Server on AWS in the London region</h3>
<p>Log in to your AWS account and select the London region, also referred to as eu-west-1.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_141-copy.png"><img loading="lazy" class="alignnone wp-image-64 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_141-copy.png" alt="Selection_141 (copy).png" width="1467" height="1064" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_141-copy.png 1467w, https://philroche.net/wp-content/uploads/2017/05/Selection_141-copy-300x218.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_141-copy-768x557.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_141-copy-1024x743.png 1024w" sizes="(max-width: 1467px) 100vw, 1467px" /></a></p>
<p>Create a new security group for use with your VPN server.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_141-1.png"><img loading="lazy" class="alignnone wp-image-74 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_141-1.png" alt="Selection_141.png" width="1467" height="1064" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_141-1.png 1467w, https://philroche.net/wp-content/uploads/2017/05/Selection_141-1-300x218.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_141-1-768x557.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_141-1-1024x743.png 1024w" sizes="(max-width: 1467px) 100vw, 1467px" /></a></p>
<p>This new group sets up the firewall rules for our server and will allow only access to port 22 for SSH traffic and UDP port 1194 for all VPN traffic.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_140.png"><img loading="lazy" class="alignnone wp-image-81 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_140.png" alt="Selection_140.png" width="1467" height="1064" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_140.png 1467w, https://philroche.net/wp-content/uploads/2017/05/Selection_140-300x218.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_140-768x557.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_140-1024x743.png 1024w" sizes="(max-width: 1467px) 100vw, 1467px" /></a></p>
<p>Launch a server instance</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_141.png"><img loading="lazy" class="alignnone wp-image-71 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_141.png" alt="Selection_141.png" width="1467" height="1064" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_141.png 1467w, https://philroche.net/wp-content/uploads/2017/05/Selection_141-300x218.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_141-768x557.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_141-1024x743.png 1024w" sizes="(max-width: 1467px) 100vw, 1467px" /></a></p>
<p>We will choose Ubuntu Server 16.04 as it is a Debian based distro so PiVPN will install.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_142.png"><img loading="lazy" class="alignnone wp-image-83 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_142.png" alt="Selection_142.png" width="1467" height="1064" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_142.png 1467w, https://philroche.net/wp-content/uploads/2017/05/Selection_142-300x218.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_142-768x557.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_142-1024x743.png 1024w" sizes="(max-width: 1467px) 100vw, 1467px" /></a></p>
<p>Choose the t2.micro instance type. This is the instance type that is free tier elligible.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_143.png"><img loading="lazy" class="alignnone wp-image-87 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_143.png" alt="Selection_143.png" width="1467" height="1064" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_143.png 1467w, https://philroche.net/wp-content/uploads/2017/05/Selection_143-300x218.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_143-768x557.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_143-1024x743.png 1024w" sizes="(max-width: 1467px) 100vw, 1467px" /></a></p>
<p>Leave instance details default</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_144.png"><img loading="lazy" class="alignnone wp-image-90 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_144.png" alt="Selection_144.png" width="1467" height="1064" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_144.png 1467w, https://philroche.net/wp-content/uploads/2017/05/Selection_144-300x218.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_144-768x557.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_144-1024x743.png 1024w" sizes="(max-width: 1467px) 100vw, 1467px" /></a></p>
<p>Leave storage as the default 8GB SSD</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_145.png"><img loading="lazy" class="alignnone wp-image-92 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_145.png" alt="Selection_145.png" width="1467" height="1064" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_145.png 1467w, https://philroche.net/wp-content/uploads/2017/05/Selection_145-300x218.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_145-768x557.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_145-1024x743.png 1024w" sizes="(max-width: 1467px) 100vw, 1467px" /></a></p>
<p>No need to add any tags</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_146.png"><img loading="lazy" class="alignnone wp-image-94 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_146.png" alt="Selection_146.png" width="1467" height="1064" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_146.png 1467w, https://philroche.net/wp-content/uploads/2017/05/Selection_146-300x218.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_146-768x557.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_146-1024x743.png 1024w" sizes="(max-width: 1467px) 100vw, 1467px" /></a></p>
<p>Choose the security group we previously created.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_147.png"><img loading="lazy" class="alignnone wp-image-96 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_147.png" alt="Selection_147.png" width="1467" height="1064" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_147.png 1467w, https://philroche.net/wp-content/uploads/2017/05/Selection_147-300x218.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_147-768x557.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_147-1024x743.png 1024w" sizes="(max-width: 1467px) 100vw, 1467px" /></a></p>
<p>Review settings &#8211; nothing to change here.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_148.png"><img loading="lazy" class="alignnone wp-image-97 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_148.png" alt="Selection_148.png" width="1467" height="1064" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_148.png 1467w, https://philroche.net/wp-content/uploads/2017/05/Selection_148-300x218.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_148-768x557.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_148-1024x743.png 1024w" sizes="(max-width: 1467px) 100vw, 1467px" /></a></p>
<p>Click Launch and specify either a new SSH keypair or an existing SSH key pair. I have chosen an existing pair which is called &#8220;philroche&#8221;.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_149.png"><img loading="lazy" class="alignnone wp-image-100 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_149.png" alt="Selection_149.png" width="1467" height="1064" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_149.png 1467w, https://philroche.net/wp-content/uploads/2017/05/Selection_149-300x218.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_149-768x557.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_149-1024x743.png 1024w" sizes="(max-width: 1467px) 100vw, 1467px" /></a></p>
<p>Check the checkbox abount key access and click Launch Instances. Your instance will now launch.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_150.png"><img loading="lazy" class="alignnone wp-image-104 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_150.png" alt="Selection_150.png" width="1467" height="1064" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_150.png 1467w, https://philroche.net/wp-content/uploads/2017/05/Selection_150-300x218.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_150-768x557.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_150-1024x743.png 1024w" sizes="(max-width: 1467px) 100vw, 1467px" /></a></p>
<p>Click View Instances and once state has changed to running note the IPv4 Public IP. You now have an instance on Ubuntu Server running on AWS in their London datacentre.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_151.png"><img loading="lazy" class="alignnone wp-image-107 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_151.png" alt="Selection_151.png" width="1467" height="1064" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_151.png 1467w, https://philroche.net/wp-content/uploads/2017/05/Selection_151-300x218.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_151-768x557.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_151-1024x743.png 1024w" sizes="(max-width: 1467px) 100vw, 1467px" /></a></p>
<h3 id="step2">2. Install PiVPN</h3>
<p>SSH in to your new server using the private key from the pair specified when launching the server.</p>
<pre>ssh -i ~/.ssh/philroche ubuntu@%IPV4IPAddress%</pre>
<p>substituting %IPV4IPAddress% for the IP address of your server</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_152-1.png"><img loading="lazy" class="alignnone wp-image-121 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_152-1.png" alt="Selection_152.png" width="1267" height="623" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_152-1.png 1267w, https://philroche.net/wp-content/uploads/2017/05/Selection_152-1-300x148.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_152-1-768x378.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_152-1-1024x504.png 1024w" sizes="(max-width: 1267px) 100vw, 1267px" /></a></p>
<p>Once logged in update the packages on the server.</p>
<pre>sudo apt-get update</pre>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_154.png"><img loading="lazy" class="alignnone wp-image-123 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_154.png" alt="Selection_154.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_154.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_154-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_154-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_154-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p>Start the PiVPN installer.</p>
<pre>curl -L <a href="https://install.pivpn.io/">https://install.pivpn.io/</a> | bash</pre>
<p>For more detail on this, see <a href="http://www.pivpn.io/#tech">http://www.pivpn.io/#tech</a></p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_172.png"><img loading="lazy" class="alignnone wp-image-129 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_172.png" alt="Selection_172.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_172.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_172-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_172-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_172-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p>You are then guided through the process of installing all the required software and configuring the VPN server:</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_155.png"><img loading="lazy" class="alignnone wp-image-133 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_155.png" alt="Selection_155.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_155.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_155-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_155-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_155-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_156.png"><img loading="lazy" class="alignnone wp-image-134 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_156.png" alt="Selection_156.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_156.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_156-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_156-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_156-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_157.png"><img loading="lazy" class="alignnone wp-image-135 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_157.png" alt="Selection_157.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_157.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_157-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_157-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_157-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_158.png"><img loading="lazy" class="alignnone wp-image-136 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_158.png" alt="Selection_158.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_158.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_158-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_158-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_158-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p>Choose the default ubuntu user.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_159.png"><img loading="lazy" class="alignnone wp-image-138 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_159.png" alt="Selection_159.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_159.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_159-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_159-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_159-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_160.png"><img loading="lazy" class="alignnone wp-image-139 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_160.png" alt="Selection_160.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_160.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_160-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_160-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_160-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p>We do want to enable unattended upgrades of security patches.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_161.png"><img loading="lazy" class="alignnone wp-image-141 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_161.png" alt="Selection_161.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_161.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_161-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_161-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_161-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p>Choose UDP as the protocol to use.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_162.png"><img loading="lazy" class="alignnone wp-image-144 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_162.png" alt="Selection_162.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_162.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_162-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_162-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_162-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p>Choose the default port 1194.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_163.png"><img loading="lazy" class="alignnone wp-image-146 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_163.png" alt="Selection_163.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_163.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_163-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_163-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_163-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_164.png"><img loading="lazy" class="alignnone wp-image-149 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_164.png" alt="Selection_164.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_164.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_164-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_164-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_164-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p>Create a 2048 bit encryption key.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_165.png"><img loading="lazy" class="alignnone wp-image-150 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_165.png" alt="Selection_165.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_165.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_165-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_165-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_165-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_166.png"><img loading="lazy" class="alignnone wp-image-153 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_166.png" alt="Selection_166.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_166.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_166-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_166-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_166-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p>Choose to use your servers public IP address.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_167.png"><img loading="lazy" class="alignnone wp-image-155 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_167.png" alt="Selection_167.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_167.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_167-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_167-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_167-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p>Choose whichever DNS provider you would like to use. I chose Google.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_168.png"><img loading="lazy" class="alignnone wp-image-156 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_168.png" alt="Selection_168.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_168.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_168-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_168-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_168-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p>Installation is now complete <img src="https://s.w.org/images/core/emoji/13.0.1/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_169.png"><img loading="lazy" class="alignnone wp-image-158 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_169.png" alt="Selection_169.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_169.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_169-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_169-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_169-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p>Choose to reboot the server.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_170.png"><img loading="lazy" class="alignnone wp-image-163 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_170.png" alt="Selection_170.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_170.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_170-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_170-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_170-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_171.png"><img loading="lazy" class="alignnone wp-image-166 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_171.png" alt="Selection_171.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_171.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_171-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_171-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_171-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p>Once the server has rebooted, checking the AWS dashboard for it&#8217;s status, SSH back in to the server.</p>
<p>Now we need to configure a VPN profile that we can use to connect to the VPN server.</p>
<p>The easiest way to do this is to use the ​​​​pivpn command line utility.</p>
<pre>pivpn add</pre>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_173.png"><img loading="lazy" class="alignnone wp-image-167 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_173.png" alt="Selection_173.png" width="1271" height="624" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_173.png 1271w, https://philroche.net/wp-content/uploads/2017/05/Selection_173-300x147.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_173-768x377.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_173-1024x503.png 1024w" sizes="(max-width: 1271px) 100vw, 1271px" /></a></p>
<p>This will guide you through the process of creating a profile. Make sure to use a strong password and note both the profile name and the password as you will need these later.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_174.png"><img loading="lazy" class="alignnone wp-image-172 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_174.png" alt="Selection_174.png" width="1261" height="911" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_174.png 1261w, https://philroche.net/wp-content/uploads/2017/05/Selection_174-300x217.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_174-768x555.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_174-1024x740.png 1024w" sizes="(max-width: 1261px) 100vw, 1261px" /></a></p>
<p>Set up is now complete so you can logout.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_175.png"><img loading="lazy" class="alignnone wp-image-174 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_175.png" alt="Selection_175.png" width="1264" height="536" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_175.png 1264w, https://philroche.net/wp-content/uploads/2017/05/Selection_175-300x127.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_175-768x326.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_175-1024x434.png 1024w" sizes="(max-width: 1264px) 100vw, 1264px" /></a></p>
<h3 id="step3">3. Download VPN configuration files for use locally</h3>
<p>The only thing left to do is to download the profile you created from the server so that you can use it locally.</p>
<pre>scp -i ~/.ssh/philroche ubuntu@%IPV4IPAddress%:/home/ubuntu/ovpns/%PROFILENAME%.ovpn .</pre>
<p>substituting %IPV4IPAddress% for the IP address of your server and %PROFILENAME% with the name of the profile you created.</p>
<p>This will download the .ovpn file to your current directory.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/Selection_177.png"><img loading="lazy" class="alignnone wp-image-182 size-full" src="https://philroche.net/wp-content/uploads/2017/05/Selection_177.png" alt="Selection_177.png" width="1264" height="536" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_177.png 1264w, https://philroche.net/wp-content/uploads/2017/05/Selection_177-300x127.png 300w, https://philroche.net/wp-content/uploads/2017/05/Selection_177-768x326.png 768w, https://philroche.net/wp-content/uploads/2017/05/Selection_177-1024x434.png 1024w" sizes="(max-width: 1264px) 100vw, 1264px" /></a></p>
<p>Once downloaded you can import this to your VPN client software of choice.</p>
<p>I used the profile on a small <a href="https://wiki.openwrt.org/toh/nexx/wt3020">Nexx WT3020</a> I had with <a href="https://openwrt.org/">OpenWRT</a> installed. I connect this to my NowTV box so I can continue to use NowTV UK instead of the overpriced NowTV Ireland.</p>
<p><a href="https://philroche.net/wp-content/uploads/2017/05/IMG_20170529_105928.jpg"><img loading="lazy" class="alignnone wp-image-192 size-full" src="https://philroche.net/wp-content/uploads/2017/05/IMG_20170529_105928.jpg" alt="IMG_20170529_105928.jpg" width="800" height="600" srcset="https://philroche.net/wp-content/uploads/2017/05/IMG_20170529_105928.jpg 800w, https://philroche.net/wp-content/uploads/2017/05/IMG_20170529_105928-300x225.jpg 300w, https://philroche.net/wp-content/uploads/2017/05/IMG_20170529_105928-768x576.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" /></a></p>
<p>I hope this guide was helpful.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>The ultimate wifi upgrade</title>
		<link>https://philroche.net/2017/05/15/the-ultimate-wifi-upgrade/</link>
		
		<dc:creator><![CDATA[philroche]]></dc:creator>
		<pubDate>Mon, 15 May 2017 20:10:57 +0000</pubDate>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[wifi]]></category>
		<guid isPermaLink="false">https://www.philroche.net/?p=44</guid>

					<description><![CDATA[I have been procrastinating for a very long time about whether or not to take the plunge and upgrade my office/home wifisetup. The goal of the upgrade is to have complete high speed wifi coverage throughout my house and seamless hand over between access points. Today I bit the bullet and decided to buy a [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I have been procrastinating for a very long time about whether or not to take the plunge and upgrade my office/home wifisetup. The goal of the upgrade is to have complete high speed wifi coverage throughout my house and seamless hand over between access points.</p>
<p><div id="attachment_46" style="width: 670px" class="wp-caption alignnone"><a href="https://www.ubnt.com/accessories/toughswitch/"><img aria-describedby="caption-attachment-46" loading="lazy" class="wp-image-46 size-medium_large" src="https://philroche.net/wp-content/uploads/2017/05/toughswitch-features-design-768x185.jpg" alt="TOUGHSwitch TS‑8‑PRO" width="660" height="159" srcset="https://philroche.net/wp-content/uploads/2017/05/toughswitch-features-design-768x185.jpg 768w, https://philroche.net/wp-content/uploads/2017/05/toughswitch-features-design-300x72.jpg 300w, https://philroche.net/wp-content/uploads/2017/05/toughswitch-features-design.jpg 936w" sizes="(max-width: 660px) 100vw, 660px" /></a><p id="caption-attachment-46" class="wp-caption-text">TOUGHSwitch TS‑8‑PRO</p></div></p>
<p>Today I bit the bullet and decided to buy a five pack of <a href="https://www.ubnt.com/unifi/unifi-ap-ac-lite/">Ubiquiti UniFi AC Lite AP</a> and one <a href="https://www.ubnt.com/accessories/toughswitch/">Ubiquiti TOUGHSwitch TS‑8‑PRO</a>. I could have gone for the Pro or HD access points but for my use case this was overkill.</p>
<p>All <a href="https://www.ubnt.com/">Ubiquiti</a> products seem to be the industry GOTO product and we use them at Canonical sprints where we&#8217;ve never had a problem. I also purchased 305m spool of cat6 cable and a <a href="https://www.platinumtools.com/products/crimpers/ez-rj45-crimpers/ez-rjpro-hd-crimp-tool-100054c/">Platinum Tools EZ-RJPRO Crimp Tool</a> and connectors to make it easier to properly terminate the connections.</p>
<p><div id="attachment_45" style="width: 334px" class="wp-caption alignleft"><a href="https://www.ubnt.com/unifi/unifi-ap-ac-lite/"><img aria-describedby="caption-attachment-45" loading="lazy" class="wp-image-45" src="https://philroche.net/wp-content/uploads/2017/05/Selection_127.png" alt="UniFi AC Lite AP" width="324" height="404" srcset="https://philroche.net/wp-content/uploads/2017/05/Selection_127.png 532w, https://philroche.net/wp-content/uploads/2017/05/Selection_127-241x300.png 241w" sizes="(max-width: 324px) 100vw, 324px" /></a><p id="caption-attachment-45" class="wp-caption-text">UniFi AC Lite AP</p></div></p>
<p>All the access points are (POE) Powered Over Ethernet so will not require power points in the ceiling.</p>
<p>This setup does require using Ubiquiti Unifi controller software but thankfully there is a docker image which sets this up and which I can run on my <a href="http://www.freenas.org/">Freenas</a> box.</p>
<p>All this means I should achieve my goal highspeed wifi throughout the house and seamless handover between access points. It will also hopefully mean that I no longer require any ethernet over powerline adapters.</p>
<p>I plan on taking a few pictures of the setup as it progresses as well as performing speed tests.. watch this space.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
