Search This Blog

Tuesday, 3 February 2015

Error when installing Windows 8 "The computer restarted unexpectedly or encountered an unexpected error. Windows installation cannot proceed."

If your getting this error then when presented with the message :
  1. Press SHIFT+F10
  2. In the black command window type : regedit  & enter
  3. Find : HKLocal/SYSTEM/SETUP/STATUS
  4. Double click on ChildCompletion and change the data from 1 to 3
  5. Press OK on the initial error message

Monday, 12 January 2015

QNAP TS-509 & NetGear GS716T Port Trunk

I don't particularly need a 2GB trunk from the NAS but a recent switch upgrade to a NetGear managed switch, GS716T (which for £120 is bloody good value) gave me the option.

Set the NAS for bonded 802.3ad & created the LAG group on the switch.  Easy.

Two days later I noticed my Windows machines had lost their SMB mounts, Linux boxes all fine. Disabling one of the NAS bonded ports brought it all back.

I suspected some kind of ARP timeout.  Switched the LAG port from STATIC to LACP and all was well.  And has remained so.  No idea why Windows was FUBAR and not Linux and without cracking open Wireshark I can only guess.

Wednesday, 7 January 2015

Wordpress (WPMU) Migrate & Domain Change

Goal : Using my existing provider create a Dev env of a Wordpress multisite deployment.

Prod site was two simple sites, 4-5 pages in each.  Minimal plugins.  Eventually fell upon Duplicator from Life in the Grid.

Documentation is decent and I had no issues until I started the deploy on the destination.  The decompression failed with a PHP error when I ran installer.php.  I followed the FAQ and the manual extraction process which worked fine, upload the decompressed files and archive, run the installer.php and follow the prompts.

Site 'duplicated' and working! ... almost.  The primary network site worked fine second site down.  Changed the url via the WP Network Site Admin and created the equiv subdomain entry which allowed me to browse to the second site.  Progress!

Main site : site.domain.uk
Second site : site2dev.domain.uk

And then the fall.  Trying to access the WP-Admin for the second site put me into the [in]famous Wordpress login loop.  Heres a nice write up - https://tommcfarlin.com/resolving-the-wordpress-multisite-redirect-loop/

Followed a ton of links and tried all the suggestions with no success.  Went through the db with a forensic microscope in case a URL rename had been missed, all with no joy.  Eventually I decided to create a new site and see what the results were.  If it failed I knew it would be more WPMU than the second site setup.

Setting up site3 it was created as site3.domain.domain.uk .. oh a sub sub domain.  The light bulb went off but I carried on.  Site3 worked fine.

Changed my second site & DNS entry to site3.domain.domain.uk .. Golden.

Saturday, 22 November 2014

WordPress MultiSite Admin Slow

After upgrading from 3 -> 4 the admin panel became utterly unusable. 20-30 seconds on any action.

Found - https://wordpress.org/support/topic/admin-back-end-slowfront-end-good#8

And for me :
Manually run /wp-admin/upgrade.php
UPDATE 25/1/2015 - Also had to do this for 4.0 -> 4.1 Upgrade

RaspberryPI / Motion & Multiple USB Cameras

Playing around with Motion on Raspian.  Motion was simple to setup with a single camera but when I added a second and switched to the thread config files I started to get :

Unable to query input 1 VIDIOC_ENUMINPUT: Invalid argument
Tracked it to a setting in the default thread2.conf
# The video input to be used (default: 8)
# Should normally be set to 1 for video/TV cards, and 8 for USB cameras
input 1
Change the input to 8 and all is well

Friday, 7 November 2014

CentOS 7 Missing ifconfig command

CentOS 7 no longer ships with the command/s.  You can install via yum
sudo yum install net-tools

Friday, 26 September 2014

Add a static route to QNAP NAS

Can't be done via the GUI so you need to use some CLI foo.  You can set a route temporarily via the shell but in order for it to remain persistent you need to edit the startup script.

1 - Connect via ssh to your device
2 - Mount the QNAP Configuration

The name of the actual device to mount depends on your model number. In general for x86-based systems this should be /dev/sdx6. For Marvell ARM based models it should be /dev/mtdblock5 or /dev/mtdblock4.
[~] # mount -t ext2 /dev/sdx6 /tmp/config

2 - Create or adapt autorun.sh

A shell script called “autorun.sh” will be executed by your QNAP storage system on every startup. It might be possible that file currently does not exist so just go ahead and create it with your favorite text editor, or the whatever is installed.
#!/bin/sh
route add -net <subnet> netmask <mask> gw <gw_ip_addr>
3 - Make sure that autorun.sh is executable
In order to be executable during startup, we will have to set the executable flag for “autorun.sh”:
[~] # ls -al /tmp/config/autorun.sh
-rw-r--r--    1 admin    administ       60 May 11 17:43 /tmp/config/autorun.sh*
[~] #
[~] # chmod +x /tmp/config/autorun.sh
[~] #
[~] # ls -al /tmp/config/autorun.sh
-rwxr-xr-x    1 admin    administ       60 May 11 17:43 /tmp/config/autorun.sh*
[~] #
4 - Unmount the config
[~]# Unmount /tmp/config

