Linux – Move back in time backups

Back in time is mainly a Linux backup tool which uses rsync to perform efficient incremental backups. This quick post shows you how to successfully move back in time backups to a different location. If you try to copy the folder using a file explorer it ends up trying to copy a vast amount of data which isn’t actually there. My photos backup totals around 120 GB but trying to copy this manually resulted in the file explorer reporting 1.1 TB of data to be copied.

Read more…

Route certain traffic via WiFi in Windows – Powershell

Disclaimer:

I WOULD NOT RECOMMEND USING THIS CODE TO CIRCUMVENT FIREWALLS ETC AT YOUR PLACE OF WORK. THE SAMPLE CODE ON BLOG.MONOTOK.ORG IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MONOTOK OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) SUSTAINED BY YOU OR A THIRD PARTY, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ARISING IN ANY WAY OUT OF THE USE OF THIS SAMPLE CODE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Problem:

Sometimes you might need to send certain traffic destined to a FQDN via the WiFi network while the rest of the traffic goes via the Ethernet. An example could be that a certain destination is only reachable via the Ethernet or WiFi but you want the rest of the traffic to go via the other interface.

Windows routing table uses several metrics to decide which interface traffic takes. Normally when both the Ethernet and WiFi are connected, the Ethernet will be preferred over the WiFi; this is decided via the Metric number. This is automatically generated by Windows unless changed, for example the Ethernet will be 10 and the WiFi will be 30. The lower number is preferred. You can also assign a metric to a static route inserted into the routing table however the routes metric is added to the interface metric. This prevents the route overriding the Ethernet even if you make the interfaces the same metric and then remove the WiFi default route (Windows kept inserting it again anyway).

Read more…

EVE-NG access over Internet – Reverse Proxy

Intro

This is a follow up post to NGINX Reverse Proxy LetsEncrypt Auto-Renew where I should you how to configure NGINX as a reverse proxy. This post details the specific configuration needed to access eve-ng over the internet using a reverse proxy. I assume you have deployed the eve-ng appliance on ESXi or another hypervisor however it will probably work with bare metal installs.

Read more…

NGINX Reverse Proxy LetsEncrypt Auto-Renew

Intro

I finally got round to moving all my web services off a single server and onto a new server using ESXi virtualisation. I got an older HP G7 DL380 with 2x Intel Xeon CPU’s and 64GB of RAM for around £300 off eBay. It does use more power (Averages 150W) however it is well worth it as it provides full RAID redundancy and virtualisation provides easy backup/snapshots before any modifications. I have decided to create a separate VM for each service and then use NGINX as a reverse proxy to handle all the SSL. This greatly reduces management overhead as I have only got to renew the certificates in one place, it also provides speed improvements as well as security.

I was initially put off LetsEncrypt with its short certificate lifetime and the need for automation, especially when I add a large and complex Apache configuration file however I decided to go for it with a brand new VM and I am glad I did; it is brilliant!!

Read more…

Char Pointers in C

The Code:

I decided to write a quick bit of code to reinforce my understanding of char pointers in C; especially Char** as I recently confused myself. Firstly lets get straight to the code as it is the best way to learn. The code comments should explain what each line is doing however additional explanation of the steps is provided further down the page.

Read more…

VCentre 6.5 higher memory requirements

I have started working heavily with VMWare at work and have setup my own HP DL380 G7 with VCentre 6.0 which needed 8GB of RAM. This was the smallest configuration available from VMWare however it was overkill for my home lab. This could be changed down to 4GB after it was shutdown and then reduced via ESXi web interface.

I decided to try VCentre 6.5 but unfortunately Vcentre 6.5 has higher memory requirements than version 6. I use Linux at home and VCentre 6.5 removes the need for the integration plugin and provides a faster HTML interface. The tiny instance has increased the RAM from 8GB to 10GB, I have plenty of RAM on my server however I didn’t want to waste it unnecessarily. Unfortunately modifying it via VCentre is not possible as it refuses anything less than 10GB; shutting down the VC and modifying it via ESXi web host is also not possible as it fails with an error.

The only way I managed it was to use the Windows Vsphere Client connected to the ESXi host, this had no problem changing the memory; I guess that is because VMWare hasn’t updated the client since the web interfaces came out.

This seems to work fine like it did before, the only thing to note is the hardware status is unavailable for the host with a message “No host data is available”.

Hope this helps people.