Juniper SSG debug

Posted on Tue 15 April 2014 in misc • Tagged with screenos

I had a strange issue with VIPs over multiple zones on my SSG5 today.  I was going to dump the debug commands but someone else has already done so quite well. The block / log policy I had for the trust zone VIP was also blocking on another zone, strange - but …


Continue reading

Opensuse 13.1 and Macosx NFS with static ports

Posted on Sun 26 January 2014 in misc • Tagged with firewall, nfs, mac

Since my new lab setup, everything on my main opensuse Linux machine is now in a different Juniper zone to my mac laptop and thus firewalled.

This NFS setup for me was one of the few times where it was easier to do the same thing in RHEL5.  I was …


Continue reading

Creating disk images in mac osx with DD and diskutil

Posted on Mon 20 January 2014 in misc • Tagged with mac

I keep forgetting the diskutil commands so I've dumped them in the this post. To use dd in mac you have to remember to umount the volume first (as everything gets auto mounted)

mount - find the path for the mounted volume i.e /dev/disk3s1 (diskutil list) is also useful …


Continue reading

Creating a new service definition for Suse firewall

Posted on Fri 03 January 2014 in misc

I use uhare a bit at home and I wanted it to work nicely with SuSE Firewall.

All I had to do was create a new service description in /etc/sysconfig/SuSEfirewall2.d/services/ (I called mine ushare) and created the file accordingly.

I copied it from the  /etc/sysconfig …


Continue reading

openSUSE KVM getting started notes

Posted on Fri 03 January 2014 in misc • Tagged with kvm, virtualisation

Some sparse notes on installing KVM on openSUSE locally

Configure libvirtd

Firstly, lets not have to be root every time I want to use virt-manager and without using policy kit.  In /etc/libvirt/libvirtd.conf uncomment and set

unix_sock_group = "libvirt"
unix_sock_ro_perms = "0770"
unix_sock_rw_perms = "0770"
auth_unix_ro = "none"
auth_unix_rw = "none"

(https://doc …


Continue reading

Openelec XBMC CEC LG Remote remap

Posted on Thu 17 October 2013 in misc • Tagged with XBMC

I picked up a raspberry pi to replace my Xbox XBMC was has lasted so well but is not powerful enough to play the HD MKVs I download.

One issue I found with the LG remote control I was using (on a one for all) was that the fastforward buttons …


Continue reading

Block cmd w from closing xterm window on mac

Posted on Tue 04 June 2013 in misc

After doing this at least twice in 24 hours I thought I better sort this out. You can block cmd w (close window) and assign it to something else to stop this from happening.

Goto System Preferences -> Keyboard -> Keyborad Shortcuts -> Application Shortcuts

Then Add (+)

Application = X11.app
Window = Close
Shortcut …

Continue reading

Creating An RPM for openSUSE - some notes

Posted on Sun 24 March 2013 in misc • Tagged with rpm

I wanted to create an rpm for SuSE which I had not done before. Here are some notes on the process.

I created a user on my machine for this process called rpmbuilder.

Create a folder for development and create the layout for developing rpms

mkdir rpmdevenv; cd rpmdevenv

mkdir …


Continue reading

Returning the HTTP code of a HTTP request

Posted on Tue 05 February 2013 in misc • Tagged with http, curl

This is really useful for returning HTTP code of a request.

curl --write-out "%{http_code}\n" --silent --output /dev/null www.example.com


Continue reading

Find all unique url's from Apache log files

Posted on Tue 05 February 2013 in misc • Tagged with awk, sed

I needed to build a list of all unique hits that had been made on a website in Apache.

Here's what I came up with using awk and sed.  This should match any HTTP 2xx or 3xx requests and strip of any GET request parameters.

awk '\$9 \~/\^(2|3)/ {print …


Continue reading