<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Jemson's Blog</title>
    <description>A Blog For My Everyday</description>
    <link></link>
    <atom:link href="/feed.xml" rel="self" type="application/rss+xml" />
    <author>
      <name>Jemson</name>
      <email>andrew@jemson.org</email>
      <uri>https://blog.jemson.org</uri>
    </author>
    
      <item>
        <title>Teams PowerShell Reference Commands</title>
        <description>&lt;p&gt;Had to provide a customer with Teams PowerShell reference commands, so though why not post it here for later use. These make up some of the most common commands in User setup and management.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#Install Teams Modules in PowerShell (Only needs to be done once)
Install-Module -Name MicrosoftTeams

# Connect in PowerShell (Need to do each time you run powershell)
Connect-MicrosoftTeams
# This will then prompt for admin credentials to connect

# Enable User and Assign Phone Number / Voicemail
Set-CsUser -Identity &quot;user@email.com&quot; -LineURI tel:61234567890 -EnterpriseVoiceEnabled $true -HostedVoiceMail $true

# Set Routing Policy
Grant-CsOnlineVoiceRoutingPolicy -Identity &quot;user@email.com&quot; -PolicyName &quot;AU-CentralEast-International&quot;

# Set Dial Plan
Grant-CsTenantDialPlan -Identity &quot;user@email.com&quot; -PolicyName &quot;AU-NSW&quot;

# Get a list of enabled Users
Get-CSOnlineUser | Where { $_.EnterpriseVoiceEnabled } | Select-Object UserPrincipalName,DisplayName,LineURI

# Export a list of enabled Users and export to UserData.csv (For filtering in Excel for free numbers etc)
Get-CSOnlineUser | Where { $_.EnterpriseVoiceEnabled } | Select-Object UserPrincipalName,DisplayName,LineURI | Export-Csv -Path UserData.csv
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        <pubDate>Wed, 09 Mar 2022 00:00:00 +1100</pubDate>
        <link>//Teams-PowerShell-Reference-Commands</link>
        <link href="/Teams-PowerShell-Reference-Commands"/>
        <guid isPermaLink="true">/Teams-PowerShell-Reference-Commands</guid>
      </item>
    
      <item>
        <title>Docker and iptables</title>
        <description>&lt;p&gt;Something that came to bite me this week, was Docker’s ability to insert it’s own iptables rules completely bypassing firewall-cmd / ufw.&lt;/p&gt;

&lt;p&gt;On this particular server I had LAN/WAN interfaces directly assigned the the firewall policy configured in such a way that would allow HTTP/HTTPS traffic in on the public interface, but internally would accept connections on 8080/8081 for some other internal services. Not on Docker’s watch!!&lt;/p&gt;

&lt;p&gt;Docker added it’s own iptables rules around it’s bridge interface that meant it would also pass connections on 8080/8081 on the WAN side!
For mitigating this, (from Docker 20.10) there is apparently an &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--iptables=false&lt;/code&gt; attribute that can be passed to docker init to stop this behaviour, though I read mixed feedback on this potentially causing other container issues.&lt;/p&gt;

&lt;p&gt;For mine, I resolved by adding the specific listner IP into  the docker port binding. Eg: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;docker run -d -p 192.168.1.10:8080:8080&lt;/code&gt; to only listen on the internal side, which caused it to monitor it’s iptables rules accordingly.
One take away from this; Be specific.&lt;/p&gt;
</description>
        <pubDate>Mon, 07 Mar 2022 00:00:00 +1100</pubDate>
        <link>//Docker-and-iptables</link>
        <link href="/Docker-and-iptables"/>
        <guid isPermaLink="true">/Docker-and-iptables</guid>
      </item>
    
      <item>
        <title>Interactive Learning</title>
        <description>&lt;p&gt;Have come across a really fun interactive learning site called &lt;a href=&quot;https://www.tryhackme.com&quot;&gt;Try Hack Me&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;While not exactly new, (and just shy on 1 Million users at the time of writing) it is something I have only recently just found out about. After signing up a free account, and having a play for a couple of hours, I found it very immersive and educational and fronted up the money for a paid subscription!&lt;/p&gt;

&lt;p&gt;Hopefully over the coming months I will provide some blog entries about little nuggets I pick up here as I get time!&lt;/p&gt;
</description>
        <pubDate>Fri, 11 Feb 2022 00:00:00 +1100</pubDate>
        <link>//Interactive-Learning</link>
        <link href="/Interactive-Learning"/>
        <guid isPermaLink="true">/Interactive-Learning</guid>
      </item>
    
      <item>
        <title>Django ALLOWED_HOSTS Limitation</title>
        <description>&lt;p&gt;Ran into an issue today that took quite a long time to get to the bottom of.
That issue was that the ALLOWED_HOSTS parameter in Django doesn’t accept records containing and underscore (_).&lt;/p&gt;

