Linux – Wireless networking

if your card is natively supported type ;

iwconfig

iwlist scanning — should also show you the wireless networks that are in range (will work if driver is loaded)

you should see wlan0 if all is good; (grab your wireless details)

iwconfig wlan0 mode managed (should already be in this mode)

there are some cool options here like “secondary” mode which the node acts as a backup master/repeater. “Repeater” – the node forwards packets between other wire-less nodes

iwconfig wlan0 channel 6 – sets wireless to channel to 6
iwconfig wlan0 essid dwireless – sets ssid to “dwireless”

K – now it gets interesting… iwconfig doesn’t support wpa2 psk out of the bag.
http://hostap.epitest.fi/wpa_supplicant/ – you want to get your hands on wpa_supplicant or similar depending on your distro. This is a good tutorial on getting it all up and running (for ubuntu, but works on other distros) http://ph.ubuntuforums.com/showthread.php?t=571188 similar one here http://www.varesano.net/blog/fabio/wpap … no+ipw2100

If you have the Asus wireless card like i did it is best to use the ndis wrapper. The native drivers do NOT work, this is even though the native driver will seem to work – detects card, and can browse the current local wireless networks. Unfortunately it cannot actually join any network (even the unencrypted ones)

do NOT just type dhclient unless you want all adapters to renew their IP’s…. ensure that you also specify the adapter.

ZFS – Creating snapshots

There is some funky ways of modifying the default “time slider” services to do the work for you, but i like a bit more hands on. Generally so i know what is happening in the background, but the time slider can be sometimes overkill creating snapshots every 15 mins if not configured properly.

On a side note i’ve yet to get my head around the SMF stuff properly… Anyhow onto creating snapshots.

I”ve decided to snapshot both my unprotected and protected zpools.

I’ve created three scripts,this is what my snapdaily.sh script looks like ;

zfs destroy -r protected@daily

zfs destroy -r unprotected@daily

zfs snapshot -r protected@daily

zfs snapshot -r unprotected@daily

echo “Daily ZFS snapshot done” – output saved as part of the crontab job

The other two are similar, but weekly and monthly.  The name of the snapshot is after the @ symbol as above. the -r switch is recursive, so all zfs file systems beneath the named zfs also have snapshots created.

next I’ve saved this script and added it to crontab (as root since its zfs commands which are usually restricted);

su – enter password, you are now root.

crontab -e – edit roots crontab file (use vi to insert the following line)

0 5 * * * /protected/snapdaily.sh – this will run every day at 5am.

Run the script first to see if it works, then check with this command;

zfs list -t snapshot – you should see the above snapshots.

Repeat for weekly / monthly as above…

I have disabled all the automatic snapshots….

svcs -a | grep “snapshot” – should show you all the zfs snapshot services

svcadm disable svc:/system/filesystem/zfs/auto-snapshot:daily – etc, will disable these snapshots.

You can also turn off time slider via the GUI if you have turned it on.

Corporate Firewall – SSH and port 443 goodness

Things you’ll need; (basic instructions)
SSH – either Linux or Open SSH for windows (set this up first and ensure its working!). I have only used Linux, so i do not know the details of setting up a Open SSH box on windows (good luck).

Router with pinhole or port forwarding abilities. — forward your external 443 port to internal 22 on your SSH box

Putty.exe – use this to test your SSH connection locally (you should be able to connect on port 22 locally or 443 externally)

Your home IP – setup a dyndns account on one of the free services available on the web (either use your router if it has it or get a dyndns client that runs on your ssh box) — i use dyndns.org

Putty is the client side device that you will use when you are not local to your network. If you are connecting to your SSH box from external (i.e. at work) then you’ll need to configure a SSH connection profile to connect on port 443. If you have a proxy at work (which you will most probably have) you need to ensure you have filled out your proxy address and authentication details — select HTTP then enter your username / password. Then try to connect.

When you can successfully connect to your SSH box from work via 443 you can then create SSH tunnels. Under SSH on putty there is a tunnels option. This is where you can forward local ports to your remote ports… for example – 127.0.0.1:82 –> 192.168.0.10:3389. Then if you fire up RDC you can connect to your remote machine via 127.0.0.1:82

Simple? — if i haven’t made a specific part clear please ask any questions and i’ll try to make it easier to follow

fakeRAID vs Software RAID (windows)

O.k. here is the latest from atomic magazine… I’m talking about RAID 0 (stripe) here.

Software RAID (i.e. windows stripe) is faster (both in throughput and seek time) than the “hardware” fake RAID built in to most new mother boards. Apparently it doesn’t matter about the stripe size of your raid either…. Software raid still wins??

I’m a bit skeptical about this, and will have to en devour on a few tests to conclude whether this is true or not…

What i propose…. i have 3 x 120Gb disks in my machine…. In both cases i will use windows solely on the first disk. The other two disks will then be created using fake raid first (bios raid), then i will recreate the raid using software raid.

In both cases i will test throughput / average seek times using HDTach, but i will also perform some real world tests such as loading times for games etc…

further reading shows that Software RAID may only beat fake RAID at the 64K stripe set — which is actually a highly recommended size .

I have been unable to reproduce the results, as i’m having troubles restoring my system back to a single drive. Oh well, i’ll try and remember to do it the next time i’m rebuilding my machine.

Edit : ZFS is faster than both! – by a long shot. ;)   …but of course it is not currently an option within windows.