Thursday, 29 December 2016

Install Security Onion 14.04 into VirtualBox

Had some issues getting the guest additions working, but the following fixed it for me.

1. Make sure everything is up to date:

  • sudo apt update
  • sudo apt upgrade
  • sudo apt dist-upgrade
  • sudo apt-get autoremove
  • sudo apt-get autoclean
2. Make sure the correct Xorg is installed:
  • sudo apt install xserver-xorg-core
3. Install the guest utils and DKMS from the repo:
  • sudo apt install virtualbox-guest-utils virtualbox-guest-x11 virtualbox-guest-dkms dkms
4. Reboot and cleanup:
  • sudo reboot
  • sudo apt-get autoremove
  • sudo apt-get autoclean


Tuesday, 27 December 2016

Snort\Barnyard2\Snorby running on x86 Ubuntu 14.04

I followed this basic guide:
http://www.ubuntu-howtodoit.com/?p=138

Step 5.2 I had to adjust the line:
./configure --with-mysql --with-mysql-libraries=/usr/lib/x86_64-linux-gnu

To the following line as I am running an x86 install on this old server:
:~$ ./configure --with-mysql --with-mysql-libraries=/usr/lib/i386-linux-gnu

Step 7, I pulled the Upstart scripts from the following:
https://s3.amazonaws.com/snort-org-site/production/document_files/files/000/000/090/original/Snort_2.9.8.x_on_Ubuntu_12-14-15.pdf

This was due to Ubuntu 14.04 running Upstart rather than Systemd.

Section 8.12 - As I was running Nginx rather than Apache2, I followed this:
https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-passenger-and-nginx-on-ubuntu-14-04

This page to configure Passenger:
https://www.phusionpassenger.com/library/install/nginx/install/oss/trusty/

The contents of /etc/nginx/passenger.conf that worked for me was:
passenger_root /usr/local/lib/ruby/gems/2.3.0/gems/passenger-5.1.1;
passenger_ruby /usr/local/bin/ruby;

I still have an issue with the web page comlaning that the snorby worker isn't running, yet it is running from an upstart script.

I'll look at that another day!





Sunday, 20 November 2016

Windows Containers on Windows 10 Anniversary Edition

Quickstart guide on how to run Docker and Containers on Windows 10 anniversary edition.

Works nicely with the Windows Server 2016 Container videos from Microsoft Ignite here:
https://www.youtube.com/playlist?list=PL_AEfBHGUiI9SmGakvrqvG-jZnicHKWh0

Couple of corrections I had to make:

1. Replace the Docker download URL with https://master.dockerproject.org/windows/amd64/docker-1.14.0-dev.zip instead of v1.13.

2. The Docker CLI didn't work for me until I restarted PowerShell.

Windows Container on Windows 10:
'via Blog this'

Sunday, 23 October 2016

How to turn off preview globally for Evolution 3.22.1

I finally found a way to do this.

First, I installed dconf-editor:
sudo apt install dconf-editor

I then started this up and navigated to the following place:
/org/gnome/evolution/mail

I then scrolled down to the global-view-setting.

I set the Use default value to OFF, and then set the Custom value to True,

Once I turned off the preview for the Inbox, it was gone for all other message folders too:
View > Preview > Uncheck Show Message preview.

You can also use Ctrl+M to toggle this on and off.

Setting up NHS Mail 2 in Evolution v3.22.1

I've had a number of issues setting up NHS Mail 2 in Evolution and after having installed Ubuntu Gnome 16.10 this weekend I decided I'd have another go.

First of all, I had to add the Evolution EWS service which wasn't installed by default:
sudo apt install evolution-ews

Once that was installed, I was able to go through the account setup:
Edit > Preferences > Mail Accounts > Add

The auto discovery failed, but by manually setting the type to Evolution EWS I was able to get it working.

The magic URL that worked for me was:
https://mail.nhs.net/EWS/Exchange.asmx


Once that was set, I was able to get the OAB URL too by clicking on the Fetch URL button.

The critical step was to set NTLM as the authentication type rather than  Kerberos. The option to discover auth type kept saying that Kerberos was valid, but when I tried it I kept getting an SPEGNO error message saying authentication had failed.

You have to be careful not to store your NHS Mail 2 password in the security otherwise it will eventually lock your account. Still working out how to remove it tf you have done this as I can't find the password in seahorse (Passwords and Keys). If you do accidently store the password in your keyring, you can find and delete it by running seahorse from the terminal or Passwords and Keys from the GUI and search for Evolution Data Source.

I'm not entirely sure that NTLM on EWS is a good authentication method to use with NHS Mail 2 so I will be following this up with Accenture when I'm back at work - Not sure what kind of reception I will get to that though.

Anyone have any thoughts of the merits of NTLM vs Kerberos authentication in an Internet facing application such as EWS?

Sunday, 9 October 2016

Screen tearing with Intel HD 5500 on HP ZBook 15 G2 and Ubuntu 16.10 Beta 2

I've been suffering some screen tearing with the discrete Intel HD5500 on my HP ZBook 15 G2 laptop and Ubuntu 16.10 Beta 2.

Found various posts stating to create the file /usr/share/X11/xorg.conf.d/20-intel.conf containing the following information:

Section "Device"
Identifier  "Intel Graphics"
Driver      "Intel"
Option      "TearFree"    "true"
EndSection

Note: When I created this files with tabs, it hung the X startup so probably best not to include any extra spaces or tab characters.

This video now plays fine. :)