&lt;p&gt;After some further reading found that the reason behind this is that _ isn’t a valid character in domain names, so is excluded from being used in ALLOWED_HOSTS.
In my case it was being used as part of a docker container name, so that nginx could source the django container by name/alias easily.&lt;/p&gt;

&lt;p&gt;Apparently you can modify the regex usage in Django to get around this, but that seemed like a bit of a cludge method to me, so I renamed the containers to use hyphen (-) instead of underscore (_).&lt;/p&gt;

&lt;p&gt;Figured this was worthy of note :)&lt;/p&gt;

</description>
        <pubDate>Tue, 18 Jan 2022 00:00:00 +1100</pubDate>
        <link>//Django-ALLOWED_HOSTS-Limitation</link>
        <link href="/Django-ALLOWED_HOSTS-Limitation"/>
        <guid isPermaLink="true">/Django-ALLOWED_HOSTS-Limitation</guid>
      </item>
    
      <item>
        <title>Linux SSH Port Forwarding</title>
        <description>&lt;p&gt;Until now I have been blessed with the ease of the PuTTY UI in Windows to do SSH port forwarding, so today had to look up how to do the forward from a linux terminal.&lt;/p&gt;

&lt;p&gt;Turns out it is super easy.
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ssh -p&amp;lt;SSH-PORT&amp;gt; &amp;lt;SSH-HOST&amp;gt; -L &amp;lt;LPORT&amp;gt;:&amp;lt;RHOST&amp;gt;:&amp;lt;RPORT&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Eg, To forward 8443 locally to 443 on 192.168.1.10:
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ssh -p2200 11.22.33.44 -L 8443:192.168.1.10:443&lt;/code&gt;&lt;/p&gt;
</description>
        <pubDate>Fri, 14 Jan 2022 00:00:00 +1100</pubDate>
        <link>//SSH-Port-Forwarding</link>
        <link href="/SSH-Port-Forwarding"/>
        <guid isPermaLink="true">/SSH-Port-Forwarding</guid>
      </item>
    
      <item>
        <title>Installing DotNet 3.5 Without DVD</title>
        <description>&lt;p&gt;This has stumped me a number of times and I have tried all sorts of things to get around the issue of installing dotNet 3.5 on Windows Server without having to mount the DVD.&lt;/p&gt;

&lt;p&gt;Finally today I found &lt;a href=&quot;https://sqldbastuff.com/2018/06/01/install-net-3-5-framework-on-windows-server-2012-or-2016-without-dvd/&quot;&gt;this post&lt;/a&gt; showing how to change local group policy to force the server to download the package from Windows Update.&lt;/p&gt;

&lt;p&gt;In short;&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Start the Local Group Policy Editor or Group Policy Management Console (WIN+R and type gpedit.msc).&lt;/li&gt;
  &lt;li&gt;Expand Computer Configuration Folder–&amp;gt; then click expand Administrative Templates Folder–&amp;gt; then select System.&lt;/li&gt;
  &lt;li&gt;Double click to open Specify settings for optional component installation and component repair Group Policy setting, and then select click Enabled.&lt;/li&gt;
  &lt;li&gt;Also click Enable for Contact Windows Update directly to download repair content instead of Windows Server Update Services (WSUS) checkbox.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now go to Add Roles and Features Wizard and select enabling checkbox .NET Framework 3.5 and get it installed successfully.&lt;/p&gt;
</description>
        <pubDate>Thu, 13 Jan 2022 00:00:00 +1100</pubDate>
        <link>//Installing-DotNet3.5-Without-DVD</link>
        <link href="/Installing-DotNet3.5-Without-DVD"/>
        <guid isPermaLink="true">/Installing-DotNet3.5-Without-DVD</guid>
      </item>
    
      <item>
        <title>Welcome to the Internet</title>
        <description>&lt;p&gt;2022, the year the blog returned!&lt;/p&gt;

&lt;p&gt;It’s been about 10 years since the last blog was lost forever, however many lessons have been learned this time around.&lt;/p&gt;

&lt;p&gt;Have decided to use Jekyll to publish instead of relying on any database, which also makes backing up or moving the site a breeze (It was also really easy to set up!).&lt;/p&gt;

&lt;p&gt;Decided to go this route after listening to a talk by Jack Rhysider from &lt;a href=&quot;https://darknetdiaries.com&quot;&gt;Darknet Diaries&lt;/a&gt; about blogging. &lt;em&gt;Great podcast if you haven’t listened to it!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I quite like this theme, but haven’t explored too many, so it may change but will see how it fares.&lt;/p&gt;

</description>
        <pubDate>Wed, 12 Jan 2022 00:00:00 +1100</pubDate>
        <link>//Welcome</link>
        <link href="/Welcome"/>
        <guid isPermaLink="true">/Welcome</guid>
      </item>
    
  </channel>
</rss>
