Wednesday, 23 August 2017

Setting up DKIM for your domain / MTA

What is DKIM and how is it different to SPF? Both DKIM and SPF provide protection for your email infrastructure. SPF is used to prevent disallowed IP addresses from spoofing emails originating from your domain. DKIM validates that the message was initially sent by a specific domain and ensures its integrity. The two can (and should) be used together - since using DKIM might ensure the integrity of the email - but they can be re-sent (providing the message isn't modified) and potentially used for spam or phishing - hence employing SPF in addition...

Wednesday, 16 August 2017

Creating an internal / NAT'd network using a vSwitch on Server 2012 / 2016

We'll firstly need to install the Hyper V role - since we'll require the management tools in order to create our interface: Install-WindowsFeature Hyper-V –IncludeManagementTools Install-WindowsFeature Routing -IncludeManagementTools However I had the following message returned when attempting installation: Hyper-V cannot be installed: A hypervisor is already running. As I was running under VMWare I had to install the feature using a slightly different method (bare in mind we have no intention of using the Hyper V hypervisor - however we do...

Wednesday, 9 August 2017

Useful find command examples in Linux

The below is a compilation of 'find' commands that I often use myself. Finding files greater (or small) than 50mb find /path/to/directory -size +50m find /path/to/directory -size -50m Finding files with a specific file extension find /path/to/directory -name "prefix_*.php" Finding files (or folders) with specific permissions find /home -type f -perm 777 Finding files that have been changed  in the last hour find / -cmin -60 Performing an action with matched files (-exec switch) find / -cmin -60 -exec rm {}...

Saturday, 5 August 2017

Adding a custom / unlisted resolution in Fedora / CentOS / RHEL

Sometimes I find that xrandr doesn't always advertise all of the supported resolutions for graphic cards - this can sometimes be down to using an unofficial driver or an older one. However in Fedora the latest drivers are usually bundled in for Intel graphics cards - unfortunately xrandr is only reporting that one resolution is available: xrandr -q Screen 0: minimum 320 x 200, current 1440 x 900, maximum 8192 x 8192 XWAYLAND0 connected (normal left inverted right x axis y axis)    1440x900      59.75 + In order to...

Wine: Could Not Initialize Graphics System. Make sure that your video card and driver are compatible with Direct Draw

For anyone else getting this problem when attempting to run older games on Wine - in my case this due to the graphics card not supporting the native resolution of the game (800x600) - you can check supported resolution types with: xrandr -q However you might be able to add custom resolutions as well. Otherwise within the Wine configuration you will need to ensure 'Emulate a virtual desktop' is ticked and the appropriate resolution for the game is s...