Sunday, 17 August 2014

OSX Proxy [on/off] Script

#!/bin/bash

e=$(networksetup -getwebproxy wi-fi | grep "No")

if [ -n "$e" ]; then
  echo "Turning on proxy"
#  sudo networksetup -setstreamingproxystate wi-fi on
#  sudo networksetup -setsocksfirewallproxystate wi-fi on
  sudo networksetup -setwebproxystate wi-fi on
  sudo networksetup -setsecurewebproxystate wi-fi on
else
  echo "Turning off proxy"
#  sudo networksetup -setstreamingproxystate wi-fi off
#  sudo networksetup -setsocksfirewallproxystate wi-fi off
  sudo networksetup -setwebproxystate wi-fi off
  sudo networksetup -setsecurewebproxystate wi-fi off

fi

Wednesday, 23 July 2014

Extend Windows 7 VirtualBox Disk


  1. Use the VirtualBox client to create a new disk of the size you want in the same directory as your guest.
  2. Clone the old disk to the new.  Open a command prompt, navigate to the guest directory and run :
  3. VBoxManage clonehd   --existing
  4. Attach the new disk to the guest and detach the old disk.  Ensure the new disk is first in the list / SATA 0
  5. Guest should now boot up.  If you find it asks you to select a boot disk then the order is incorrect as per step 3
  6. Open Windows disk manager, It will currently show the old size with #GB free.  Right click, extend, follow the prompts.
  7. Confirm everything is good and you can delete the old disk.
Thats it, you're done ...

Thursday, 19 June 2014

Re-enable the Apple-provided Java SE 6 web plug-in and Web Start features

Use this at your own risk as Apple, and most people distrust JAVA.


Taken from http://support.apple.com/kb/HT5559

  1. Open Terminal, located in the Utilities folder.
  2. Enter this command, then press the Return or Enter key: 
    sudo mkdir -p /Library/Internet\ Plug-Ins/disabled 
  3. Enter this command, then press the Return or Enter key:
    sudo mv /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin /Library/Internet\ Plug-Ins/disabled
  4. Enter this command, then press the Return or Enter key:
    sudo ln -sf /System/Library/Java/Support/Deploy.bundle/Contents/Resources/JavaPlugin2_NPAPI.plugin /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin 
  5. To re-enable Java SE 6 Web Start, enter this command, then press the Return or Enter key:
    sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Commands/javaws /usr/bin/javaws

Additional Information

The following steps will undo the above commands and restore Java 7 in OS X Lion and later.
  1. Disable Java SE 6 Web Start opening:
    • Enter this command, then press the Return or Enter key:
    • sudo ln -sf /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/javaws /usr/bin/javaws
      
    • When prompted, enter your administrator password, then press the Return or Enter key.
  2. Re-enable the Java 7 applet plug-in by downloading and reinstalling the latest version of Oracle Java 7 JRE.

Thursday, 5 June 2014

Basic Syslog-NG Install & Config

Ubuntu OS, apt syslog-ng install & added the following lines to get a basic UDP server running.


options { 
<Keep all the default Options>
create_dirs(yes);
dir_perm(0755);
};
source s_net { 
udp(ip(0.0.0.0) port(514));
};

destination d_any_remote {
file("/var/log/syslog-ng/$HOST/$FACILITY.log");
};

log {
source(s_net); destination(d_any_remote);
};

Sunday, 20 April 2014

Flash, Chrome & an Atom CPU all walk into a pub

Tried to watch something on 4OD catchup via my HTPC (Zotac ION ATOM 1.6) last week.  Dreadful., choppy and stuttering, in the end I gave up.

Today I decided to debug and see if I could fix it.

Firstly browsing in general also seemed slow.  Hit a well known bandwidth testing site and it was reporting 70-80ms latency.  Odd as no other device in the house showed the same problem, all in the 27-35ms range.

Spent a ton of time looking into this starting with networking\drivers being the source of the problem as it, even started packet tracing!   CLI pings all seemed fine, file download comparisons, all fine.  Finally, and I mean after a day of screwing around and almost a total rebuild, I cleared the cache on Chrome.  Bingo, latency fixed.  WTF! ..

Chrome and pepperflash were throwing the bandwidth test out, and guess what 4OD, flash site .. I think I have found the issue.

Seems like any flash site on Chrome pushes the CPU, on the ATOM its just too much, 90-100% .. Same on my desktop but its a way faster CPU so copes.  Never really appreciated what a great job flashblock does for me.

Switched to Firefox & Adobe Flash and all is well again .. for now

Thursday, 17 April 2014

Billion 7800N & Sky Broadband

Despite my disgust for the Murdoch empire when BE Broadband sold out to Sky I was stuck with a decision, particularly as Hyperoptic have just flooded the area I live in.

The BE service got so bad 1-2Mb that in the end I called to cancel.  I walked away with a 12 month Sky deal, 5Mb estimate and basically nothing to pay until September.  After some teething issues they got me the bandwidth promised and I'm relatively happy.  I will still jump to Hyperoptic when I actually need to start paying for a service.

