<?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>Tech Antidote</title>
	<atom:link href="https://techantidote.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://techantidote.com/</link>
	<description>‎ &#124; LINUX &#124; Tech &#124; Security &#124;</description>
	<lastBuildDate>Thu, 01 Jan 2026 07:16:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>

<image>
	<url>https://techantidote.com/wp-content/uploads/2016/02/cropped-google-plus-profile-picture-32x32.png</url>
	<title>Tech Antidote</title>
	<link>https://techantidote.com/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">106369530</site>	<item>
		<title>Wishing a Joyful New Year 2026 to My Readers #HappyNewYear2026</title>
		<link>https://techantidote.com/wishing-a-joyful-new-year-2026-to-my-readers-happynewyear2026/</link>
					<comments>https://techantidote.com/wishing-a-joyful-new-year-2026-to-my-readers-happynewyear2026/#respond</comments>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Thu, 01 Jan 2026 07:16:05 +0000</pubDate>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[cybersecurity]]></category>
		<category><![CDATA[happynewyear]]></category>
		<category><![CDATA[happynewyear2026]]></category>
		<category><![CDATA[personal]]></category>
		<guid isPermaLink="false">https://techantidote.com/?p=3857</guid>

					<description><![CDATA[<p>Happy new year to all my readers!!  Wishing you a happy, healthy and peaceful 2026.I hope this year your life is filled with joy, kindness, good health and abundance. Have a good one #Defenders! May the force be with you 🙂 Regards,ΞXΤЯΞМΞ</p>
<p>The post <a href="https://techantidote.com/wishing-a-joyful-new-year-2026-to-my-readers-happynewyear2026/">Wishing a Joyful New Year 2026 to My Readers #HappyNewYear2026</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>Happy new year to all my readers!! </strong> </p>



<p class="wp-block-paragraph">Wishing you a  happy, healthy and peaceful 2026.<br>I hope this year your life is filled with joy, kindness, good health and  abundance.</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1014" height="675" data-attachment-id="3858" data-permalink="https://techantidote.com/wishing-a-joyful-new-year-2026-to-my-readers-happynewyear2026/image-2/" data-orig-file="https://techantidote.com/wp-content/uploads/2026/01/image.png" data-orig-size="1014,675" data-comments-opened="1" data-image-title="image" data-image-description="" data-image-caption="" data-large-file="https://techantidote.com/wp-content/uploads/2026/01/image.png" src="https://techantidote.com/wp-content/uploads/2026/01/image.png" alt="" class="wp-image-3858" srcset="https://techantidote.com/wp-content/uploads/2026/01/image.png 1014w, https://techantidote.com/wp-content/uploads/2026/01/image-300x200.png 300w, https://techantidote.com/wp-content/uploads/2026/01/image-768x511.png 768w" sizes="(max-width: 1014px) 100vw, 1014px" /></figure>



<p class="wp-block-paragraph">Have a good one #Defenders! May the force be with you <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /><br><br>Regards,<br>ΞXΤЯΞМΞ</p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://techantidote.com/wishing-a-joyful-new-year-2026-to-my-readers-happynewyear2026/">Wishing a Joyful New Year 2026 to My Readers #HappyNewYear2026</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techantidote.com/wishing-a-joyful-new-year-2026-to-my-readers-happynewyear2026/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3857</post-id>	</item>
		<item>
		<title>Configure apache to log the real client IP instead of cloudflare IP in http access logs (WordPress)</title>
		<link>https://techantidote.com/configure-apache-to-log-the-real-client-ip-instead-of-cloudflare-ip-in-http-access-logs-wordpress/</link>
					<comments>https://techantidote.com/configure-apache-to-log-the-real-client-ip-instead-of-cloudflare-ip-in-http-access-logs-wordpress/#respond</comments>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Wed, 10 Jul 2024 23:01:07 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[access.log]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[cloudflare]]></category>
		<category><![CDATA[mod_cloudflare]]></category>
		<category><![CDATA[real client ip]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[X-Forwarded-For]]></category>
		<guid isPermaLink="false">https://techantidote.com/?p=3798</guid>

					<description><![CDATA[<p>If you are running a WordPress site and you have cloudflare setup, you may have noticed that the http access logs log the IP of cloudflare instead of the actual client IP. This is a guide to enable logging of the real client IP instead of the cloudflare IP in the apache2 logs. This was &#8230; <a href="https://techantidote.com/configure-apache-to-log-the-real-client-ip-instead-of-cloudflare-ip-in-http-access-logs-wordpress/" class="more-link">Continue reading <span class="screen-reader-text">Configure apache to log the real client IP instead of cloudflare IP in http access logs (WordPress)</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://techantidote.com/configure-apache-to-log-the-real-client-ip-instead-of-cloudflare-ip-in-http-access-logs-wordpress/">Configure apache to log the real client IP instead of cloudflare IP in http access logs (WordPress)</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">If you are running a WordPress site and you have cloudflare setup, you may have noticed that the http access logs log the IP of cloudflare instead of the actual client IP. This is a guide to enable logging of the real client IP instead of the cloudflare IP in the apache2 logs. This was tested on a Ubuntu 20.04 machine + apache2  and traffic is proxied from cloudflare. </p>



<p class="wp-block-paragraph">&#8211; <strong>Install Prerequisites:</strong></p>



<pre class="wp-block-preformatted">sudo apt-get install apache2-dev libtool git</pre>



<p class="wp-block-paragraph">Git clone the <strong>mod_clouflare</strong> repo from cloulflare:</p>



<pre class="wp-block-preformatted">cd ~/<br>git clone https://github.com/cloudflare/mod_cloudflare.git<br>cd mod_cloudflare</pre>



<p class="wp-block-paragraph">Use the Apache extension tool to convert the .c file into a module:</p>



<pre class="wp-block-preformatted">apxs -a -i -c mod_cloudflare.c</pre>



<p class="wp-block-paragraph"><strong>Restart Apache:</strong></p>



<pre class="wp-block-preformatted">sudo apachectl restart</pre>



<p class="wp-block-paragraph">Verify that the module is active:</p>



<pre class="wp-block-preformatted">apache2ctl -M|grep cloudflare</pre>



<p class="wp-block-paragraph">The output should show &#8220;<span style="color: #0000ff;"><strong>cloudflare_module (shared)</strong></span>&#8220;</p>



<p class="wp-block-paragraph">Now your apache logs should show the real client IP instead of the cloudflare IPs.</p>



<pre class="wp-block-preformatted">tail -f /var/log/apache2/access.log</pre>



<p class="wp-block-paragraph">-Below is screenshot of access log that shows the real client IP(right click and open image in new lab for high res image):</p>



<figure class="wp-block-image"><img decoding="async" width="1892" height="80" data-attachment-id="3802" data-permalink="https://techantidote.com/configure-apache-to-log-the-real-client-ip-instead-of-cloudflare-ip-in-http-access-logs-wordpress/access-logs/" data-orig-file="https://techantidote.com/wp-content/uploads/2024/07/access-logs.png" data-orig-size="1892,80" data-comments-opened="1" data-image-title="access-logs" data-image-description="" data-image-caption="" data-large-file="https://techantidote.com/wp-content/uploads/2024/07/access-logs-1024x43.png" src="https://techantidote.com/wp-content/uploads/2024/07/access-logs.png" alt="access.log screenshot" class="wp-image-3802" srcset="https://techantidote.com/wp-content/uploads/2024/07/access-logs.png 1892w, https://techantidote.com/wp-content/uploads/2024/07/access-logs-300x13.png 300w, https://techantidote.com/wp-content/uploads/2024/07/access-logs-1024x43.png 1024w, https://techantidote.com/wp-content/uploads/2024/07/access-logs-768x32.png 768w, https://techantidote.com/wp-content/uploads/2024/07/access-logs-1536x65.png 1536w" sizes="(max-width: 1892px) 100vw, 1892px" /></figure>



<p class="wp-block-paragraph"><strong>Sources/Credits/References:</strong></p>



<p class="wp-block-paragraph"><a href="https://developers.cloudflare.com/support/troubleshooting/restoring-visitor-ips/restoring-original-visitor-ips/">Cloudflare</a><br><a href="https://www.youtube.com/watch?v=70v8zfQpu_I">Noirth Security</a></p>
<p>The post <a href="https://techantidote.com/configure-apache-to-log-the-real-client-ip-instead-of-cloudflare-ip-in-http-access-logs-wordpress/">Configure apache to log the real client IP instead of cloudflare IP in http access logs (WordPress)</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techantidote.com/configure-apache-to-log-the-real-client-ip-instead-of-cloudflare-ip-in-http-access-logs-wordpress/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3798</post-id>	</item>
		<item>
		<title>How to search for IOCs on a Linux machine using Loki IOC and Yara scanner</title>
		<link>https://techantidote.com/loki-apt-scanner/</link>
					<comments>https://techantidote.com/loki-apt-scanner/#respond</comments>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Mon, 08 Jul 2024 14:09:05 +0000</pubDate>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[apt scanner]]></category>
		<category><![CDATA[dfir]]></category>
		<category><![CDATA[find iocs linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[loki]]></category>
		<category><![CDATA[yara]]></category>
		<category><![CDATA[yara rules]]></category>
		<guid isPermaLink="false">https://techantidote.com/?p=3699</guid>

					<description><![CDATA[<p>This is a quick guide to running Loki APT Scanner to check for IOCs on a Linux machine. Debian/Ubuntu: &#8211; Run the below commands to setup Loki: sudo su - apt-get install libssl-dev -y apt-get install python3.8-venv -y git clone https://github.com/Neo23x0/Loki.git cd Loki python3 -m venv . source bin/activate pip install colorama yara-python psutil rfc5424-logging-handler &#8230; <a href="https://techantidote.com/loki-apt-scanner/" class="more-link">Continue reading <span class="screen-reader-text">How to search for IOCs on a Linux machine using Loki IOC and Yara scanner</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://techantidote.com/loki-apt-scanner/">How to search for IOCs on a Linux machine using Loki IOC and Yara scanner</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This is a quick guide to running Loki APT Scanner to check for IOCs on a Linux machine.</p>
<p><strong>Debian/Ubuntu:</strong></p>
<p>&#8211; Run the below commands to setup Loki:</p>
<pre>sudo su -
apt-get install libssl-dev -y
apt-get install python3.8-venv -y
git clone https://github.com/Neo23x0/Loki.git
cd Loki
python3 -m venv .
source bin/activate
pip install colorama yara-python psutil rfc5424-logging-handler netaddr
python3 loki-upgrader.py
</pre>
<p><img decoding="async" data-attachment-id="3700" data-permalink="https://techantidote.com/loki-apt-scanner/loki/" data-orig-file="https://techantidote.com/wp-content/uploads/2023/11/loki.png" data-orig-size="1260,634" data-comments-opened="1" data-image-title="loki" data-image-description="" data-image-caption="" data-large-file="https://techantidote.com/wp-content/uploads/2023/11/loki-1024x515.png" class="alignnone size-large wp-image-3700" src="https://techantidote.com/wp-content/uploads/2023/11/loki-1024x515.png" alt="" width="640" height="322" srcset="https://techantidote.com/wp-content/uploads/2023/11/loki-1024x515.png 1024w, https://techantidote.com/wp-content/uploads/2023/11/loki-300x151.png 300w, https://techantidote.com/wp-content/uploads/2023/11/loki-768x386.png 768w, https://techantidote.com/wp-content/uploads/2023/11/loki.png 1260w" sizes="(max-width: 640px) 100vw, 640px" /></p>
<p>&#8211; Run Loki Scanner as root to check for IOCs, you the below command:</p>
<pre><strong> python3 loki.py</strong>
</pre>
<p><img loading="lazy" decoding="async" data-attachment-id="3795" data-permalink="https://techantidote.com/loki-apt-scanner/loki-scanner-2/" data-orig-file="https://techantidote.com/wp-content/uploads/2024/07/loki-scanner-e1720472432746.png" data-orig-size="741,502" data-comments-opened="1" data-image-title="loki-scanner" data-image-description="" data-image-caption="" data-large-file="https://techantidote.com/wp-content/uploads/2024/07/loki-scanner-1024x389.png" class="alignnone wp-image-3795 size-full" src="https://techantidote.com/wp-content/uploads/2024/07/loki-scanner-e1720472432746.png" alt="" width="741" height="502" srcset="https://techantidote.com/wp-content/uploads/2024/07/loki-scanner-e1720472432746.png 741w, https://techantidote.com/wp-content/uploads/2024/07/loki-scanner-e1720472432746-300x203.png 300w" sizes="auto, (max-width: 741px) 100vw, 741px" /></p>
<p>&nbsp;</p>
<p>&#8211; You can also search for IOCs in a particular directory using <strong>-p</strong> flag . For example:</p>
<pre><strong>python3 loki.py -p /var/log/apache2/</strong></pre>
<p>&nbsp;</p>
<p><strong>RHEL/CentOS systems:<br />
</strong><br />
On CentOS based system, you can run the below to use find IOCs using APT:</p>
<pre>sudo su -
yum install python3 python3-pip python3-devel openssl openssl-devel -y
pip install colorama yara-python psutil rfc5424-logging-handler netaddr
git clone https://github.com/Neo23x0/Loki.git
cd Loki
python3 loki-upgrader.py
python3 loki.py</pre>
<p><strong>Credits/Sources/References:</strong><br />
<strong><a href="https://github.com/Neo23x0/Loki">Neo23x0</a></strong></p>
<p><strong>Hope this helps! Happy Hunting Protectors! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></strong></p>
<p><strong>ΞXΤЯ3МΞ</strong></p>
<p>The post <a href="https://techantidote.com/loki-apt-scanner/">How to search for IOCs on a Linux machine using Loki IOC and Yara scanner</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techantidote.com/loki-apt-scanner/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3699</post-id>	</item>
		<item>
		<title>DFIR &#8211; Analyze Windows Event Logs (evtx) from a Linux machine using sigma rules, chainsaw and evtx dump</title>
		<link>https://techantidote.com/dfir-analyze-windows-event-logs-evtx-from-a-linux-machine-using-sigma-rules-chainsaw-and-evtx-dump/</link>
					<comments>https://techantidote.com/dfir-analyze-windows-event-logs-evtx-from-a-linux-machine-using-sigma-rules-chainsaw-and-evtx-dump/#respond</comments>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Mon, 08 Jul 2024 00:18:57 +0000</pubDate>
				<category><![CDATA[Digital Forensics]]></category>
		<category><![CDATA[analyze windows event logs from linux]]></category>
		<category><![CDATA[dfir]]></category>
		<category><![CDATA[evtx]]></category>
		<category><![CDATA[forensics]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">https://techantidote.com/?p=3760</guid>

					<description><![CDATA[<p>At work, I had a task to perform a quick compromise assessment for a hacked Windows server and I got a bunch of etvx files from the suspected host for analysis. I run Linux Mint + i3-gaps and its much easier and productive performing forensics from a Linux machine than Windows in my honest opinion. &#8230; <a href="https://techantidote.com/dfir-analyze-windows-event-logs-evtx-from-a-linux-machine-using-sigma-rules-chainsaw-and-evtx-dump/" class="more-link">Continue reading <span class="screen-reader-text">DFIR &#8211; Analyze Windows Event Logs (evtx) from a Linux machine using sigma rules, chainsaw and evtx dump</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://techantidote.com/dfir-analyze-windows-event-logs-evtx-from-a-linux-machine-using-sigma-rules-chainsaw-and-evtx-dump/">DFIR &#8211; Analyze Windows Event Logs (evtx) from a Linux machine using sigma rules, chainsaw and evtx dump</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>At work, I had a task to perform a quick compromise assessment for a hacked Windows server and I got a bunch of etvx files from the suspected host for analysis. I run Linux Mint + i3-gaps and its much easier and productive performing forensics from a Linux machine than Windows in my honest opinion. This post is meant for Linux users who want to perform Digital Forensics to find IOCs from Windows artifacts such as event logs / evtx files. Here my setup for forensics analsys for windows from a Linux perspective and the tools that I use.</p>
<p>Here are some tools that will come handy:</p>
<pre class="prismjs line-numbers language-plaintext"><code class="language-plaintext">apt update &amp;&amp; apt install git vim tar jq libxml2-utils source-highlight -y</code></pre>
<h3><strong>Sigma Rules:</strong></h3>
<p>Get the latest sigma rules:</p>
<pre class="prismjs line-numbers language-plaintext"><code class="language-plaintext">cd ~/
git clone https://github.com/SigmaHQ/sigma
git clone https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES.git</code></pre>
<h3>Chainsaw:</h3>
<p>&#8211; Install chainsaw:</p>
<pre class="prismjs line-numbers language-plaintext"><code class="language-plaintext">wget https://github.com/WithSecureLabs/chainsaw/releases/download/v2.9.1-2/chainsaw_x86_64-unknown-linux-gnu.tar.gz -O ~/chainsaw.tar.gz
tar zxvf ~/chainsaw.tar.gz
chmod +x ~/chainsaw/chainsaw</code></pre>
<p><code class="language-plaintext"><strong>Example:</strong> Assume that you have a bunch of evtx files that you want to analyze and you have it in a directory "~/EVTX-ATTACK-SAMPLES/", you can run chainsaw against the directory where the evtx files are stored with the below command: </code></p>
<pre class="prismjs line-numbers language-plaintext"><code class="language-plaintext">./chainsaw/chainsaw hunt ~/EVTX-ATTACK-SAMPLES/ -s ~/sigma/ --mapping ~/chainsaw/mappings/sigma-event-logs-all.yml -r ~/sigma/rules</code></pre>
<p>&#8211; The above will output the findings in stdout.</p>
<p><img loading="lazy" decoding="async" data-attachment-id="3765" data-permalink="https://techantidote.com/dfir-analyze-windows-event-logs-evtx-from-a-linux-machine-using-sigma-rules-chainsaw-and-evtx-dump/chainsaw/" data-orig-file="https://techantidote.com/wp-content/uploads/2024/07/chainsaw.png" data-orig-size="951,304" data-comments-opened="1" data-image-title="chainsaw" data-image-description="&lt;p&gt;chainsaw&lt;/p&gt;
" data-image-caption="" data-large-file="https://techantidote.com/wp-content/uploads/2024/07/chainsaw.png" class="alignnone size-full wp-image-3765" src="https://techantidote.com/wp-content/uploads/2024/07/chainsaw.png" alt="" width="951" height="304" srcset="https://techantidote.com/wp-content/uploads/2024/07/chainsaw.png 951w, https://techantidote.com/wp-content/uploads/2024/07/chainsaw-300x96.png 300w, https://techantidote.com/wp-content/uploads/2024/07/chainsaw-768x246.png 768w" sizes="auto, (max-width: 951px) 100vw, 951px" /></p>
<p>Now, let say you want to output these in <strong>csv</strong> for reporting or further analysis, you can run the below:<code class="language-plaintext"></code></p>
<pre class="prismjs line-numbers language-plaintext"><code class="language-plaintext">./chainsaw/chainsaw hunt ~/EVTX-ATTACK-SAMPLES/ -s ~/sigma/ --mapping ~/chainsaw/mappings/sigma-event-logs-all.yml -r ~/sigma/rules/ <strong>--csv </strong>--output csv-outputs</code></pre>
<p><span style="white-space: pre-wrap;">Alternatively, chainsaw also has the option to output in <strong>json</strong> file. This comes handy if you want to injest into a SIEM tool like Wazuh/Opensearch/ES/Spunk.</span></p>
<pre class="prismjs line-numbers language-plaintext"><code class="language-plaintext">/chainsaw/chainsaw hunt ~/EVTX-ATTACK-SAMPLES/ -s ~/sigma/ --mapping ~/chainsaw/mappings/sigma-event-logs-all.yml -r ~/sigma/rules/ <strong>--json --output json-output</strong></code></pre>
<p><strong>Chainsaw filters and advanced searching:</strong></p>
<p>&#8211; Chainsaw has options to search for specific event ids. For example, to search for Login Failures (Windows Event ID = 4625), you use the below command:</p>
<pre class="lx ly lz ma mb pk nd pl bo pm ba bj"><span id="d554" class="pn nr fp nd b bf po pp l pq pr" data-selectable-paragraph="">./chainsaw search -t <span class="hljs-string">'<strong>Event.System.EventID: =4625</strong>'</span> windows-log.evtx
</span></pre>
<p>&#8211; To search for specific strings such as to search for lssas dumps:</p>
<pre class="lx ly lz ma mb pk nd pl bo pm ba bj"><span id="fb04" class="pn nr fp nd b bf po pp l pq pr" data-selectable-paragraph="">./chainsaw search -e <span class="hljs-string">"lsass"</span> -i windows-log.evtx</span><span id="fb04" class="pn nr fp nd b bf po pp l pq pr" data-selectable-paragraph="">
</span></pre>
<p>&#8211; You can also search an entire directory of evtx files as well:</p>
<pre class="lx ly lz ma mb pk nd pl bo pm ba bj"><span id="fb04" class="pn nr fp nd b bf po pp l pq pr" data-selectable-paragraph="">./chainsaw search -e "lsass" -i <code class="language-plaintext"> ~/EVTX-ATTACK-SAMPLES/</code></span></pre>
<p>&#8211; To search for events between two timeframes:</p>
<pre class="lx ly lz ma mb pk nd pl bo pm ba bj"><span id="1dd1" class="pn nr fp nd b bf po pp l pq pr" data-selectable-paragraph=""><span class="hljs-string"><code class="language-plaintext">./chainsaw/chainsaw hunt ~/EVTX-ATTACK-SAMPLES/ -s ~/sigma/ --mapping ~/chainsaw/mappings/sigma-event-logs-all.yml -r ~/sigma/rules/ </code><strong>--from "2021-11-01T07:01:00" --to "2022-01-01T07:01:00"</strong></span></span></pre>
<p>&#8211; Below is screenshot for reference. (Right click image and open in new tab for better visual)</p>
<p><img loading="lazy" decoding="async" data-attachment-id="3767" data-permalink="https://techantidote.com/dfir-analyze-windows-event-logs-evtx-from-a-linux-machine-using-sigma-rules-chainsaw-and-evtx-dump/chainsaw-ouput/" data-orig-file="https://techantidote.com/wp-content/uploads/2024/07/chainsaw-ouput.png" data-orig-size="1555,744" data-comments-opened="1" data-image-title="chainsaw-ouput" data-image-description="" data-image-caption="" data-large-file="https://techantidote.com/wp-content/uploads/2024/07/chainsaw-ouput-1024x490.png" class="alignnone wp-image-3767 size-large" src="https://techantidote.com/wp-content/uploads/2024/07/chainsaw-ouput-1024x490.png" alt="" width="474" height="227" srcset="https://techantidote.com/wp-content/uploads/2024/07/chainsaw-ouput-1024x490.png 1024w, https://techantidote.com/wp-content/uploads/2024/07/chainsaw-ouput-300x144.png 300w, https://techantidote.com/wp-content/uploads/2024/07/chainsaw-ouput-768x367.png 768w, https://techantidote.com/wp-content/uploads/2024/07/chainsaw-ouput-1536x735.png 1536w, https://techantidote.com/wp-content/uploads/2024/07/chainsaw-ouput.png 1555w" sizes="auto, (max-width: 474px) 100vw, 474px" /></p>
<h3><strong>Evtx Dump:</strong></h3>
<p>If you like to dump all the events in a Windows event file for further analysis, there is an awesome opensource tool that allows you to just do that.</p>
<pre class="prismjs line-numbers language-plaintext"><code class="language-plaintext">wget https://github.com/omerbenamram/evtx/releases/download/v0.8.2/evtx_dump-v0.8.2-x86_64-unknown-linux-gnu -O ~/evtx_dump
chmod +x ~/evtx_dump</code></pre>
<p>&#8211;  To use the dump (Events will be separated with string “Event &lt;count&gt;&#8221; in the output file). This is handy when using vim/less by searching for &#8220;^Event &#8221; and then using &#8220;n&#8221; to go the next event.</p>
<div class="code-toolbar">
<pre class="prismjs line-numbers language-plaintext"><code class="language-plaintext">./evtx_dump-v0.8.2-x86_64-unknown-linux-gnu \
EVTX-ATTACK-SAMPLES/Discovery/4799_remote_local_groups_enumeration.evtx <strong>-f</strong> 4799_remote_local_groups_enumeration.<strong>parsed.xml</strong></code></pre>
<p><code class="language-plaintext"><br />
- Another method is to print to stdout and redirect to file:</code></p>
</div>
<pre class="prismjs line-numbers language-plaintext"><code class="language-plaintext">./evtx_dump-v0.8.2-x86_64-unknown-linux-gnu \
EVTX-ATTACK-SAMPLES/Discovery/4799_remote_local_groups_enumeration.evtx <strong>&gt;</strong> 4799_remote_local_groups_enumeration.<strong>parsed.xml</strong></code></pre>
<ul>
<li>To generate the dump <span style="color: #ff0000;"><strong>without the event separators</strong></span> in xml format:</li>
</ul>
<div class="code-toolbar">
<pre class="prismjs line-numbers language-plaintext"><code class="language-plaintext">./evtx_dump-v0.8.2-x86_64-unknown-linux-gnu \
<span style="color: #ff0000;"><strong>--dont-show-record-number</strong></span> \
EVTX-ATTACK-SAMPLES/Discovery/<strong>4799_remote_local_groups_enumeration.evtx  -f</strong> <strong>4799_remote_local_groups_enumeration.parsed.xml</strong></code></pre>
</div>
<div class="toolbar">
<div class="toolbar-item">&#8211; With this xml format, you can open this inside <strong>vim</strong> or use <strong>source-highlight</strong> to make it more readable.</div>
</div>
<div class="code-toolbar">
<pre class="prismjs line-numbers language-plaintext"><code class="language-plaintext"><strong>cat 4799_remote_local_groups_enumeration.parsed.xml | xmllint --format - | source-highlight -s xml -f esc | less -R</strong></code></pre>
</div>
<ul>
<li>To generate in json format:</li>
</ul>
<div class="code-toolbar">
<pre class="prismjs line-numbers language-plaintext"><code class="language-plaintext">./evtx_dump-v0.8.2-x86_64-unknown-linux-gnu \
EVTX-ATTACK-SAMPLES/Discovery/4799_remote_local_groups_enumeration.evtx <strong>-o json</strong> <strong>-f</strong> 4799_remote_local_groups_enumeration.<strong>parsed</strong>.<strong>json</strong>

./evtx_dump-v0.8.2-x86_64-unknown-linux-gnu \
<strong>--dont-show-record-number</strong> \
EVTX-ATTACK-SAMPLES/Discovery/4799_remote_local_groups_enumeration.evtx <strong>-o json -f </strong>4799_remote_local_groups_enumeration.<strong>parsed.json</strong></code></pre>
<p><code class="language-plaintext">- For <strong>jsonl</strong> format, you the below:</code></p>
<pre class="prismjs line-numbers language-plaintext"><code class="language-plaintext">./evtx_dump-v0.8.2-x86_64-unknown-linux-gnu \
EVTX-ATTACK-SAMPLES/Discovery/4799_remote_local_groups_enumeration.evtx <strong>-o jsonl -f</strong> 4799_remote_local_groups_enumeration.parsed.<strong>json</strong>
</code></pre>
<ul>
<li>Here is CLI usage:</li>
</ul>
<div class="code-toolbar">
<pre class="prismjs line-numbers language-plaintext"><code class="language-plaintext"><strong>./evtx_dump-v0.8.2-x86_64-unknown-linux-gnu -h</strong></code></pre>
</div>
</div>
<p><strong>Credits/References:</strong></p>
<p><a href="https://github.com/WithSecureLabs/chainsaw">Chainsaw github</a><br />
<a href="https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES">EVTX-ATTACK-SAMPLES</a><br />
<a href="https://medium.com/@izzyboop/grab-your-chainsaw-were-going-hunting-50a5c82cef5d">izzyboop</a></p>
<p>Hope this helps. <strong>Happy Hunting Defenders! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></strong></p>
<p>ΞXΤЯ3МΞ</p>
<p>The post <a href="https://techantidote.com/dfir-analyze-windows-event-logs-evtx-from-a-linux-machine-using-sigma-rules-chainsaw-and-evtx-dump/">DFIR &#8211; Analyze Windows Event Logs (evtx) from a Linux machine using sigma rules, chainsaw and evtx dump</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techantidote.com/dfir-analyze-windows-event-logs-evtx-from-a-linux-machine-using-sigma-rules-chainsaw-and-evtx-dump/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3760</post-id>	</item>
		<item>
		<title>#HappyNewYear2024</title>
		<link>https://techantidote.com/happynewyear2024/</link>
					<comments>https://techantidote.com/happynewyear2024/#respond</comments>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Mon, 01 Jan 2024 19:07:26 +0000</pubDate>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[#HappyNewYear2024]]></category>
		<guid isPermaLink="false">https://techantidote.com/?p=3713</guid>

					<description><![CDATA[<p>Happy new Year to all my readers! God Bless! Hope you have a great one! Cheers! 🙂</p>
<p>The post <a href="https://techantidote.com/happynewyear2024/">#HappyNewYear2024</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Happy new Year to all my readers! God Bless!<br />
Hope you have a great one! Cheers! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>The post <a href="https://techantidote.com/happynewyear2024/">#HappyNewYear2024</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techantidote.com/happynewyear2024/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3713</post-id>	</item>
		<item>
		<title>Increase OS Disk Size of an Azure Linux VM</title>
		<link>https://techantidote.com/increase-os-disk-size-of-an-azure-linux-vm/</link>
					<comments>https://techantidote.com/increase-os-disk-size-of-an-azure-linux-vm/#respond</comments>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Wed, 06 Dec 2023 21:35:00 +0000</pubDate>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[Linux / Ubuntu]]></category>
		<category><![CDATA[azure cli]]></category>
		<category><![CDATA[Changes to the disk size can be made only when the disk is unattached or the managing virtual machine(s) are deallocated.]]></category>
		<category><![CDATA[resize os disk]]></category>
		<guid isPermaLink="false">https://techantidote.com/?p=3704</guid>

					<description><![CDATA[<p>If you try to expand the disk without stopping/de-allocating the VM, depending on disk config it may not allow your to change the size and a banner with message &#8220;Changes to the disk size can be made only when the disk is unattached or the managing virtual machine(s) are deallocated.&#8221; would be displayed. To increase &#8230; <a href="https://techantidote.com/increase-os-disk-size-of-an-azure-linux-vm/" class="more-link">Continue reading <span class="screen-reader-text">Increase OS Disk Size of an Azure Linux VM</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://techantidote.com/increase-os-disk-size-of-an-azure-linux-vm/">Increase OS Disk Size of an Azure Linux VM</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>If you try to expand the disk without stopping/de-allocating the VM, depending on disk config it may not allow your to change the size and a banner with message &#8220;<em>Changes to the disk size can be made only when the disk is unattached or the managing virtual machine(s) are deallocated.</em>&#8221; would be displayed. To increase the disk size of a Linux VM, you can perform the following:</p>
<p>In my environment, the VM OS disk size was smaller than 4TB and could not be resized using the online method that could be done without downtime(it requires some special configuration which I didnt really get deep into). This method will involve shutting down the VM, de-allocating the VM, increasing the disk and then bringing the disk back online. So, there would be some downtime.<br />
Another thing:</p>
<p><strong>Note</strong>: Replace text in blue with your environment specific values.</p>
<p><strong>1. Stop the VM:</strong></p>
<p>az vm stop &#8211;resource-group <span style="color: #0000ff;"><strong>Resource-Group-Name</strong></span> &#8211;name <span style="color: #0000ff;"><strong>VM-NAME</strong></span> &#8211;subscription <strong><span style="color: #0000ff;">SUBSCRIPTION-ID</span></p>
<p></strong>2. <strong>De-allocate the VM:</strong> (This may take a few minutes)</p>
<p>az vm deallocate &#8211;resource-group <span style="color: #0000ff;"><strong>Resource-Group-Name</strong></span> &#8211;name <span style="color: #0000ff;"><strong>VM-NAME</strong></span> &#8211;subscription <strong><span style="color: #0000ff;">SUBSCRIPTION-ID</span></p>
<p>3. Increase the Disk (from the UI):</strong></p>
<p>-Navigate to the VM in Azure. Click on &#8220;Disks&#8221;</p>
<p>&nbsp;</p>
<p><img loading="lazy" decoding="async" data-attachment-id="3705" data-permalink="https://techantidote.com/increase-os-disk-size-of-an-azure-linux-vm/1-az-disks/" data-orig-file="https://techantidote.com/wp-content/uploads/2023/12/1-az-disks.png" data-orig-size="226,475" data-comments-opened="1" data-image-title="1-az-disks" data-image-description="&lt;p&gt;Navigate to the Azure VM and click on &amp;#8220;Disks&amp;#8221;&lt;/p&gt;
" data-image-caption="" data-large-file="https://techantidote.com/wp-content/uploads/2023/12/1-az-disks.png" class="alignnone size-full wp-image-3705" src="https://techantidote.com/wp-content/uploads/2023/12/1-az-disks.png" alt="" width="226" height="475" srcset="https://techantidote.com/wp-content/uploads/2023/12/1-az-disks.png 226w, https://techantidote.com/wp-content/uploads/2023/12/1-az-disks-143x300.png 143w" sizes="auto, (max-width: 226px) 100vw, 226px" /></p>
<p>-Select the disk that you need to resize.</p>
<p>&nbsp;</p>
<p><img loading="lazy" decoding="async" data-attachment-id="3706" data-permalink="https://techantidote.com/increase-os-disk-size-of-an-azure-linux-vm/2-disk/" data-orig-file="https://techantidote.com/wp-content/uploads/2023/12/2-disk.png" data-orig-size="788,191" data-comments-opened="1" data-image-title="2-disk" data-image-description="&lt;p&gt;Click on the OS Disk to be resized.&lt;/p&gt;
" data-image-caption="" data-large-file="https://techantidote.com/wp-content/uploads/2023/12/2-disk.png" class="alignnone size-full wp-image-3706" src="https://techantidote.com/wp-content/uploads/2023/12/2-disk.png" alt="" width="788" height="191" srcset="https://techantidote.com/wp-content/uploads/2023/12/2-disk.png 788w, https://techantidote.com/wp-content/uploads/2023/12/2-disk-300x73.png 300w, https://techantidote.com/wp-content/uploads/2023/12/2-disk-768x186.png 768w" sizes="auto, (max-width: 788px) 100vw, 788px" /></p>
<p>Click on &#8220;Size + performance&#8221; and select the disk size to which you want to increase to and then click on &#8220;Save&#8221;<br />
<img loading="lazy" decoding="async" data-attachment-id="3707" data-permalink="https://techantidote.com/increase-os-disk-size-of-an-azure-linux-vm/3-select-disk-size/" data-orig-file="https://techantidote.com/wp-content/uploads/2023/12/3-select-disk-size.png" data-orig-size="1034,708" data-comments-opened="1" data-image-title="3-select-disk-size" data-image-description="&lt;p&gt;Click on &amp;#8220;Size + Performance&amp;#8221; and then resize the disk and save&lt;/p&gt;
" data-image-caption="" data-large-file="https://techantidote.com/wp-content/uploads/2023/12/3-select-disk-size-1024x701.png" class="alignnone size-large wp-image-3707" src="https://techantidote.com/wp-content/uploads/2023/12/3-select-disk-size-1024x701.png" alt="" width="640" height="438" srcset="https://techantidote.com/wp-content/uploads/2023/12/3-select-disk-size-1024x701.png 1024w, https://techantidote.com/wp-content/uploads/2023/12/3-select-disk-size-300x205.png 300w, https://techantidote.com/wp-content/uploads/2023/12/3-select-disk-size-768x526.png 768w, https://techantidote.com/wp-content/uploads/2023/12/3-select-disk-size.png 1034w" sizes="auto, (max-width: 640px) 100vw, 640px" /></p>
<p><strong>4. Start the VM:</strong></p>
<p>az vm start &#8211;resource-group <span style="color: #0000ff;"><strong>Resource-Group-Name</strong></span> &#8211;name <span style="color: #0000ff;"><strong>VM-NAME</strong></span> &#8211;subscription <span style="color: #0000ff;"><strong>SUBSCRIPTION-ID</strong></span></p>
<p>My Azure VM was based on Ubuntu 20.04.x and did not need additional changes in the OS. After the VM booted backup, it did automatically expand to the new allocated size.</p>
<p><strong>Some of my thoughts on Azure Naming and resizing: </strong><br />
For some wierd reason, Azure does not make things easy for resizing disks. Ideally, you should be able to shutdown the VM and increase the disk, BUT Azure needs you to de-allocate the VM before you can make any changes to the disk. Another strange thing Azure decided to do is to label &#8220;de-allocate VM&#8221; instead of some sane label as at first it sound as if going to delete the VM and all its data when when in reality it does not.</p>
<p><strong>Sources/References:</strong><br />
https://learn.microsoft.com/en-us/azure/virtual-machines/linux/expand-disks?tabs=ubuntu</p>
<p>If you have any queries/feedback regarding this, feel free to leave a comment below and will get back to you as soon as I can.</p>
<p>The post <a href="https://techantidote.com/increase-os-disk-size-of-an-azure-linux-vm/">Increase OS Disk Size of an Azure Linux VM</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techantidote.com/increase-os-disk-size-of-an-azure-linux-vm/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3704</post-id>	</item>
		<item>
		<title>Password protect file using 7z in Linux from the terminal</title>
		<link>https://techantidote.com/password-protect-file-using-7z-in-linux-from-the-terminal/</link>
					<comments>https://techantidote.com/password-protect-file-using-7z-in-linux-from-the-terminal/#respond</comments>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Tue, 31 Oct 2023 17:02:23 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[7z]]></category>
		<category><![CDATA[7zip]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[password protect]]></category>
		<category><![CDATA[zip]]></category>
		<guid isPermaLink="false">https://techantidote.com/?p=3696</guid>

					<description><![CDATA[<p>This is a short post on how to password protect a file using 7z in Linux from the terminal. Below is the sample command that encrypts file &#8220;file.txt&#8221; with password (Replace PASSWORD with your pass) and saves to encrypted zip file Protected.zip 7z a Protected.zip -pPASSWORD file.txt Credits/References: Stackoverflow</p>
<p>The post <a href="https://techantidote.com/password-protect-file-using-7z-in-linux-from-the-terminal/">Password protect file using 7z in Linux from the terminal</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This is a short post on how to password protect a file using 7z in Linux from the terminal.</p>
<p>Below is the sample command that encrypts file &#8220;file.txt&#8221; with password (Replace PASSWORD with your pass) and saves to encrypted zip file Protected.zip</p>
<p>7z a Protected.zip -p<strong>PASSWORD</strong> file.txt</p>
<p><strong>Credits/References:</strong></p>
<p><a href="https://stackoverflow.com/questions/32448318/7-zip-command-lines-to-add-password-protection-to-unprotected-zip-file" target="_blank" rel="noopener">Stackoverflow</a></p>
<p>The post <a href="https://techantidote.com/password-protect-file-using-7z-in-linux-from-the-terminal/">Password protect file using 7z in Linux from the terminal</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techantidote.com/password-protect-file-using-7z-in-linux-from-the-terminal/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3696</post-id>	</item>
		<item>
		<title>Install MacOS Ventura on Proxmox 8.x</title>
		<link>https://techantidote.com/install-macos-ventura-on-proxmox-8-x/</link>
					<comments>https://techantidote.com/install-macos-ventura-on-proxmox-8-x/#comments</comments>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Sun, 10 Sep 2023 20:05:02 +0000</pubDate>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[configure]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[macos vm]]></category>
		<category><![CDATA[proxmox]]></category>
		<category><![CDATA[proxmox 8.0.4]]></category>
		<guid isPermaLink="false">https://techantidote.com/?p=3671</guid>

					<description><![CDATA[<p>This is a guide on how to configure and install MacOS Ventura on Promox 8.x.x. (This was tested in my lab which runs Proxmox 8.0.3 and 8.0.4. It should work for other versions as well) Requirements: Proxmox 8.x.x Opencore ISO [ Link: https://github.com/thenickdude/KVM-Opencore/releases . https://github.com/thenickdude/KVM-Opencore/releases/tag/v20] MacOS Ventura ISO (You can get this from archive.org) Root &#8230; <a href="https://techantidote.com/install-macos-ventura-on-proxmox-8-x/" class="more-link">Continue reading <span class="screen-reader-text">Install MacOS Ventura on Proxmox 8.x</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://techantidote.com/install-macos-ventura-on-proxmox-8-x/">Install MacOS Ventura on Proxmox 8.x</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p id="requirements" class="toc-header">This is a guide on how to configure and install MacOS Ventura on Promox 8.x.x. (This was tested in my lab which runs Proxmox 8.0.3 and 8.0.4. It should work for other versions as well)</p>
<p><strong>Requirements:</strong></p>
<ol>
<li>Proxmox 8.x.x</li>
<li>Opencore ISO [ <strong>Link</strong>: https://github.com/thenickdude/KVM-Opencore/releases . https://github.com/thenickdude/KVM-Opencore/releases/tag/v20]</li>
<li>MacOS Ventura ISO (You can get this from archive.org)</li>
<li>Root access to Proxmox to edit config</li>
</ol>
<h2 id="requirements" class="toc-header">Steps to configure:</h2>
<p>Download the <a class="Truncate" href="https://github.com/thenickdude/KVM-Opencore/releases/download/v20/OpenCore-v20.iso.gz" rel="nofollow" data-turbo="false" data-view-component="true"> <span class="Truncate-text text-bold" data-view-component="true">OpenCore-v20.iso.gz</span>  </a>from KVM-Opencore and extract it. [Link: https://github.com/thenickdude/KVM-Opencore/releases/tag/v20 ].</p>
<p>Create a VM in Proxmox with the below settings:</p>
<ul>
<li>Select ISO Image as Opencore iso</li>
<li>Set <strong>Guest OS</strong> type to “<strong>Other</strong>”</li>
<li>Set <strong>Graphics card</strong> as “<strong>Vmware compatible</strong>”, Machine type &#8220;<strong>q35</strong>&#8220;</li>
<li>Set <strong>BIOS</strong> to <strong>OMVF UEFI</strong>, add EFI Disk and select disk. <strong>Un-select Pre-enroll keys</strong>. Select SCSI Controller to “<strong>VirtIO SCSI</strong>”</li>
<li>Set <strong>hard disk</strong> as &#8220;<strong>VirtIO Block</strong>&#8221; , size = 64GB, cache = Write back unsafe</li>
<li>CPU: Set 1 Socket, 4 Cores, Type as “Host”</li>
<li>4GB Min RAM</li>
<li>Set <strong>NIC</strong> to <strong>Vmware vmxnet3</strong></li>
<li>Then add second cd, select Bus/Device as defaults(IDE) and add MAC OS ISO.</li>
<li>Change boot order so that opencore is first and then second is macos</li>
</ul>
<p><strong>Minor Changes needed for it to work:</strong></p>
<ul>
<li>SSH into the Proxmox host and edit the VM config: (the VM ID = 100 for my newly created VM. It may be different in yours)</li>
</ul>
<p><code>/vim /etc/pve/qemu-server/100.conf</code></p>
<ul>
<li>If your Proxmox server is running on an <strong>Intel CPU</strong>, then <strong>below line</strong> in top of the file:</li>
</ul>
<p><code><br />
args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-usb-xhci.msi=off -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off -cpu host,vendor=GenuineIntel,+invtsc,+hypervisor,kvm=on,vmware-cpuid-freq=on<br />
</code></p>
<ul>
<li>If your Proxmox host is running on an <strong>AMD CPU</strong>, <strong>use the below line instead</strong>:</li>
</ul>
<p><code><br />
args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-usb-xhci.msi=off -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off -cpu Haswell-noTSX,vendor=GenuineIntel,+invtsc,+hypervisor,kvm=on,vmware-cpuid-freq=on<br />
</code></p>
<p>Now, change the <code>media=cdrom</code> to cache=unsafe. Here is a sed command to do so:</p>
<p><code><br />
sed -i 's/media=cdrom/cache=unsafe/g' /etc/pve/qemu-server/100.conf<br />
</code></p>
<p>Below is my config for reference (/etc/pve/qemu-server/100.conf):</p>
<p><code><br />
args: -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -smbios type=2 -device usb-kbd,bus=ehci.0,port=2 -global nec-usb-xhci.msi=off -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off -cpu host,vendor=GenuineIntel,+invtsc,+hypervisor,kvm=on,vmware-cpuid-freq=on<br />
balloon: 0<br />
bios: ovmf<br />
boot: order=ide2;ide0;virtio0;net0<br />
cores: 4<br />
cpu: host<br />
efidisk0: local-lvm:vm-100-disk-0,efitype=4m,size=4M<br />
ide0: local:iso/macOS Ventura 13.0.1.iso,cache=unsafe,size=13073658K<br />
ide2: local:iso/OpenCore-v20.iso,cache=unsafe,size=150M<br />
machine: q35<br />
memory: 8096<br />
meta: creation-qemu=8.0.2,ctime=1690969304<br />
name: MAC-OS<br />
net0: vmxnet3=D6:41:D1:8F:B5:49,bridge=vmbr0,firewall=1<br />
numa: 0<br />
ostype: other<br />
scsihw: virtio-scsi-pci<br />
smbios1: uuid=57a6ce4a-a710-483a-8577-28c1feae47d4<br />
sockets: 1<br />
vga: vmware<br />
virtio0: local-lvm:vm-100-disk-1,cache=unsafe,iothread=1,size=64G<br />
vmgenid: a9dee6c6-376d-48b9-bc20-3c586856ffb4<br />
</code></p>
<p>Here is a screenshot for reference of the settings page in Proxmox for the MacOS VM:</p>
<p>&nbsp;</p>
<p><img loading="lazy" decoding="async" data-attachment-id="3678" data-permalink="https://techantidote.com/install-macos-ventura-on-proxmox-8-x/proxmox-mac-vm-settings/" data-orig-file="https://techantidote.com/wp-content/uploads/2023/09/Proxmox-mac-vm-settings.png" data-orig-size="973,430" data-comments-opened="1" data-image-title="Proxmox-mac-vm-settings" data-image-description="" data-image-caption="" data-large-file="https://techantidote.com/wp-content/uploads/2023/09/Proxmox-mac-vm-settings.png" class="alignnone size-full wp-image-3678" src="https://techantidote.com/wp-content/uploads/2023/09/Proxmox-mac-vm-settings.png" alt="Proxmox MacOS Ventura Settings" width="973" height="430" srcset="https://techantidote.com/wp-content/uploads/2023/09/Proxmox-mac-vm-settings.png 973w, https://techantidote.com/wp-content/uploads/2023/09/Proxmox-mac-vm-settings-300x133.png 300w, https://techantidote.com/wp-content/uploads/2023/09/Proxmox-mac-vm-settings-768x339.png 768w" sizes="auto, (max-width: 973px) 100vw, 973px" /></p>
<p>&#8211; Here is a screenshot of the boot order settings:</p>
<p><img loading="lazy" decoding="async" data-attachment-id="3679" data-permalink="https://techantidote.com/install-macos-ventura-on-proxmox-8-x/macos-boot-order/" data-orig-file="https://techantidote.com/wp-content/uploads/2023/09/macos-boot-order.png" data-orig-size="791,497" data-comments-opened="1" data-image-title="macos-boot-order" data-image-description="" data-image-caption="" data-large-file="https://techantidote.com/wp-content/uploads/2023/09/macos-boot-order.png" class="alignnone size-full wp-image-3679" src="https://techantidote.com/wp-content/uploads/2023/09/macos-boot-order.png" alt="" width="791" height="497" srcset="https://techantidote.com/wp-content/uploads/2023/09/macos-boot-order.png 791w, https://techantidote.com/wp-content/uploads/2023/09/macos-boot-order-300x188.png 300w, https://techantidote.com/wp-content/uploads/2023/09/macos-boot-order-768x483.png 768w" sizes="auto, (max-width: 791px) 100vw, 791px" /></p>
<p>&#8211; Now Boot the MacOS VM, and select UEFI boot when prompted.<br />
&#8211; At boot prompt, run the below:</p>
<p><code><br />
System\Library\CoreServices\Boot.efi<br />
</code></p>
<p><strong>Installation:</strong></p>
<p>&#8211; Open Disk Utility<br />
&#8211; Click “View” =&gt; Show All Devices.<br />
&#8211; Select the First option that shows 64GB disk and click on “Erase”. Once done, close disk utility and click option to start installer.<br />
&#8211; Select the disk and continue the install on it</p>
<p>The rest of the installation is pretty straightforward. It did take a very long time for the install to complete along with a few restarts. But, at the end you should be able to boot into the Proxmox VM.</p>
<p>-Here is a screenshot of my VM post install.</p>
<p><img loading="lazy" decoding="async" data-attachment-id="3681" data-permalink="https://techantidote.com/install-macos-ventura-on-proxmox-8-x/mac-os-login-screen-proxmox/" data-orig-file="https://techantidote.com/wp-content/uploads/2023/09/mac-os-login-screen-proxmox.png" data-orig-size="1597,770" data-comments-opened="1" data-image-title="mac-os-login-screen-proxmox" data-image-description="" data-image-caption="" data-large-file="https://techantidote.com/wp-content/uploads/2023/09/mac-os-login-screen-proxmox-1024x494.png" class="alignnone size-large wp-image-3681" src="https://techantidote.com/wp-content/uploads/2023/09/mac-os-login-screen-proxmox-1024x494.png" alt="MacOS VM login screen after installaton" width="640" height="309" srcset="https://techantidote.com/wp-content/uploads/2023/09/mac-os-login-screen-proxmox-1024x494.png 1024w, https://techantidote.com/wp-content/uploads/2023/09/mac-os-login-screen-proxmox-300x145.png 300w, https://techantidote.com/wp-content/uploads/2023/09/mac-os-login-screen-proxmox-768x370.png 768w, https://techantidote.com/wp-content/uploads/2023/09/mac-os-login-screen-proxmox-1536x741.png 1536w, https://techantidote.com/wp-content/uploads/2023/09/mac-os-login-screen-proxmox.png 1597w" sizes="auto, (max-width: 640px) 100vw, 640px" /></p>
<p>&nbsp;</p>
<p>Hope this helps! Cheers</p>
<p><strong>Credits/References:</strong><br />
<strong>https://github.com/thenickdude/KVM-Opencore/releases/tag/v20<br />
</strong>https://i12bretro.github.io/tutorials/0775.html</p>
<p>The post <a href="https://techantidote.com/install-macos-ventura-on-proxmox-8-x/">Install MacOS Ventura on Proxmox 8.x</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techantidote.com/install-macos-ventura-on-proxmox-8-x/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3671</post-id>	</item>
		<item>
		<title>Enable promiscuous mode in VMware Workstation</title>
		<link>https://techantidote.com/promiscuous-mode-vmware-workstation/</link>
					<comments>https://techantidote.com/promiscuous-mode-vmware-workstation/#comments</comments>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Fri, 23 Dec 2022 19:11:41 +0000</pubDate>
				<category><![CDATA[Linux / Ubuntu]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[mirror port]]></category>
		<category><![CDATA[promiscuous]]></category>
		<category><![CDATA[promiscuous mode]]></category>
		<category><![CDATA[suricata]]></category>
		<category><![CDATA[Vmware workstation]]></category>
		<guid isPermaLink="false">https://techantidote.com/?p=3626</guid>

					<description><![CDATA[<p>Below are the steps to enable promiscuous mode for a VM in Vmware Workstation. Shutdown the VM and edit the .vmx file. This is in the directory where your VM&#8217;s hard disks were configured to be sure. vim /home/extr3me/vmware/pfsense/pfsense.vmx Tip: You can right click on the VM and select option &#8220;Open VM Directory&#8221; that will &#8230; <a href="https://techantidote.com/promiscuous-mode-vmware-workstation/" class="more-link">Continue reading <span class="screen-reader-text">Enable promiscuous mode in VMware Workstation</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://techantidote.com/promiscuous-mode-vmware-workstation/">Enable promiscuous mode in VMware Workstation</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Below are the steps to enable promiscuous mode for a VM in Vmware Workstation.</p>
<p>Shutdown the VM and edit the .vmx file. This is in the directory where your VM&#8217;s hard disks were configured to be sure.</p>
<pre><strong>vim /home/extr3me/vmware/pfsense/pfsense.vmx</strong></pre>
<p>Tip:<br />
You can right click on the VM and select option &#8220;<em>Open VM Directory</em>&#8221; that will take you to the directory where the .vmx file is located.</p>
<p>Add the below line to the file:</p>
<pre><strong>ethernet0.noPromisc = "FALSE"</strong></pre>
<p>-If you have multiple interfaces, then add another line and replace the value 0 with 1 etc. Below is an example for two interfaces:</p>
<pre><strong>ethernet0.noPromisc = "FALSE"
ethernet1.noPromisc = "FALSE"

<span style="text-decoration: underline;">Source/Credits/Reference:</span></strong></pre>
<p>https://superuser.com/questions/1209497/how-do-you-enable-promiscuous-mode-in-vmware-workstation#1270695</p>
<p>The post <a href="https://techantidote.com/promiscuous-mode-vmware-workstation/">Enable promiscuous mode in VMware Workstation</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techantidote.com/promiscuous-mode-vmware-workstation/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3626</post-id>	</item>
		<item>
		<title>Setup Wireguard VPN Server and Client in Ubuntu 20.04</title>
		<link>https://techantidote.com/wireguard-vpn-server-setup-ubuntu/</link>
					<comments>https://techantidote.com/wireguard-vpn-server-setup-ubuntu/#respond</comments>
		
		<dc:creator><![CDATA[]]></dc:creator>
		<pubDate>Fri, 01 Jul 2022 20:12:46 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux / Ubuntu]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[mint]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ubuntu 20.04]]></category>
		<category><![CDATA[vpn]]></category>
		<category><![CDATA[wireguard]]></category>
		<guid isPermaLink="false">https://techantidote.com/?p=3599</guid>

					<description><![CDATA[<p>This a guide on how to setup Wireguard VPN on Ubuntu and setting up a Wireguard client. Requirements: 1. Ubuntu Server 20.04 used in my lab. (20.04 or higher is required for Policy routing) 2. Ubuntu Client (Ubuntu 20.04) 3. Root access to the server. 4. Network Access Note: This should also work on Linux &#8230; <a href="https://techantidote.com/wireguard-vpn-server-setup-ubuntu/" class="more-link">Continue reading <span class="screen-reader-text">Setup Wireguard VPN Server and Client in Ubuntu 20.04</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a href="https://techantidote.com/wireguard-vpn-server-setup-ubuntu/">Setup Wireguard VPN Server and Client in Ubuntu 20.04</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This a guide on how to setup Wireguard VPN on Ubuntu and setting up a Wireguard client.</p>
<p><span style="color: #3366ff;"><strong>Requirements:</strong></span></p>
<p>1. Ubuntu Server 20.04 used in my lab. (20.04 or higher is required for Policy routing)</p>
<p>2. Ubuntu Client (Ubuntu 20.04)</p>
<p>3. Root access to the server.</p>
<p>4. Network Access</p>
<p><strong>Note:</strong> This should also work on Linux Mint 20.04</p>
<h3><span style="color: #3366ff;">Setting up the Wireguard Server</span></h3>
<p>Login to the In my lab, I have set up a EC2 instance and below is the current IP configuration before setting up Wireguard.</p>
<pre>root@ip-172-31-20-229:~# <strong>ip a
</strong>1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: <strong>eth0</strong>: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 9001 qdisc fq_codel state UP group default qlen 1000
    link/ether 02:ca:92:5f:0e:80 brd ff:ff:ff:ff:ff:ff
    inet <strong>172.31.20.229/20</strong> brd 172.31.31.255 scope global dynamic eth0
       valid_lft 2617sec preferred_lft 2617sec
    inet6 fe80::ca:92ff:fe5f:e80/64 scope link 
       valid_lft forever preferred_lft forever
</pre>
<p>From above, I have a single interface with IP 172.31.20.229 assigned to eth0.</p>
<pre><strong>sudo apt update &amp;&amp; sudo apt upgrade -y
sudo apt install wireguard -y
</strong></pre>
<p>-Switch to root and run the following:</p>
<p><strong> sudo su &#8211; </strong></p>
<p>Below are the default permissions on the wireguard dir:</p>
<pre>root@ip-172-31-20-229:~# <strong>ls -l /etc/ | grep wireguard
</strong>drwx------ 2 root root       4096 Aug  4  2020 wireguard
</pre>
<p>-You could set permissions to the directory as follows:</p>
<pre><strong>chmod 0700 /etc/wireguard/</strong>
root@ip-172-31-20-229:~# <strong>ls -l /etc/ | grep wireguard
drwx------</strong> 2 root root       4096 Aug  4  2020 wireguard
</pre>
<p>To check the version of Wireguard installed:</p>
<pre>root@ip-172-31-20-229:/etc/wireguard# <strong>wg --version
</strong>wireguard-tools v1.0.20200513 - https://git.zx2c4.com/wireguard-tools/
</pre>
<p>-Generate public and private key pairs:</p>
<pre><strong>cd /etc/wireguard/
umask 077; wg genkey | tee privatekey | wg pubkey &gt; publickey
</strong></pre>
<p>This should generate the private and the public key:</p>
<pre>root@ip-172-31-20-229:/etc/wireguard# <strong>ls -l
</strong>total 8
-rw------- 1 root root 45 Jun 30 20:23 <strong>privatekey</strong>
-rw------- 1 root root 45 Jun 30 20:23 publickey
</pre>
<p>-Take a note of the private key &#8220;<strong>privatekey</strong>&#8221; <strong>cat privatekey</strong> . You will need to add this to the WG server&#8217;s conf file.</p>
<p><strong>Setting up the Wireguard Server&#8217;s configuration file</strong></p>
<pre><strong>vim /etc/wireguard/wg0.conf</strong></pre>
<p>Add below content. (Here, I chose the IP as <strong>192.168.6.1</strong> which is the new VPN private address that will be assigned to the interface)</p>
<pre><em>[Interface]
## My VPN server private IP address ##
Address = <strong>192.168.6.1
</strong> 
## My VPN server port ##
ListenPort = 41194
 
## VPN server's private key i.e. string from /etc/wireguard/privatekey ##
PrivateKey = <strong>ADD_PRIVATE_KEY_HERE
</strong></em></pre>
<p>-Allow the port in the Server&#8217;s Firewall:</p>
<pre>root@ip-172-31-20-229:~# <strong>sudo ufw allow 41194/udp</strong>
Rules updated
Rules updated (v6)
</pre>
<p>-To check the status:</p>
<pre><strong>sudo ufw status
</strong></pre>
<p>&#8211; Enable wireguard service on boot on the server and start the service:</p>
<pre>ubuntu@ip-172-31-20-229:~$ <strong>sudo systemctl enable wg-quick@wg0</strong>
Created symlink /etc/systemd/system/multi-user.target.wants/wg-quick@wg0.service → /lib/systemd/system/wg-quick@.service.

ubuntu@ip-172-31-20-229:~$ <strong>sudo systemctl start wg-quick@wg0
</strong></pre>
<p>To check the status of the wireguard service, use the following:</p>
<pre>root@ip-172-31-20-229:~# <strong>sudo systemctl status wg-quick@wg0
</strong>● wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0
     Loaded: <strong>loaded</strong> (/lib/systemd/system/wg-quick@.service; enabled; vendor preset: enabled)
     Active: <strong>active</strong> (exited) since Thu 2022-06-30 21:29:01 UTC; 8min ago
       Docs: man:wg-quick(8)
             man:wg(8)
             https://www.wireguard.com/
             https://www.wireguard.com/quickstart/
             https://git.zx2c4.com/wireguard-tools/about/src/man/wg-quick.8
             https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8
    Process: 2230 ExecStart=/usr/bin/wg-quick up wg0 (code=exited, status=0/SUCCESS)
   Main PID: 2230 (code=exited, status=0/SUCCESS)

Jun 30 21:29:01 ip-172-31-20-229 systemd[1]: wg-quick@wg0.service: Succeeded.
Jun 30 21:29:01 ip-172-31-20-229 systemd[1]: Stopped WireGuard via wg-quick(8) for wg0.
Jun 30 21:29:01 ip-172-31-20-229 systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
Jun 30 21:29:01 ip-172-31-20-229 wg-quick[2230]: [#] <strong>ip link add wg0 type wireguard</strong>
Jun 30 21:29:01 ip-172-31-20-229 wg-quick[2230]: [#] wg setconf wg0 /dev/fd/63
Jun 30 21:29:01 ip-172-31-20-229 wg-quick[2230]: [#] <strong>ip -4 address add 192.168.6.1/24 dev wg0</strong>
Jun 30 21:29:01 ip-172-31-20-229 wg-quick[2230]: [#] ip link set mtu 8921 up dev wg0
Jun 30 21:29:01 ip-172-31-20-229 systemd[1]: Finished WireGuard via wg-quick(8) for wg0.
</pre>
<p>Checking the ifconfig output, you would see a <strong>new interface</strong> <strong>wg0 </strong>is created automatically which is expected.</p>
<pre>root@ip-172-31-20-229:~# <strong>ip a
</strong>1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: <strong>eth0</strong>: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 9001 qdisc fq_codel state UP group default qlen 1000
    link/ether 02:ca:92:5f:0e:80 brd ff:ff:ff:ff:ff:ff
    inet <strong>172.31.20.229/20</strong> brd 172.31.31.255 scope global dynamic eth0
       valid_lft 2235sec preferred_lft 2235sec
    inet6 fe80::ca:92ff:fe5f:e80/64 scope link 
       valid_lft forever preferred_lft forever
5: <strong>wg0</strong>: &lt;POINTOPOINT,NOARP,UP,LOWER_UP&gt; mtu 8921 qdisc noqueue state UNKNOWN group default qlen 1000
    link/none 
    inet <strong>192.168.6.1/24</strong> scope global wg0
       valid_lft forever preferred_lft forever

</pre>
<p>&#8211; You can check wireguard information/stats using the below command:</p>
<pre>ubuntu@ip-172-31-20-229:~$ <strong>sudo wg
interface</strong>: <strong>wg0</strong>
  public key: pHrkGojLiNZy2GwshmdEXMaaOmowXXXXXXXXXXXXXXX=
  private key: (hidden)
  listening port: 41194
</pre>
<h3><span style="color: #3366ff;"><strong>Configuring the VPN Client</strong></span></h3>
<ul>
<li>Login to the client and install Wireguard.</li>
</ul>
<pre><strong>sudo apt install wireguard -y
</strong></pre>
<p>&#8211; Create the configuration file</p>
<pre>root@wg-client:~# <strong>sudo sh -c 'umask 077; touch /etc/wireguard/wg0.conf'
</strong>
root@wg-client:~# <strong>ls -l /etc/wireguard/wg0.conf 
</strong>-rw------- 1 root root 0 Jun 30 20:58 /etc/wireguard/wg0.conf</pre>
<ul>
<li><strong>Create a key pair in the client</strong></li>
</ul>
<p>&#8211; In the client machine, create a key pair:</p>
<pre>root@wg-client:~# <strong>cd /etc/wireguard/
</strong>
root@wg-client:/etc/wireguard# <strong>umask 077; wg genkey | tee privatekey | wg pubkey &gt; publickey
</strong>
root@wg-client:/etc/wireguard# <strong>ls -l 
</strong>total 8
-rw------- 1 root root 45 Jun 30 21:01 privatekey
-rw------- 1 root root 45 Jun 30 21:01 publickey
-rw------- 1 root root  0 Jun 30 20:58 wg0.conf
root@wg-client:/etc/wireguard# 
</pre>
<p>&#8211; Take a note of the client&#8217;s public key. (This will be added in the server&#8217;s config later)</p>
<p>-Take a note of the private key from the client. This will be added in its own config file.</p>
<pre><strong>cat privatekey</strong></pre>
<ul>
<li><strong>Edit config</strong></li>
</ul>
<blockquote><p><strong>vim /etc/wireguard/wg0.conf</strong></p></blockquote>
<p>&#8211; On the client, create the wireguard config file as below:</p>
<pre>[Interface]
## Add the client's private key which is from /etc/wireguard/publickey ##
PrivateKey = <strong>CLIENT_PRIVATE_KEY_HERE</strong>
 
## Client ip address that will be set by this Client ##
Address = <strong>192.168.6.2/24
</strong>  
[Peer]
## Ubuntu 20.04 server public key ##
PublicKey = <strong>SERVER_PUBLIC_KEY_HERE</strong>
 
## set ACL ##
AllowedIPs = 192.168.2.0/24
  
## Your Ubuntu 20.04 LTS server's public IPv4/IPv6 address and port ##
Endpoint = <strong>PUBLIC_IP_OF_YOUR_WIREGUARD_SERVER</strong>:41194
   
##  Key connection alive ##
PersistentKeepalive = 15

</pre>
<p>-On the client, enable and start the Wireguard service:</p>
<pre>root@wg-client:/etc/wireguard# <strong>sudo systemctl enable wg-quick@wg0
</strong>Created symlink /etc/systemd/system/multi-user.target.wants/wg-quick@wg0.service -&gt; /lib/systemd/system/wg-quick@.service.

root@wg-client:/etc/wireguard# <strong>sudo systemctl start wg-quick@wg0
</strong></pre>
<p>&#8211; Check the status of the service in the client:</p>
<pre>root@wg-client:~# <strong>sudo systemctl status wg-quick@wg0
</strong>* wg-quick@wg0.service - WireGuard via wg-quick(8) for wg0
     Loaded: <strong>loaded</strong> (/lib/systemd/system/wg-quick@.service; enabled; vendor preset: enabled)
     Active: <strong>active</strong> (exited) since Thu 2022-06-30 21:35:17 UTC; 5min ago
       Docs: man:wg-quick(8)
             man:wg(8)
             https://www.wireguard.com/
             https://www.wireguard.com/quickstart/
             https://git.zx2c4.com/wireguard-tools/about/src/man/wg-quick.8
             https://git.zx2c4.com/wireguard-tools/about/src/man/wg.8
    Process: 123 ExecStart=/usr/bin/wg-quick up wg0 (code=exited, status=0/SUCCESS)
   Main PID: 123 (code=exited, status=0/SUCCESS)
        CPU: 28ms

Jun 30 21:35:17 wg-client systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
Jun 30 21:35:17 wg-client wg-quick[123]: [#] <strong>ip link add wg0 type wireguard
</strong>Jun 30 21:35:17 wg-client wg-quick[123]: [#] wg setconf wg0 /dev/fd/63
Jun 30 21:35:17 wg-client wg-quick[123]: [#] <strong>ip -4 address add 192.168.6.2/24 dev wg0
</strong>Jun 30 21:35:17 wg-client wg-quick[123]: [#] ip link set mtu 1420 up dev wg0
Jun 30 21:35:17 wg-client systemd[1]: Finished WireGuard via wg-quick(8) for wg0.
</pre>
<p>-From the above output, we can see that the <strong>wireguard</strong> service has <strong>created</strong> the <strong>interface</strong> <strong>wg0</strong> and assigned the IP <strong>192.168.6.2/24</strong> to it. You could also verify this by checking by checking the device ip conf as below:</p>
<pre>root@wg-client:~# <strong>ip a
</strong>1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0@if114: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether aa:3c:37:57:21:8a brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.168.1.143/24 brd 192.168.1.255 scope global dynamic eth0
       valid_lft 86010sec preferred_lft 86010sec
    inet6 fe80::a83c:37ff:fe57:218a/64 scope link 
       valid_lft forever preferred_lft forever
3: <strong>wg0</strong>: &lt;POINTOPOINT,NOARP,UP,LOWER_UP&gt; mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000
    link/none 
    inet <strong>192.168.6.2/24</strong> scope global wg0
       valid_lft forever preferred_lft forever
</pre>
<p>So far, we can configured the client to talk to the server. But the Server does not know about the client. So, next we need to update the Server&#8217;s Wireguard configuration file with the details of the wireguard client.</p>
<p>-Login to the Wireguard Server and add the below block to the server&#8217;s wireguard conf:</p>
<pre>[Peer]
## Desktop/client VPN public key ##
PublicKey = <strong>CLIENT_PUB_KEY_HERE</strong>

## client VPN IP address (note  the /32 subnet) ##
AllowedIPs = <strong>192.168.6.2/32
</strong></pre>
<p>-So, your Wireguard server&#8217;s configuration file will be as follows:</p>
<pre>[Interface]
## My VPN server private IP address ##
Address = <strong>192.168.6.1
</strong> 
## My VPN server port ##
ListenPort = 41194
 
## VPN server's private key i.e. /etc/wireguard/privatekey ##
PrivateKey = <strong>ADD_PRIVATE_KEY_HERE</strong>

[Peer]
## Desktop/client VPN public key ##
PublicKey = <strong>CLIENT_PUB_KEY_HERE</strong>

## client VPN IP address (note  the /32 subnet) ##
AllowedIPs = <strong>192.168.6.2/32
</strong></pre>
<p>&#8211; Start the service again on the server:</p>
<pre><strong>sudo systemctl start wg-quick@wg0
</strong></pre>
<p><span style="color: #3366ff;"><strong>Verify connectivity from the client =&gt; server:</strong></span></p>
<p>&#8211; If the server is in the cloud, then update the security groups tallow the port.</p>
<p>&#8211; From the client, ping the server 192.168.6.1</p>
<pre>root@wg-client:~# <strong>ping 192.168.6.1
</strong>PING 192.168.6.1 (192.168.6.1) 56(84) bytes of data.
64 bytes from 192.168.6.1: icmp_seq=1 ttl=64 time=81.9 ms
64 bytes from 192.168.6.1: icmp_seq=2 ttl=64 time=82.5 ms
^C
--- 192.168.6.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 81.886/82.172/82.458/0.286 ms
</pre>
<p><strong>Checking active connections from Wireguard server:</strong></p>
<p>&#8211; To see which clients are connected to the server and the statistics, you can run the below:</p>
<pre>root@ip-172-31-20-229:~# <strong>sudo wg
</strong>interface: wg0
  public key: pHrkGojLiNZy2GwshmdEXMaaOmowXXXXXXXXXXXXXXX=
  private key: (hidden)
  listening port: 41194

<strong>peer</strong>: 8Zp7Cji5Aseew3L0P3c35sUzJNIPYYYYYYYYYYYYYYY=
  endpoint: <strong>1.2.3.4</strong>:33395
  allowed ips: 192.168.6.2/32
  latest handshake: 1 minute, 12 seconds ago
  transfer: 3.94 KiB received, 1.47 KiB sent
</pre>
<p><span style="color: #3366ff;"><strong>Additional Information:</strong></span></p>
<p>For debugging issue with wireguard, you could check the logs:</p>
<pre><strong>sudo journalctl -eu wg-quick@wg0</strong></pre>
<p>Here is a little cronjob to monitor the tunnel via ping and restart tunnel: (Credits to linuxbabe)</p>
<pre><strong>sudo crontab -e</strong></pre>
<p>-Add the below:</p>
<pre>SHELL=/bin/bash
* * * * * for ((i=1; i&lt;=6; i++)) do (ping -c9 192.168.6.1 &gt; /dev/null || systemctl restart wg-quick@wg0) done
</pre>
<p>Hope this helps! Cheers!</p>
<p><strong>Sources/References:</strong></p>
<p>https://www.cyberciti.biz/faq/ubuntu-20-04-set-up-wireguard-vpn-server/</p>
<blockquote class="wp-embedded-content" data-secret="32BYiyMmZq"><p><a href="https://www.linuxbabe.com/ubuntu/wireguard-vpn-server-ubuntu">Set Up Your Own WireGuard VPN Server on Ubuntu 24.04/22.04</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  title="&#8220;Set Up Your Own WireGuard VPN Server on Ubuntu 24.04/22.04&#8221; &#8212; LinuxBabe" src="https://www.linuxbabe.com/ubuntu/wireguard-vpn-server-ubuntu/embed#?secret=fha41Gk5Ja#?secret=32BYiyMmZq" data-secret="32BYiyMmZq" width="474" height="267" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p>The post <a href="https://techantidote.com/wireguard-vpn-server-setup-ubuntu/">Setup Wireguard VPN Server and Client in Ubuntu 20.04</a> appeared first on <a href="https://techantidote.com">Tech Antidote</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://techantidote.com/wireguard-vpn-server-setup-ubuntu/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3599</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: techantidote.com @ 2026-10-24 02:26:24 by W3 Total Cache
-->