Thanks to this post and this post.

I've now looked at this again in Ubuntu 17.04 beta 2, and added the following two lines to sort out issues with the Chrome address bar flickering:

Option "AccelMethod" "sna"
Option "DRI" "3"

I did not have to change any switches used to startup Chrome 57.

This thread helped a lot.

Wednesday, 5 October 2016

Opt-In to Microsoft Update (Windows)

Opt-In to Microsoft Update (Windows): "
Set ServiceManager = CreateObject("Microsoft.Update.ServiceManager")
ServiceManager.ClientApplicationID = "My App"

'add the Microsoft Update Service, GUID
Set NewUpdateService = ServiceManager.AddService2("7971f918-a847-4430-9279-4a52d1efe18d",7,"")"



'via Blog this'

Sunday, 28 August 2016

Crappy Netflix Playback? Here’s How to Test Your Streaming Speed | WIRED

Google Chrome will play NetFlix on Linux but Chromium will not.

Linux is therefore limited to 720 and not 1080 as it doesn't run crappy IE or Edge.



Crappy Netflix Playback? Here’s How to Test Your Streaming Speed | WIRED:



'via Blog this'

Screen tearing problem on Cub Linux

I've been testing Cub Linux RC1 (based upon Ubuntu 14.04) and had some problems with video playback. After some research I found that editing ~/.config/compton.conf and changing the following lines removed the issue:

Replace backend = "xrender"; with backend = "glx";

Replace vsync = "none"; with vsync = "opengl";

Note: This works fine on the Integrated Intel HD5500 graphics but still produces tearing if I switch to the Radeon Discrete graphics. Not sure if I can find a setting that works with both... Thoughts?

How to force Linux appliaction to run using discrete graphics card

On a laptop with integrated (Intel HD5500) and discrete (AMD Radeon R7 M265) the applications startup using the integrated graphics by default. setting the variable DRI_PRIME=1 causes the applications to use the discrete graphics instead.

e.g.

"glmark2" runs on the integrated graphics vs "DRI_PRIME=1 glmark2" runs on the discrete graphics.
"chromium-browser" runs on the integrated graphics vs "DRI_PRIME=1 chromium-browser" runs on the discrete graphics.

You can also force the use of radeon graphics by the use of a grub flag.

ati - Very Low Temperature Reading for graphics driver using lm-sensors - Ask Ubuntu:



'via Blog this'

How to force Linux appliaction to run using discrete graphics card

On a laptop with integrated (Intel HD5500) and discrete (AMD Radeon R7 M265) the applications startup using the integrated graphics by default. setting the variable DRI_PRIME=1 causes the applications to use the discrete graphics instead.

e.g.

"glmark2" runs on the integrated graphics vs "DRI_PRIME=1 glmark2" runs on the discrete graphics.
"chromium-browser" runs on the integrated graphics vs "DRI_PRIME=1 chromium-browser" runs on the discrete graphics.

You can also force the use of radeon graphics by the use of a grub flag.

ati - Very Low Temperature Reading for graphics driver using lm-sensors - Ask Ubuntu:



'via Blog this'

How to force Linux appliaction to run using discrete graphics card

On a laptop with integrated (Intel HD5500) and discrete (AMD Radeon R7 M265) the applications startup using the integrated graphics by default. setting the variable DRI_PRIME=1 causes the applications to use the discrete graphics instead.

e.g.

"glmark2" runs on the integrated graphics vs "DRI_PRIME=1 glmark2" runs on the discrete graphics.
"chromium-browser" runs on the integrated graphics vs "DRI_PRIME=1 chromium-browser" runs on the discrete graphics.

You can also force the use of radeon graphics by the use of a grub flag.

ati - Very Low Temperature Reading for graphics driver using lm-sensors - Ask Ubuntu:



'via Blog this'

Monday, 22 August 2016

How to shrink a dynamically-expanding guest virtualbox image | dantwining.co.uk

How to shrink a dynamically-expanding guest virtualbox image | dantwining.co.uk:



'via Blog this'



This worked for me on Debian Testing which has a habit of increasing in size purely due to the number of updates required.



I first tried compacting the disk without zeroing the space and the disk size went down from 12.485GB to 12.476, a massive 9MB saving. ;)



I then followed the procedure in the post modified slightly for Debian:



  1. Install zerofree using 'sudo apt install zerofree'
  2. Power off the virtual system using 'sudo poweroff'
  3. Boot the system holding left shift
  4. Select advanced options
  5. Select recovery mode using the latest installed kernel
  6. Identify your root filesystem (and any other filesystems you want to compact) using 'mount'; take a note of the filesystem type they are using as well
  7. 'service rsyslog stop'
  8. 'service network-manager stop'
  9. Run the following two commands for all the required filesystems:
    1. 'mount -n -o remount,ro -t ext4 /dev/sda1 /'
    2. 'zerofree -v /dev/sda1'
    3. Replace ext3 with the required filesystem type, / with the required mount point, and /dev/sda1 with the required device
  10. 'poweroff'
  11. Compact the files system using cmd prompt if on Windows:
    1. 'cmd' (run as administrator)
    2. 'C:'
    3. 'cd "\Program Files\Oracle\VirtualBox"'
    4. 'vboxmanage modifyhd "D:\VMs\Debian Testing\Debian Testing.vdi"' (replace the .vdi path with our own disk image)
My Debian testing disk image was then reduced to 7.333GB saving a further 5.143GB or 41% of the total space.