In the meantime I wanted to get my Billion 7800n working on this line .. Forums answered me here.

And for my own memory :

  1. Firmware >1.06h
  2. Follow below :



Thursday, 23 January 2014

64-bit Linux, 32-bit Chrome & Cisco AnyConnect

Obvious when you think about it but 32Bit Chrome will fail to connect to make the initial the SSL/HTTPs connection and so download/prompt for the client.

Switch to Firefox (Other 64Bit browsers are available) and you'll be good.

Wednesday, 1 January 2014

Blocking Facebook Connect/Graph

Browsing the web and you hit a site that displays your friends list, or suggests you 'like' this page because xyz of your friends also do.

Never paid that much attention until my g/f today mentioned my friends appear on sites she looks at. Of course they do! WTF did I never consider this.

Not that we have that type of secret relationship but when I started digging into Facebook connect, or now graph as it seems to be the more I hated it.

I'm way late to this party but to block this:

  1. Install AdBlock - https://getadblock.com/ & pay this guy money, its a great product!
  2. Create some filters to block access to the connect URLs
http://dev.mathiasbaert.be/misc/facebook-connect-opt-out.html

and/or add these to the filter list:
facebook.com^$domain=~facebook.com|~facebook.net|~fbcdn.com|~fbcdn.net
facebook.net^$domain=~facebook.com|~facebook.net|~fbcdn.com|~fbcdn.net
fbcdn.com^$domain=~facebook.com|~facebook.net|~fbcdn.com|~fbcdn.net
fbcdn.net^$domain=~facebook.com|~facebook.net|~fbcdn.com|~fbcdn.net
Thats it.

Tuesday, 31 December 2013

Suunto Vyper PC Transfer RS232/USB Convertor

I can confirm that a Startech RS232 -> USB convertor works with the original Suunto serial cable.

Whats more is I can confirm this setup works with OSX 10.9, VirtualBox 4.3.6 & a Windows 7 guest with DiverManager v3!


This makes me happy!

Tuesday, 20 August 2013

Chef Cookbook Upload Error : getaddrinfo: nodename nor servname provided, or not known (SocketError)

New Chef build. When I tried to upload a cookbook received the error :

getaddrinfo: nodename nor servname provided, or not known (SocketError)

Some digging and it seems Chef uses the host name of the server its installed on as the default server name. You can over ride this default by creating /etc/chef-server/chef-server.rb and set :

nginx['server_name'] = "<server_name_fqdn>"
nginx['url'] = "https://<server_name_fqdn>
"

Monday, 5 August 2013

JIRA Split Regex Mail Hander & Multiple Mail Clients

As a follow up to when I first played with this and my organisation was a Domino shop things have moved on.  Now an Outlook AND Domino shop, and the proliferation of mobile devices meant this simple regex wasn't working for heaps of mail clients.

Atlassian documentation is (currently) sparse on the subject, or maybe my lack of regex fu is the problem.  But found this answer on the 'Answers' site :

https://answers.atlassian.com/questions/54911/jira-comments-from-email

My new regex is :

/From: *|___.*|On .*wrote:|----Orig.*|On .*(JIRA).*/
But the power is now in my hands!

Wednesday, 10 July 2013

CISSP: Don't hate the cert, hate the way it's abused

It's almost 10 months to the day that I passed the (ISC)2 CISSP exam.  What have I gained? Well if I'm honest not very much.

I updated my Linkedin profile, my website and even told a few friends.  I sat back and waited for the job offers to come flooding in, and I waited, and I waited.  And nothing happened.

This is not right! Why am I not lording it up in an InfoSec role being paid an extortionate salary, angels playing harps and beautiful people feeding me peeled grapes?  I tell you why, because a CISSP is not a free ticket to paradise, its a qualification from an exam you (hopefully) pass.  It shows an ability to understand the content and apply it, in lets be honest, a bloody difficult exam.  But when/if you pass you don't become an InfoSec rock star over night! It's your experience and knowledge are that make you good, or bad.

I can see why some the CISSP gets a hard time.  I ran a few job searches for CISSP and the spread of roles that 'require' CISSP is nuts.  Network Engineers, Security Analysts - which when you read the details were just dealing with AV deployments, patching, Pen Testers etc.  These are not roles that the cert brings anything.

I remember my instructor saying on day 1.
"This is a business cert, not a technical one"
HR, recruitment, and I think a great deal of the industry miss that and so abuse the cert by making it an obligatory requirement for technical roles.  This is where I think the issue lies.

So don't blame the cert, I think theres a place for it.  Blame the way industry uses it.

Wednesday, 5 June 2013

SuSE 12.2 UDP SNMP & Firewall

Zabbix appliance is built on SuSE 12.2 which by default runs SuSEfirewall2.  Problems with allowing UDP SNMP return traffic.

New to SuSE so an introduction to YAST and creating a custom firewall rule resulted in this change in  /etc/sysconfig/SuSEfirewall2 :

FW_SERVICES_ACCEPT_EXT="10.2.0.0/8,udp,,161"