Linux, Mac stuff, very basic hackery, Dungeons & Dragons. I'll be amazed if anybody ever reads this.
Wednesday, 30 January 2013
Wednesday, 23 January 2013
Missing Loops in Garageband
If your new Mac came with Garageband, I bet you're itching to try out some fancy loop mixing and become the next Fat Boy Slim (showing my age). Heads up! You're going to suck. But before you even find out you suck, Garageband will tell you it doesn't have any loops, and that you need to download them with the Software Update app (really the App Store now).
So, the App Store opens up and says: Sorry bro, no updates for you. Why The Face?
This seems to be a long standing bug, but it's easy to circumvent. Open up a terminal and type the following (it'll prompt you for your password):
sudo softwareupdate --list
You should see:
Software Update Tool
Copyright 2002-2010 Apple
Software Update found the following new or updated software:
* GBExtraContent-1.0
GarageBand Instruments and Apple Loops (1.0), 1170290K [recommended]
See? They're available really. App Store / Software Update is just being stupid. Now type:
sudo softwareupdate --install GBExtraContent-1.0
And you should see:
Software Update Tool
Copyright 2002-2010 Apple
Downloading GarageBand Instruments and Apple Loops
990 KB of 1.2 GB
3.2 MB of 1.2 GB — About 5 minutes
5.5 MB of 1.2 GB — About 5 minutes
7.7 MB of 1.2 GB — About 4 minutes
9.5 MB of 1.2 GB — About 5 minutes...
... and so on. Next time you open Garageband, you should have access to all those fancy new loops (that seem to account for half of all TV and advertising incidental music these days).
But you might need to rebuild your loops index. To do this, open Garageband and go to the loops browser. Then in Finder, select Go To Folder from the Go menu and enter this location:
/Library/Audio/Apple Loops/Apple
In your Finder window, you'll see a folder called "Apple Loops for Garageband". Drag that on to your loops browser in Garageband, and it will reindex all the loops.
So, the App Store opens up and says: Sorry bro, no updates for you. Why The Face?
This seems to be a long standing bug, but it's easy to circumvent. Open up a terminal and type the following (it'll prompt you for your password):
sudo softwareupdate --list
You should see:
Software Update Tool
Copyright 2002-2010 Apple
Software Update found the following new or updated software:
* GBExtraContent-1.0
GarageBand Instruments and Apple Loops (1.0), 1170290K [recommended]
See? They're available really. App Store / Software Update is just being stupid. Now type:
sudo softwareupdate --install GBExtraContent-1.0
And you should see:
Software Update Tool
Copyright 2002-2010 Apple
Downloading GarageBand Instruments and Apple Loops
990 KB of 1.2 GB
3.2 MB of 1.2 GB — About 5 minutes
5.5 MB of 1.2 GB — About 5 minutes
7.7 MB of 1.2 GB — About 4 minutes
9.5 MB of 1.2 GB — About 5 minutes...
... and so on. Next time you open Garageband, you should have access to all those fancy new loops (that seem to account for half of all TV and advertising incidental music these days).
But you might need to rebuild your loops index. To do this, open Garageband and go to the loops browser. Then in Finder, select Go To Folder from the Go menu and enter this location:
/Library/Audio/Apple Loops/Apple
In your Finder window, you'll see a folder called "Apple Loops for Garageband". Drag that on to your loops browser in Garageband, and it will reindex all the loops.
Tuesday, 22 January 2013
Dungeons & Dragons 4th Edition Starter Set (Red Box) Review
After taking a 20 year break from roleplaying, on a whim I bought this for Christmas 2012, as a gift to my kids (honestly, it was for them really, totally not for me):
Here's my quick review of the D&D 4e Red Box starter set.
I bought this under the false impression that it came with a stripped-down player's handbook and DM's guide. It does not. The Player's book is essentially a Choose-Your-Own-Adventure style story that talks you through building up a character by taking you on a short quest and translating your decisions along the way into parts of your character sheet. The Dungeon Master's book contains some basic rules of play, such as tips on roleplaying and combat, a short group adventure, some instructions for creating your own scenarios, and a small selection of monsters to use.
The set also contains a large double-sided fold-out set of maps, player and monster tokens, power cards, and a set of polyhedral dice.
Rather than letting my kids build their characters themselves through the solo adventure, I chose to DM it for them (the youngest is 5 after all). They enjoyed this, although it gets repetitive to have to use the same adventure to create lots of player characters. Sadly there are no reference instructions on character creation in this set, you really have to use the solo adventure or nothing else.
Once they'd got their characters build, I DM'd the group adventure for them, and we all had great fun. 4th edition D&D (and this box set in particular) get a lot of flak, but as a joint Christmas present it was definitely worth it. I ended up using it as a tool to teach my kids what Roleplaying Games are and how you play them. I'm not sure how well any of us would have fared if I hadn't done in all before (albeit years ago).
The kids found the power cards handy to quickly check what their abilities were and how they worked. The dice included are functional (luckily I'm not a dice connoisseur, and there was no way I was going to dig through my loft to find the dozens I had as a kid). The map poster is usable and so are the character and monster tokens, although I recommend getting some zip-lock bags for those to keep them sorted.
I can't avoid mentioning that half the box is cardboard filler - literally a cardboard wedge. There's also a lot of hate for this box set on the internet for various reasons. This set is based on the 'Essentials' rules, which differ slightly from the full 4th edition rules, which themselves have their own naysayers. Having taken a huge break from D&D since Advanced D&D 2nd Edition, I don't think I'm qualified to judge why any edition is better than any other, but a lot of comments certainly smack of the usual Internet trope of "I like my thing and your thing sucks!".
So far, I've no complaints with 4th edition. It's an odd time to start playing it, as 5th edition (or D&D Next) is being play-tested, and a lot of people still fight for the 3.5 rules. But there's a lot of 4th edition material out there, it is based on the d20 system (along with a lot of other RPGs) and unless you're really hardcore about your RPGs, I don't think you're going to have a problem.
The most frustrating thing for me was not having a proper reference for character creation. You just have to go through that same solo adventure over and over again to get it done. You're going to be aching for the full core rule books very soon into playing this.
I think a lot of the critics are maybe missing the point of this set. If you have any experience of RPGs at all, you're going to find lots of holes to pick. But consider the challenge for Wizards of the Coast: to create a Starter set in the proper meaning of the word, that introduces a game and allows you to play it if you're new to even the concept of pen and paper roleplaying. Most of us were lucky enough to be drawn into it via friends and relatives, but if you're completely new to RPGs it is a tricky concept. Maybe the only way to baby step people into it is through a set like this.
Overall, even with its faults, we had a blast with this set over Christmas. It reminded me how much I love roleplaying, and now I'm fully back into it.
It goes in and out of stock at Amazon, but they usually list other sellers that may have it. If you've played D&D before, you should maybe just see it as a box of maps, dice and counters.
If you've played before, Wizards of the Coast actually put the quick-start rules online for free:
Quick Start Rules - Wizards of the Coast
And the first published D&D 4th edition supplement is online for free:
Keep on the Shadowfell - Wizards of the Coast
But personally I think you'd struggle to play that without the full core rulebooks.
Also of note, the d20 system that D&D 4th edition is based on, available for free under the Open Gaming License:
http://www.wizards.com/default.asp?x=d20/article/srdarchive
And finally, if you're married to the 3.5 rules (not judging - never played 'em) I'm sure you won't let me get away without mentioning Pathfinder. As its also based on 3.5's open d20 system, there's a free resource for Pathfinder online here:
http://www.d20pfsrd.com
Adventure!
Here's my quick review of the D&D 4e Red Box starter set.
What's in the Box
I bought this under the false impression that it came with a stripped-down player's handbook and DM's guide. It does not. The Player's book is essentially a Choose-Your-Own-Adventure style story that talks you through building up a character by taking you on a short quest and translating your decisions along the way into parts of your character sheet. The Dungeon Master's book contains some basic rules of play, such as tips on roleplaying and combat, a short group adventure, some instructions for creating your own scenarios, and a small selection of monsters to use.
The set also contains a large double-sided fold-out set of maps, player and monster tokens, power cards, and a set of polyhedral dice.
The Good
Rather than letting my kids build their characters themselves through the solo adventure, I chose to DM it for them (the youngest is 5 after all). They enjoyed this, although it gets repetitive to have to use the same adventure to create lots of player characters. Sadly there are no reference instructions on character creation in this set, you really have to use the solo adventure or nothing else.
Once they'd got their characters build, I DM'd the group adventure for them, and we all had great fun. 4th edition D&D (and this box set in particular) get a lot of flak, but as a joint Christmas present it was definitely worth it. I ended up using it as a tool to teach my kids what Roleplaying Games are and how you play them. I'm not sure how well any of us would have fared if I hadn't done in all before (albeit years ago).
The kids found the power cards handy to quickly check what their abilities were and how they worked. The dice included are functional (luckily I'm not a dice connoisseur, and there was no way I was going to dig through my loft to find the dozens I had as a kid). The map poster is usable and so are the character and monster tokens, although I recommend getting some zip-lock bags for those to keep them sorted.
The Not so Good
I can't avoid mentioning that half the box is cardboard filler - literally a cardboard wedge. There's also a lot of hate for this box set on the internet for various reasons. This set is based on the 'Essentials' rules, which differ slightly from the full 4th edition rules, which themselves have their own naysayers. Having taken a huge break from D&D since Advanced D&D 2nd Edition, I don't think I'm qualified to judge why any edition is better than any other, but a lot of comments certainly smack of the usual Internet trope of "I like my thing and your thing sucks!".
So far, I've no complaints with 4th edition. It's an odd time to start playing it, as 5th edition (or D&D Next) is being play-tested, and a lot of people still fight for the 3.5 rules. But there's a lot of 4th edition material out there, it is based on the d20 system (along with a lot of other RPGs) and unless you're really hardcore about your RPGs, I don't think you're going to have a problem.
The most frustrating thing for me was not having a proper reference for character creation. You just have to go through that same solo adventure over and over again to get it done. You're going to be aching for the full core rule books very soon into playing this.
Verdict
I think a lot of the critics are maybe missing the point of this set. If you have any experience of RPGs at all, you're going to find lots of holes to pick. But consider the challenge for Wizards of the Coast: to create a Starter set in the proper meaning of the word, that introduces a game and allows you to play it if you're new to even the concept of pen and paper roleplaying. Most of us were lucky enough to be drawn into it via friends and relatives, but if you're completely new to RPGs it is a tricky concept. Maybe the only way to baby step people into it is through a set like this.
Overall, even with its faults, we had a blast with this set over Christmas. It reminded me how much I love roleplaying, and now I'm fully back into it.
It goes in and out of stock at Amazon, but they usually list other sellers that may have it. If you've played D&D before, you should maybe just see it as a box of maps, dice and counters.
If you've played before, Wizards of the Coast actually put the quick-start rules online for free:
Quick Start Rules - Wizards of the Coast
And the first published D&D 4th edition supplement is online for free:
Keep on the Shadowfell - Wizards of the Coast
But personally I think you'd struggle to play that without the full core rulebooks.
Also of note, the d20 system that D&D 4th edition is based on, available for free under the Open Gaming License:
http://www.wizards.com/default.asp?x=d20/article/srdarchive
And finally, if you're married to the 3.5 rules (not judging - never played 'em) I'm sure you won't let me get away without mentioning Pathfinder. As its also based on 3.5's open d20 system, there's a free resource for Pathfinder online here:
http://www.d20pfsrd.com
Adventure!
A £20 VPN Router: OpenWRT and the TP-Link TL-WR841N
I use a PPTP VPN service regularly, but it only allows a single continuous connection so it can't be shared easily between multiple devices (although my provider is happy for that single connection to come from a router however). So I decided to find and configure a router to maintain a VPN connection, and route specific devices on my network across the VPN link. The steps below may help you to do the same thing.
Standard disclaimer: Anything you do to your router will no doubt invalid its warranty, and if you're really unlucky you might even brick the thing completely. If you follow my instructions you've taken this risk upon yourself. Don't blame me if something goes wrong!
I used OpenWRT, a Linux distribution for embedded devices. OpenWRT is open source and has a great community providing all manner of additional packages, and more importantly pre-built images for dozens of popular devices.
The device I used was the TP-Link TL-WR841N Wireless N Cable Router. There are all manner of TP-Link routers available that run OpenWRT, but I was trying to get the cheapest possible device that would still accomplish what I wanted (I'm broke). If you can spend a bit more money, there are models with extra antennae, and gigabit ethernet (which would have been nice to have). If you are looking at this model in particular, you may see it referred to as the WR841N and WR841ND. These are the same device, the only difference being the antennae are detachable on the ND version. So for the purposes of hacking the thing, it's the same.
For the purposes of this post, I'm going to assume you have already set up OpenWRT to accomplish basic tasks (provide a local network and WiFi, connect to your ISP etc.) and you're just here for the PPTP VPN goodness. It would take me too long to cover all the basics and they are already very well documented at the OpenWRT Wiki.
In a nutshell, I used this firmware image:
openwrt-ar71xx-generic-tl-wr841n-v8-squashfs-factory.bin
And followed the initial installation steps found here:
http://wiki.openwrt.org/toh/tp-link/tl-wr841nd
here: http://wiki.openwrt.org/doc/howto/firstlogin
and here: http://wiki.openwrt.org/doc/howto/basic.config
Now for the fun stuff.
Login via SSH and install the necessary packages:
opkg update
opkg install ppp-mod-pptp
Next, you'll need to edit the /etc/network/interfaces files and and append the following, replacing the server name and credentials with those from your VPN provider:
config 'interface' 'vpn'
option 'ifname' 'pptp-vpn'
option 'proto' 'pptp'
option 'username' 'vpnusername'
option 'password' 'vpnpassword'
option 'server' 'vpn.example.org or ipaddress'
option 'buffering' '1'
You can use vi to edit the file. If you're new to vi, have a quick read of this page.
You can now bring the interface up with this command:
ifup vpn
Wait a few seconds for the VPN connection to handshake and you should be able to see an interface called pptp-vpn:
root@OpenWrt:~# ifconfig -a
pptp-vpn Link encap:Point-to-Point Protocol
inet addr:xxx.xxx.xxx.xxx P-t-P:xxx.xxx.xxx.xxx Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1400 Metric:1
RX packets:59720 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:2152092 (2.0 MiB) TX bytes:80 (80.0 B)
Your VPN interface is now up, but you're not using it. The first thing you need to do is add the interface to a firewall zone. It's easier to do this from LuCi, the web interface. In fact, if we'd done the whole thing though LuCi it would have done this for you - but it would have also steamrollered the routing, which we'll come to in a moment.
Login to the web interface, select Network > Interfaces and click 'Edit' on the VPN interface. Select 'Firewall Settings' and add the VPN to the WAN firewall zone. This grants the same firewall permissions to the VPN route as your standard default route (your WAN connection).
We're going to do some clever routing in a minute, but a prerequisite for this is that devices on your network have fixed IP addresses. This way we can create rules for them that determine which route they use to connect to the Internet.
There are several ways to achieve this, but perhaps the easiest (from a device point of view) is to ensure that your DHCP server always gives the same IP address to the same device.
In LuCi, select Network > DHCP and DNS. You will see a list of existing DHCP leases, and at the bottom of the page you can click the Add button to add static leases. Here you can pick a device by its MAC address or by its current IP address, and then pick a static IP. The static IP should be part of your network obviously, so if your LAN uses the 192.168.1.0/24 network, you can pick any IP from 192.168.1.2 to 192.168.1.254.
You'll need your device (laptop, phone etc.) to renew its DHCP lease. It may not pick up the new IP immediately. Make a note of the IP addresses you want to route through the VPN.
For this next trick, you'll need the ip package (formerly iproute2) which you may not have. To install it, type:
opkg install ip
Now you'll need to edit the file /etc/iproute2/rt_tables, which ip creates. Edit in in vi of course! You're going to add a line specifying route table 10 for the VPN. When you're done it should look like this:
#
# reserved values
#
255 local
254 main
253 default
10 vpn
0 unspec
#
# local
#
#1 inr.ruhelp
Now we've created a new table specifically for VPN routes, we'll add some devices to it. Say we have 2 computers that we want to traverse our VPN with IP addresses of 192.168.1.35 and 192.168.1.45. Enter the following commands:
ip rule add from 192.168.1.35 table vpn
ip rule add from 192.168.1.45 table vpn
Now we just tell the router what to do with devices in this table:
ip route add default via <tunnel_ip> dev pptp-vpn table vpn
Replace <tunnel_ip> with the IP address shown as 'inet addr' (the first one) in the ifconfig output above. Make sure you're taking it from the pptp-vpn bit of the ifconfig output.
That's it! Give your router a few seconds to sort its cache out, and then try browsing whatsmyip.net from one of those devices. You should see your VPN address.
Your VPN connection may not stay alive for ever. If it fails (mine seems to once or twice a day), your router should automatically reconnect it, but you'll end up with a different IP address. Your routing table will no longer be able to route those devices to that IP. Rather than log in and update the route every time this happens, I created the following script:
#!/bin/sh
VPNIP=`ip addr show pptp-vpn | sed -n '3p' | awk '{ print $2 }'`
ROUTE=`ip route show table vpn | awk '{ print $3 }'`
if [ "$VPNIP" != "$ROUTE" ]; then
ip route add default via $VPNIP dev pptp-vpn table vpn
fi
Another handy tip is to create some scripts on your local computers to add themselves, or remove themselves from the VPN table. You can do these as shell scripts, make desktop shortcuts to them etc... the specifics will vary depending on your platform. The main requirement is that you have SSH key authentication set up (so you don't have to enter a password every time).
Then just create an on-script that uses ssh to send the command:
ssh root@192.168.1.1 'ip rule add from 192.168.1.35 table vpn'
An off script would look like this:
ssh root@192.168.1.1 'ip rule del from 192.168.1.35 table vpn'
These examples are assuming your IP is 192.168.1.35 of course. Bear in mind that these commands append or remove rules from a routing table. So if you accidentally add the 'on' rule 3 times, you'll need to delete it 3 times as well.
Happy VPNing! Any helpful comments or corrections gratefully received.
Standard disclaimer: Anything you do to your router will no doubt invalid its warranty, and if you're really unlucky you might even brick the thing completely. If you follow my instructions you've taken this risk upon yourself. Don't blame me if something goes wrong!
I used OpenWRT, a Linux distribution for embedded devices. OpenWRT is open source and has a great community providing all manner of additional packages, and more importantly pre-built images for dozens of popular devices.
The device I used was the TP-Link TL-WR841N Wireless N Cable Router. There are all manner of TP-Link routers available that run OpenWRT, but I was trying to get the cheapest possible device that would still accomplish what I wanted (I'm broke). If you can spend a bit more money, there are models with extra antennae, and gigabit ethernet (which would have been nice to have). If you are looking at this model in particular, you may see it referred to as the WR841N and WR841ND. These are the same device, the only difference being the antennae are detachable on the ND version. So for the purposes of hacking the thing, it's the same.
For the purposes of this post, I'm going to assume you have already set up OpenWRT to accomplish basic tasks (provide a local network and WiFi, connect to your ISP etc.) and you're just here for the PPTP VPN goodness. It would take me too long to cover all the basics and they are already very well documented at the OpenWRT Wiki.
In a nutshell, I used this firmware image:
openwrt-ar71xx-generic-tl-wr841n-v8-squashfs-factory.bin
And followed the initial installation steps found here:
http://wiki.openwrt.org/toh/tp-link/tl-wr841nd
here: http://wiki.openwrt.org/doc/howto/firstlogin
and here: http://wiki.openwrt.org/doc/howto/basic.config
Now for the fun stuff.
Install PPTP VPN Client
Login via SSH and install the necessary packages:
opkg update
opkg install ppp-mod-pptp
Next, you'll need to edit the /etc/network/interfaces files and and append the following, replacing the server name and credentials with those from your VPN provider:
config 'interface' 'vpn'
option 'ifname' 'pptp-vpn'
option 'proto' 'pptp'
option 'username' 'vpnusername'
option 'password' 'vpnpassword'
option 'server' 'vpn.example.org or ipaddress'
option 'buffering' '1'
You can use vi to edit the file. If you're new to vi, have a quick read of this page.
You can now bring the interface up with this command:
ifup vpn
Wait a few seconds for the VPN connection to handshake and you should be able to see an interface called pptp-vpn:
root@OpenWrt:~# ifconfig -a
pptp-vpn Link encap:Point-to-Point Protocol
inet addr:xxx.xxx.xxx.xxx P-t-P:xxx.xxx.xxx.xxx Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1400 Metric:1
RX packets:59720 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:2152092 (2.0 MiB) TX bytes:80 (80.0 B)
Your VPN interface is now up, but you're not using it. The first thing you need to do is add the interface to a firewall zone. It's easier to do this from LuCi, the web interface. In fact, if we'd done the whole thing though LuCi it would have done this for you - but it would have also steamrollered the routing, which we'll come to in a moment.
Login to the web interface, select Network > Interfaces and click 'Edit' on the VPN interface. Select 'Firewall Settings' and add the VPN to the WAN firewall zone. This grants the same firewall permissions to the VPN route as your standard default route (your WAN connection).
Set up DHCP and static assignments
We're going to do some clever routing in a minute, but a prerequisite for this is that devices on your network have fixed IP addresses. This way we can create rules for them that determine which route they use to connect to the Internet.
There are several ways to achieve this, but perhaps the easiest (from a device point of view) is to ensure that your DHCP server always gives the same IP address to the same device.
In LuCi, select Network > DHCP and DNS. You will see a list of existing DHCP leases, and at the bottom of the page you can click the Add button to add static leases. Here you can pick a device by its MAC address or by its current IP address, and then pick a static IP. The static IP should be part of your network obviously, so if your LAN uses the 192.168.1.0/24 network, you can pick any IP from 192.168.1.2 to 192.168.1.254.
You'll need your device (laptop, phone etc.) to renew its DHCP lease. It may not pick up the new IP immediately. Make a note of the IP addresses you want to route through the VPN.
Set up Routing Tables
For this next trick, you'll need the ip package (formerly iproute2) which you may not have. To install it, type:
opkg install ip
Now you'll need to edit the file /etc/iproute2/rt_tables, which ip creates. Edit in in vi of course! You're going to add a line specifying route table 10 for the VPN. When you're done it should look like this:
#
# reserved values
#
255 local
254 main
253 default
10 vpn
0 unspec
#
# local
#
#1 inr.ruhelp
Now we've created a new table specifically for VPN routes, we'll add some devices to it. Say we have 2 computers that we want to traverse our VPN with IP addresses of 192.168.1.35 and 192.168.1.45. Enter the following commands:
ip rule add from 192.168.1.35 table vpn
ip rule add from 192.168.1.45 table vpn
Now we just tell the router what to do with devices in this table:
ip route add default via <tunnel_ip> dev pptp-vpn table vpn
Replace <tunnel_ip> with the IP address shown as 'inet addr' (the first one) in the ifconfig output above. Make sure you're taking it from the pptp-vpn bit of the ifconfig output.
That's it! Give your router a few seconds to sort its cache out, and then try browsing whatsmyip.net from one of those devices. You should see your VPN address.
Scripts
Your VPN connection may not stay alive for ever. If it fails (mine seems to once or twice a day), your router should automatically reconnect it, but you'll end up with a different IP address. Your routing table will no longer be able to route those devices to that IP. Rather than log in and update the route every time this happens, I created the following script:
#!/bin/sh
VPNIP=`ip addr show pptp-vpn | sed -n '3p' | awk '{ print $2 }'`
ROUTE=`ip route show table vpn | awk '{ print $3 }'`
if [ "$VPNIP" != "$ROUTE" ]; then
ip route add default via $VPNIP dev pptp-vpn table vpn
fi
This script will check if the VPN route is out of sync with the VPN IP address, and update it if necessary. You can even run this every minute from cron.
First, save the script as /root/checkvpn.sh.
Then, navigate to System > Scheduled Tasks in LuCi, and add the following:
* * * * * /root/checkvpn.sh
Another handy tip is to create some scripts on your local computers to add themselves, or remove themselves from the VPN table. You can do these as shell scripts, make desktop shortcuts to them etc... the specifics will vary depending on your platform. The main requirement is that you have SSH key authentication set up (so you don't have to enter a password every time).
Then just create an on-script that uses ssh to send the command:
ssh root@192.168.1.1 'ip rule add from 192.168.1.35 table vpn'
An off script would look like this:
ssh root@192.168.1.1 'ip rule del from 192.168.1.35 table vpn'
These examples are assuming your IP is 192.168.1.35 of course. Bear in mind that these commands append or remove rules from a routing table. So if you accidentally add the 'on' rule 3 times, you'll need to delete it 3 times as well.
Happy VPNing! Any helpful comments or corrections gratefully received.
Friday, 18 January 2013
roll20.net is Awesome
You heard me. roll20.net is awesome. Seriously awesome. Combine your roll20 game with a Google Hangout and this happens:
Keep on the Shadowfell: Part One
This is part one of a continuing series documenting the heroic deeds of the worthy adventurers I DM for once a fortnight. It's primarily here so I can remember what the hell was going on in the last game.
Searos Swordsteel, the brave dwarven Paladin, joined forces with Marroar Kittenstouch, a newly qualified eladrin Wizard, in the small town of Thornvale, to create an adventuring party called "Action Against Evil". Almost immediately their talents were called upon by the wife of local eccentric explorer Douven Staul. Douven had travelled three months ago for the distant town of Winterhaven to explore the ruins of a dragon's tomb, in search of treasure. Douven was a cautious explorer who should have returned weeks ago. His wife begged Searos and Marroar to locate her missing husband, and in keeping with their alignment, they agreed.
As they packed up to leave Thornvale, they were visited by Marla, priestess of the Great Church of Pelor, who warned the adventurers about death cultists that have been travelling to Winterhaven. Marla told them of a dangerous priest named Kalarel who was rumoured to be assembling a cult for some nefarious purpose, and she offers 250 gold pieces in return for proof that the cult has been destroyed.
Several days travel pass without incident, but not far from Winterhaven, the party is set upon by a small band of Kobolds. Springing from behind boulders, they launch a surprise attack with their spears and swords. Marroar unleashes terrible magical thunderwaves, but Searos struggles to maintain the grip on his second hand battleaxe. The fierce battle reaches a crescendo of dazzling magic and clashing steel, when suddenly Scrindrel Munificent, the elven Ranger, appears on the scene and after loosing a single arrow, sits down to make a small fire. Marroar's magic defeats the last of the kobolds, and welcoming Scrindrel to their team, the adventurer's finally reach the village of Winterhaven.
They spend the night at Wrafton's Inn and learn more information about the location of the dragon's tomb, as well as disturbing information regarding some sort of ruined keep to the north. Lord Padraig, the authority of Winterhaven, offers the adventurers a reward of 100 gold pieces to vanquish the Kobolds once and for all. The next morning they upgrade their armour and weapons at the local market before heading out of town to the south, to investigate the dragon's burial site further.
However, as soon as the team leave Winterhaven, they are ambushed by Kobolds, one of whom carries a sling with magical ammunition. Marroar is set on fire, and Scrindrel is immobilised by a strange white gooey substance. The battle is fierce, despite the intervention of Avandra, Searos' deity, who helps to incinerate a Kobold with divine light. It looks like all may be lost, as Marroar is knocked unconscious and must receive a laying on of hands from Searos. Finally, thanks to some powerful magic and some well-placed arrows, the Kobolds lie slain.
Will the adventurer's finally reach the dragon's tomb without incident? Stay tuned!
Searos Swordsteel, the brave dwarven Paladin, joined forces with Marroar Kittenstouch, a newly qualified eladrin Wizard, in the small town of Thornvale, to create an adventuring party called "Action Against Evil". Almost immediately their talents were called upon by the wife of local eccentric explorer Douven Staul. Douven had travelled three months ago for the distant town of Winterhaven to explore the ruins of a dragon's tomb, in search of treasure. Douven was a cautious explorer who should have returned weeks ago. His wife begged Searos and Marroar to locate her missing husband, and in keeping with their alignment, they agreed.
As they packed up to leave Thornvale, they were visited by Marla, priestess of the Great Church of Pelor, who warned the adventurers about death cultists that have been travelling to Winterhaven. Marla told them of a dangerous priest named Kalarel who was rumoured to be assembling a cult for some nefarious purpose, and she offers 250 gold pieces in return for proof that the cult has been destroyed.
Several days travel pass without incident, but not far from Winterhaven, the party is set upon by a small band of Kobolds. Springing from behind boulders, they launch a surprise attack with their spears and swords. Marroar unleashes terrible magical thunderwaves, but Searos struggles to maintain the grip on his second hand battleaxe. The fierce battle reaches a crescendo of dazzling magic and clashing steel, when suddenly Scrindrel Munificent, the elven Ranger, appears on the scene and after loosing a single arrow, sits down to make a small fire. Marroar's magic defeats the last of the kobolds, and welcoming Scrindrel to their team, the adventurer's finally reach the village of Winterhaven.
They spend the night at Wrafton's Inn and learn more information about the location of the dragon's tomb, as well as disturbing information regarding some sort of ruined keep to the north. Lord Padraig, the authority of Winterhaven, offers the adventurers a reward of 100 gold pieces to vanquish the Kobolds once and for all. The next morning they upgrade their armour and weapons at the local market before heading out of town to the south, to investigate the dragon's burial site further.
However, as soon as the team leave Winterhaven, they are ambushed by Kobolds, one of whom carries a sling with magical ammunition. Marroar is set on fire, and Scrindrel is immobilised by a strange white gooey substance. The battle is fierce, despite the intervention of Avandra, Searos' deity, who helps to incinerate a Kobold with divine light. It looks like all may be lost, as Marroar is knocked unconscious and must receive a laying on of hands from Searos. Finally, thanks to some powerful magic and some well-placed arrows, the Kobolds lie slain.
Will the adventurer's finally reach the dragon's tomb without incident? Stay tuned!
Tuesday, 15 January 2013
Flowroute SIP trunks and UTF weirdness in Asterisk
On the off chance this helps the one other person in the world who finds themselves in the same situation, here's a small tip if you're using Flowroute as a SIP trunk and Asterisk 11. This will save you hours of staring at SIP debug traces (which have been proven to increase thoughts of suicide in sample groups).
Flowroute like you to use IP Authentication, which means you pre-approve your outgoing IP addresses with them and prefix your numbers with a tag, like 1234567#
Asterisk 11, in its infinite wisdom, converts that hash to its UTF equivalent: %23. This gets sent in the SIP packet, rendering it useless (or at least, not understood by Flowroute). You'll probably see some errors like:
SIP/2.0 404 Invalid dialing format
SIP/2.0 401 Unauthorized
You'll then spend a few hours scouring Digium's bug tracker and forums to find a variety of folks claiming that its already been fixed, or asking you to apply their own patch to chan_sip.c and recompile it. All you actually need to do is change the # to a * in the tag.
Asterisk 11 does not mess with it, and Flowroute accepts it.
Like I said, this may help no one ever, but if it does help one person, it might help them a lot.
Flowroute like you to use IP Authentication, which means you pre-approve your outgoing IP addresses with them and prefix your numbers with a tag, like 1234567#
Asterisk 11, in its infinite wisdom, converts that hash to its UTF equivalent: %23. This gets sent in the SIP packet, rendering it useless (or at least, not understood by Flowroute). You'll probably see some errors like:
SIP/2.0 404 Invalid dialing format
SIP/2.0 401 Unauthorized
You'll then spend a few hours scouring Digium's bug tracker and forums to find a variety of folks claiming that its already been fixed, or asking you to apply their own patch to chan_sip.c and recompile it. All you actually need to do is change the # to a * in the tag.
Asterisk 11 does not mess with it, and Flowroute accepts it.
Like I said, this may help no one ever, but if it does help one person, it might help them a lot.
Friday, 11 January 2013
Skyfall vs. Community (and I swear I'm not going to start talking about Big Bang Theory)
If you don't laugh and cry watching this mash-up, you've clearly never seen one of the best written and most original comedies in TV history.
If Season 4 doesn't live up to expectations, well... then I guess I'll just keep watching the first 3 on Netflix over and over again.
I posted this because I thought long and hard about posting something about The Big Bang Theory, and I really didn't want to jump on the bandwagon of criticising it. I'm walking next to the bandwagon, slowly. I'm not really keeping up with it, for the moment at least.
It's just... look. I am not getting into this Big Bang vs. Community thing. It's perfectly okay for some people to like one thing and other people to like a different thing (see my lame rage comic on the subject). But in the midst of all the anti-BBT diatribes there are a few rational commenters saying, look, it's not just as funny as it used to be. The humour doesn't use references anymore that make us feel good when we get them. It mainly centres around making fun of people. Wether we're mocking the guys for being losers, or Penny for not understanding Leonard's job, or Raj because he's apparently neurologically unaware of how every other thing he says is a homosexual innuendo*. And if all we're doing is making fun of people, well, that's just mean. Mean isn't funny.
I'm going to stop myself in a second, but I just have to off-load a few things about this week's episode (US schedule). The central theme is that the guys are made to feel shitty about who they are again. Everyone makes fun of them because they love Star Trek. I mean, they love a thing. It makes them feel good. It could be pottery or fencing, football or morris dancing. It's just a thing that makes them feel good, but everyone makes fun of them for it, and the audience has a good laugh at them as well. And that's it - this issue isn't dealt with. Spoiler alert - they just give up and go home. Sheldon actually says he doesn't want to go outside anymore. I'm no writer, but that's not a story arc. If this isn't a setup for some triumph in the next episode, it's just goddamn depressing.
2 more things, then I'll shut up, I promise. There's a big laugh when the girls go to the comic book store. I mean, think about it! Girls buying comics! That never happens, right? That's hilarious! Ugh.
And this. I think there's one dude in the writers' room for BBT who actually loves the culture that Chuck Lorre has decided to mock (now it's made him a little bit richer). So he's dicking with it. On several occasions Howard refers to the group as a "landing party" from the Starship Enterprise. The TNG Enterprise. It's even the hook of the final scene. But as we all know, there are no "landing parties" in TNG....
They're "AWAY TEAMS".
Okay, I've gone too far. But the thought of this lone writer, wearing a d20 t-shirt without irony in the writers' room gives me hope. I'll give it one more chance.
(* In your endo.)
If Season 4 doesn't live up to expectations, well... then I guess I'll just keep watching the first 3 on Netflix over and over again.
I posted this because I thought long and hard about posting something about The Big Bang Theory, and I really didn't want to jump on the bandwagon of criticising it. I'm walking next to the bandwagon, slowly. I'm not really keeping up with it, for the moment at least.
It's just... look. I am not getting into this Big Bang vs. Community thing. It's perfectly okay for some people to like one thing and other people to like a different thing (see my lame rage comic on the subject). But in the midst of all the anti-BBT diatribes there are a few rational commenters saying, look, it's not just as funny as it used to be. The humour doesn't use references anymore that make us feel good when we get them. It mainly centres around making fun of people. Wether we're mocking the guys for being losers, or Penny for not understanding Leonard's job, or Raj because he's apparently neurologically unaware of how every other thing he says is a homosexual innuendo*. And if all we're doing is making fun of people, well, that's just mean. Mean isn't funny.
I'm going to stop myself in a second, but I just have to off-load a few things about this week's episode (US schedule). The central theme is that the guys are made to feel shitty about who they are again. Everyone makes fun of them because they love Star Trek. I mean, they love a thing. It makes them feel good. It could be pottery or fencing, football or morris dancing. It's just a thing that makes them feel good, but everyone makes fun of them for it, and the audience has a good laugh at them as well. And that's it - this issue isn't dealt with. Spoiler alert - they just give up and go home. Sheldon actually says he doesn't want to go outside anymore. I'm no writer, but that's not a story arc. If this isn't a setup for some triumph in the next episode, it's just goddamn depressing.
2 more things, then I'll shut up, I promise. There's a big laugh when the girls go to the comic book store. I mean, think about it! Girls buying comics! That never happens, right? That's hilarious! Ugh.
And this. I think there's one dude in the writers' room for BBT who actually loves the culture that Chuck Lorre has decided to mock (now it's made him a little bit richer). So he's dicking with it. On several occasions Howard refers to the group as a "landing party" from the Starship Enterprise. The TNG Enterprise. It's even the hook of the final scene. But as we all know, there are no "landing parties" in TNG....
They're "AWAY TEAMS".
Okay, I've gone too far. But the thought of this lone writer, wearing a d20 t-shirt without irony in the writers' room gives me hope. I'll give it one more chance.
(* In your endo.)
Wednesday, 9 January 2013
All Internet Comments
I made a thing, out of exasperation. You can apply the following to any online debate you like, from the self-congratulatory commenters of CiF to the gutters of YouTube.
This is why I don't go outside.
(Spot the deliberate mistake? Correct use of "you're")
This is why I don't go outside.
(Spot the deliberate mistake? Correct use of "you're")
A government of millionaires
Sometimes I wonder if Cameron, Osbourne and others of their ilk are ignorant of the human suffering they cause, or just indifferent to it? I read this today:
And then crawled back under my nice safe rock where I try not to think about things.
Friday, 4 January 2013
Jon Ronson's Adventures with Extraordinary People
With a few days left to go, I've just found out that there are some ridiculously cheap e-books to be had at Amazon's 12 days of Kindle. I mean it's mostly chaff, but look what I found:
Jon Ronson's Adventures With Extraordinary People is a compilation of 3 books: Them (Adventures with Extremists), The Men Who Stare at Goats and The Psychopath Test. I just picked up the last one in paperback from Rise, but I've read the first two and they're great fun. If you're completely new to Ronson you're in for a treat.
Also in the sale, this little trilogy of five. If you haven't read it yet, I don't want to talk to you.
Jon Ronson's Adventures With Extraordinary People is a compilation of 3 books: Them (Adventures with Extremists), The Men Who Stare at Goats and The Psychopath Test. I just picked up the last one in paperback from Rise, but I've read the first two and they're great fun. If you're completely new to Ronson you're in for a treat.
Also in the sale, this little trilogy of five. If you haven't read it yet, I don't want to talk to you.
Legend of Grimrock
I was lucky enough to nab Legend of Grimrock in the most recent Humble Indie Bundle. It is staggeringly good. You really should buy it (and feel extra karmic as you're supporting an indie game studio).
If you're old like me, you might be reminded of Dungeon Master on the Atari ST (unless you were one of those crazy Amiga fans), clearly Grimrock's original inspiration. Grimrock has it all and spades more: 4 player characters, dungeon crawling, levelling, spells, weapons, armour, items, you name it. And now there's a dungeon designer included! And oh my god the mods!
It's available for Mac, Linux, and even those horrible Windows things people insist on using.
Just go buy it already.
If you're old like me, you might be reminded of Dungeon Master on the Atari ST (unless you were one of those crazy Amiga fans), clearly Grimrock's original inspiration. Grimrock has it all and spades more: 4 player characters, dungeon crawling, levelling, spells, weapons, armour, items, you name it. And now there's a dungeon designer included! And oh my god the mods!
It's available for Mac, Linux, and even those horrible Windows things people insist on using.
Just go buy it already.
Subscribe to:
Posts (Atom)