<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>firewall &amp;mdash; Paul Sutton</title>
    <link>https://personaljournal.ca/paulsutton/tag:firewall</link>
    <description>Personal Blog</description>
    <pubDate>Tue, 05 May 2026 14:59:46 +0000</pubDate>
    <item>
      <title>Bash scripting 24 – firewalls</title>
      <link>https://personaljournal.ca/paulsutton/bash-scripting-24-firewalls</link>
      <description>&lt;![CDATA[Bash scripting 24 – firewalls&#xA;&#xA;I am still experimenting with gopher, however this got me thinking about system security, so I have installed.&#xA;&#xA;If you are not sure what you are doing with this, please consult the man page&#xA;&#xA;man ufw&#xA;&#xA;So this describes ufw as&#xA;&#xA;ufw - program for managing a netfilter firewall&#xA;As I am ssh&#39;d in to the pi, then the firewall needs to be enabled, however, first make sure that that port 22 (or which ever port you are using for ssh) is allowed.   I have to do this as being logged in via ssh, emabling the firewall could block ssh preventing access.&#xA;&#xA;sudo ufw allow 22&#xA;&#xA;Then check the status&#xA;&#xA;sudo ufw status&#xA;Status: active&#xA;&#xA;To                         Action      From&#xA;--                         ------      ----&#xA;22                         ALLOW       Anywhere                  &#xA;22 (v6)                  ALLOW       Anywhere (v6)             &#xA;&#xA;To confirm that port 22 is allowed,  then enable&#xA;&#xA;sudo ufw enable&#xA;&#xA;Links&#xA;&#xA;using UFW&#xA;Port Numbers&#xA;Wikipedia TCP&#xA;Wikipedia UDP&#xA;&#xA;Tags&#xA;&#xA;#Bash,#Bashscripting,#BashScripting#Security,#Firewall&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Bash scripting 24 – firewalls</p>

<p>I am still experimenting with gopher, however this got me thinking about system security, so I have installed.</p>

<p>If you are not sure what you are doing with this, please consult the man page</p>

<pre><code>man ufw
</code></pre>

<p>So this describes ufw as</p>

<pre><code>ufw - program for managing a netfilter firewall
</code></pre>

<p>As I am ssh&#39;d in to the pi, then the firewall needs to be enabled, however, first make sure that that port 22 (or which ever port you are using for ssh) is allowed.   I have to do this as being logged in via ssh, emabling the firewall could block ssh preventing access.</p>

<pre><code>sudo ufw allow 22
</code></pre>

<p>Then check the status</p>

<pre><code>sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere                  
22 (v6)                  ALLOW       Anywhere (v6)             
</code></pre>

<p>To confirm that port 22 is allowed,  then enable</p>

<pre><code>sudo ufw enable
</code></pre>

<p><strong>Links</strong></p>
<ul><li><a href="https://learnubuntu.com/ufw-commands/" rel="nofollow">using UFW</a></li>
<li><a href="https://www.newtechie.com/2014/07/list-of-common-tcpudp-port-numbers.html" rel="nofollow">Port Numbers</a></li>
<li><a href="https://en.wikipedia.org/wiki/Transmission_Control_Protocol" rel="nofollow">Wikipedia TCP</a></li>
<li><a href="https://en.wikipedia.org/wiki/User_Datagram_Protocol" rel="nofollow">Wikipedia UDP</a></li></ul>

<p><strong>Tags</strong></p>

<p><a href="/paulsutton/tag:Bash" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Bash</span></a>,<a href="/paulsutton/tag:Bashscripting" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Bashscripting</span></a>,<a href="/paulsutton/tag:BashScripting" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">BashScripting</span></a><a href="/paulsutton/tag:Security" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Security</span></a>,<a href="/paulsutton/tag:Firewall" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Firewall</span></a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/bash-scripting-24-firewalls</guid>
      <pubDate>Tue, 29 Apr 2025 06:00:00 +0000</pubDate>
    </item>
    <item>
      <title>CyberSecurity part 15</title>
      <link>https://personaljournal.ca/paulsutton/cybersecurity-part-15</link>
      <description>&lt;![CDATA[CyberSecurity part 15&#xA;&#xA;As this series is going to eventually get to looking at cybersecurity, it would be a good idea to learn about networking concepts.  This video seems good at explaining some of this.   In fact, it also covers firewalls, which I had planned for a later post.&#xA;&#xA;Networking basics (2020) &#xA;&#xA;I have also added links to details of common network ports and their associated services. &#xA;&#xA;What is: &#xA;&#xA;a switch&#xA;router&#xA;gateway&#xA;subnet&#xA;gateway&#xA;firewall &#xA;DMZ&#xA;&#xA;Links&#xA;&#xA;virtual machine login link &#xA;Common Network Ports&#xA;&#xA;Tags&#xA;&#xA;#CyberSecurity,#Networking,#Ports,#Switch,#Subnet,#IP,&#39;#Gateway,#Firewall,#DMZ,#Router,#Ports&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>CyberSecurity part 15</p>

<p>As this series is going to eventually get to looking at cybersecurity, it would be a good idea to learn about networking concepts.  This video seems good at explaining some of this.   In fact, it also covers firewalls, which I had planned for a later post.</p>
<ul><li><a href="https://www.youtube.com/watch?v=_IOZ8_cPgu8" rel="nofollow">Networking basics (2020)</a></li></ul>

<p>I have also added links to details of common network ports and their associated services.</p>

<p>What is:</p>
<ul><li>a switch</li>
<li>router</li>
<li>gateway</li>
<li>subnet</li>
<li>gateway</li>
<li>firewall</li>
<li>DMZ</li></ul>

<p><strong>Links</strong></p>
<ul><li><a href="https://vfsync.org/index.html" rel="nofollow">virtual machine login link</a></li>
<li><a href="https://www.stationx.net/common-ports-cheat-sheet/" rel="nofollow">Common Network Ports</a></li></ul>

<p><strong>Tags</strong></p>

<p><a href="/paulsutton/tag:CyberSecurity" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">CyberSecurity</span></a>,<a href="/paulsutton/tag:Networking" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Networking</span></a>,<a href="/paulsutton/tag:Ports" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Ports</span></a>,<a href="/paulsutton/tag:Switch" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Switch</span></a>,<a href="/paulsutton/tag:Subnet" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Subnet</span></a>,<a href="/paulsutton/tag:IP" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">IP</span></a>,&#39;<a href="/paulsutton/tag:Gateway" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Gateway</span></a>,<a href="/paulsutton/tag:Firewall" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Firewall</span></a>,<a href="/paulsutton/tag:DMZ" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">DMZ</span></a>,<a href="/paulsutton/tag:Router" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Router</span></a>,<a href="/paulsutton/tag:Ports" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Ports</span></a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/cybersecurity-part-15</guid>
      <pubDate>Mon, 16 May 2022 06:30:00 +0000</pubDate>
    </item>
    <item>
      <title>Website on pi</title>
      <link>https://personaljournal.ca/paulsutton/website-on-pi</link>
      <description>&lt;![CDATA[Website on pi&#xA;&#xA;img src=&#34;https://socialhub.activitypub.rocks/uploads/default/original/1X/6aac842b7ff5c58385a02f3a131c259281be88c8.png&#34; target=&#34;_blank&#34; &#xA;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xA;&#xA;I spent some time on last night, setting up a mini web server on m Raspberry pi. &#xA;&#xA;So running a http server on a Raspberry Pi. &#xA;&#xA;For this project I am just using the python3-test-server package, &#xA;&#xA;Install python3-test-server&#xA;Create a directory to hold some html files&#xA;Change to this directory &#xA;Create a very basic html file e.g index.html&#xA;run python3 -m http.server:7800 where 7800 is the port you want to use&#xA;&#xA;web server on pi&#xA;&#xA;In the browser go to ip:7800&#xA;&#xA;Website on pi&#xA;&#xA;What I have done here, however is &#xA;&#xA;Run the server on the pi, &#xA;Connected via ssh to create the site files and run the server&#xA;Edited the basic website on the pi via ssh, by running a text editor&#xA;To copy other files directly from my main PC to the Pi i used&#xA;&#xA;   scp file.jpg pi@ip:path e.g&#xA;     scp file.jpg pi@ip:/home/pi/html/&#xA;&#xA;I have, gone a little further than this:&#xA;&#xA;In order to share my free software video dvd (and other resources) with people I:-&#xA;&#xA;Uploaded files to the server&#xA;Created a web link to the iso file&#xA;Edited my router firewall so it would allow a connection to the pi&#xA;&#xA;I then shared the appropriate IP address with a friend via irc so he could download the ISO file, and it worked really well.&#xA;&#xA;REFERENCES&#xA;&#xA;Free Software Foundation&#xA;&#xA;TAGS&#xA;&#xA;#YearOfTheFediverse,#httpServer,#website,#html,#css,&#xA;#Python,#Firewall,#Networking,ProblemSolving,#Skills,#IT&#xA;&#xA;a rel=&#34;license&#34; href=&#34;http://creativecommons.org/licenses/by-sa/4.0/&#34;img alt=&#34;Creative Commons Licence&#34; style=&#34;border-width:0&#34; src=&#34;https://i.creativecommons.org/l/by-sa/4.0/88x31.png&#34; //abr /This work is licensed under a a rel=&#34;license&#34; href=&#34;http://creativecommons.org/licenses/by-sa/4.0/&#34;Creative Commons Attribution-ShareAlike 4.0 International License/a&#xA;&#xA;hr&#xD;&#xA;&#xD;&#xA;table&#xD;&#xA;thead&#xD;&#xA;trtda rel=&#34;me&#34; href=&#34;https://qoto.org/@zleap&#34;Mastodon/a/td&#xD;&#xA;tda href=&#34;https://wiki.ircnow.org/?n=Shelllabs.Intro&#34;ShellLabs/td&#xD;&#xA;tda href=&#34;https://joinmastodon.org/&#34;Join Mastodon/a/td/tr/thead/table&#xD;&#xA;center&#xD;&#xA;AI statement : b Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. /b&#xD;&#xA;/center&#xD;&#xA;&#xD;&#xA;a href=&#34;https://liberapay.com/PaulSutton/donate&#34;img alt=&#34;Donate using Liberapay&#34; src=&#34;https://liberapay.com/assets/widgets/donate.svg&#34;/a&#xD;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Website on pi</p>

<p><a href="https://torresjrjr.com/archive/2020-07-19-guide-to-the-fediverse" rel="nofollow"><img src="https://socialhub.activitypub.rocks/uploads/default/original/1X/6aac842b7ff5c58385a02f3a131c259281be88c8.png"></a></p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>

<p>I spent some time on last night, setting up a mini web server on m Raspberry pi.</p>

<p><strong>So running a http server on a Raspberry Pi</strong>.</p>

<p>For this project I am just using the python3-test-server package,</p>
<ol><li>Install python3-test-server</li>
<li>Create a directory to hold some html files</li>
<li>Change to this directory</li>
<li>Create a very basic html file e.g index.html</li>
<li>run python3 -m http.server:7800 where 7800 is the port you want to use</li></ol>

<p><img src="https://git.qoto.org/zleap/documents/-/raw/master/webserver.png" alt="web server on pi"></p>

<p>In the browser go to ip:7800</p>

<p><img src="https://git.qoto.org/zleap/documents/-/raw/master/websiteonpi.png" alt="Website on pi"></p>

<p>What I have done here, however is</p>
<ul><li>Run the server on the pi,</li>
<li>Connected via ssh to create the site files and run the server</li>
<li>Edited the basic website on the pi via ssh, by running a text editor</li>

<li><p>To copy other files directly from my main PC to the Pi i used</p>
<ul><li>scp file.jpg pi@ip:path e.g
<ul><li>scp file.jpg pi@ip:/home/pi/html/</li></ul></li></ul></li></ul>

<p>I have, gone a little further than this:</p>

<p>In order to share my free software video dvd (and other resources) with people I:-</p>
<ul><li>Uploaded files to the server</li>
<li>Created a web link to the iso file</li>
<li>Edited my router firewall so it would allow a connection to the pi</li></ul>

<p>I then shared the appropriate IP address with a friend via irc so he could download the ISO file, and it worked really well.</p>

<p><strong>REFERENCES</strong></p>
<ul><li><a href="https://www.fsf.org" rel="nofollow">Free Software Foundation</a></li></ul>

<p><strong>TAGS</strong></p>

<p><a href="/paulsutton/tag:YearOfTheFediverse" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">YearOfTheFediverse</span></a>,<a href="/paulsutton/tag:httpServer" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">httpServer</span></a>,<a href="/paulsutton/tag:website" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">website</span></a>,<a href="/paulsutton/tag:html" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">html</span></a>,<a href="/paulsutton/tag:css" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">css</span></a>,
<a href="/paulsutton/tag:Python" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Python</span></a>,<a href="/paulsutton/tag:Firewall" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Firewall</span></a>,<a href="/paulsutton/tag:Networking" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Networking</span></a>,ProblemSolving,<a href="/paulsutton/tag:Skills" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Skills</span></a>,<a href="/paulsutton/tag:IT" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">IT</span></a></p>

<p><a href="http://creativecommons.org/licenses/by-sa/4.0/" rel="nofollow"><img alt="Creative Commons Licence" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png"/></a><br/>This work is licensed under a <a href="http://creativecommons.org/licenses/by-sa/4.0/" rel="nofollow">Creative Commons Attribution-ShareAlike 4.0 International License</a></p>

<hr>

<p><table>
<thead>
<tr><td><a href="https://qoto.org/@zleap" rel="nofollow">Mastodon</a></td>
<td><a href="https://wiki.ircnow.org/?n=Shelllabs.Intro" rel="nofollow">ShellLabs</td>
<td><a href="https://joinmastodon.org/" rel="nofollow">Join Mastodon</a></td></tr></thead></table>

AI statement : <b> Consent is NOT granted to use the content of this blog for the purposes of AI training or similar activity.  Consent CANNOT be assumed, it has to be granted. </b>
</p>

<p><a href="https://liberapay.com/PaulSutton/donate" rel="nofollow"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></p>
]]></content:encoded>
      <guid>https://personaljournal.ca/paulsutton/website-on-pi</guid>
      <pubDate>Mon, 18 Jan 2021 07:00:00 +0000</pubDate>
    </item>
  </channel>
</rss>