« Posts tagged howto

IPv6 over an IPv4 Tunnel on a Dlink DIR-825 Rev. B

Although I missed World IPv6 Day, I was bored the other night and decided to finally setup an IPv6 tunnel. To do this, I registered a free account with Hurricane Electric’s Tunnel Broker. The process was a breeze and in no time I had a regular tunnel created. From there, it was all up to the Dlink router.

A few notes:

  1. Make sure you have the latest firmware for your DIR-825 Rev. B. At the time of writing, it’s version 2.05(NA).
  2. You will need to enable “WAN Ping Respond” – this can be found under Advanced -> Advanced Network. You can safely disable this after you finish complete the process and your tunnel is working. This is needed so that Tunnel Broker (TB, from here on out) can confirm your public-facing IP address and link it to your tunnel.

So, that out of the way, once Tunnel Broker has confirmed your tunnel is available, login to your router and do the following:

  1. Under the main Setup tab, click IPv6.
  2. Click the Manual IPv6 Internet Connection Setup button. Do not use the wizard.
  3. For the IPv6 CONNECTION TYPE, choose IPv6 in IPv4 Tunnel.
  4. In the Remote IPv4 Address box, enter the Server IPv4 Address provided by TB.
  5. In the Remote IPv6 Address box, enter the Server IPv6 Address provided by TB.
  6. The Local IPv6 Address is the Client IPv6 Address from TB.
  7. Under the IPv6 DNS SETTINGS heading, choose Use the following IPv6 DNS servers and enter the Anycasted IPv6 Caching Nameserver provided by TB in the Primary IPv6 DNS Server box (TB did not provide me with a secondary DNS address).
  8. Finally, uncheck Enable DHCP-PD under the LAN IPv6 ADDRESS SETTINGS heading.
  9. Leave the settings under the ADDRESS AUTOCONFIGURATION SETTINGS heading as their defaults.
  10. Click the Save Settings button at the top of the page and let the router do it’s thing. It will take some time to ‘measure the internet connection’ – this is normal.

You’re almost done. At this point, if you go to the Status tab and choose IPv6 from the options down the left side of the page, you should see the TB information you entered, and Network Status should say Connected.

The rest of the work depends on your operating system. I use Windows 7 on my main PC, which natively supports IPv6 (as does OS X and most *nix distros). As IPv6 is enabled by default, I simply had to open an Elevated Command Prompt and type:

ipconfig /release

ipconfig /renew

After it finished thinking, ipconfig spat out the new network configuration which included the correct IPv4 and IPv6 addresses. I opened Firefox and browsed to http://ipv6.google.com – success! Everything works! You can also confirm that IPv6 is working by using the nslookup tool from a command prompt like so:

C:\Users\Laslow>nslookup
Default Server:  ordns.he.net
Address:  2001:470:20::2

> xbox.com
Server:  ordns.he.net
Address:  2001:470:20::2

Non-authoritative answer:
Name:    xbox.com
Addresses:  2a01:111:f009::3b03
65.55.42.140

>

As you can see, the IPv6 nameserver came back with an IPv6 AAAA record (2a01:111:f009::3b03) and an IPv4 A record (65.55.42.140) for xbox.com.

Installing Java on CentOS 5.x

There are a large number of articles floating around with outdated instructions for installing Sun Oracle Java on CentOS. I’m happy to report that the process is now very, very easier if OpenJDK doesn’t work for you.

  1. Browse to this page: http://www.java.com/en/download/manual.jsp
  2. Copy the URL of the “Linux RPM (self-extracting file)” link.
  3. On your CentOS box (assuming you’re SSH’d to it), use wget to download the file (eg, wget http://javadl.sun.com/webapps/download/AutoDL?BundleId=48333)
  4. Note that, when the file finishes downloading you may need to rename it. Due to the redirect process Oracle uses, you may end up with a filename like “jre-6u25-linux-i586-rpm.bin\?AuthParam\=1306440404_3678aad28a7b9aae044da147678b211e\&GroupName\=JSC\&FilePath\=%2FESD6%2FJSCDL%2Fjdk%2F6u25-b06%2Fjre-6u25-linux-i586-rpm.bin\&File\=jre-6u25-linux-i586-rpm.bin\&BHost\=javadl.sun.com” (this happened to me). If this is the case, rename it to “jre-6u25-linux-i586-rpm.bin
  5. Use chmod to allow execute permissions: chmod +x jre-6u25-linux-i586-rpm.bin
  6. Execute the binary: ./jre-6u25-linux-i586-rpm.bin
  7. Verify the installation worked: java -version

That’s it. No extra compiling, no need to add extra repositories. Simple. (Disclaimer: because this is done without a package manager, you’ll have to remember to manually update the installation to keep your box secure.)

Fedora 14: Framebuffer and Xorg in 1680×1050 with Nvidia Drivers

So out-of-box, Fedora 14 does a pretty good job handling graphics, but if you want to run with Nvidia’s drivers you need to do a little leg work. Fortunately, it’s very, very easy if you know your way around the system even a little.

First off, you should download the driver binaries from Nvidia’s site. Save them in an easy-to-access place and then do a quick ‘chmod 777′ on the package so you can execute it later. Also, make sure you have the kernel-headers and kernel-devel packages installed, plus gcc so the Nvidia installer can make the kernel module.

Now that the driver is downloaded, we need to disable the Nouveau driver that comes with Fedora. This is a two-step process.

  1. As root, edit ‘/etc/modprobe.d/blacklist.conf’ and add the following lines to the bottom:
  2. # Nouveau
    blacklist nouveau

  3. Now edit ‘/boot/grub/menu.lst’ and add the following to the end of the kernel line:
  4. nouveau.modeset=0
    e.g, “kernel /vmlinuz-2.6.35.9-64.fc14.x86_64 ro root=UUID=00311e4e-0043-498c-8532-7301b19eae76 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet nouveau.modeset=0

With that done, reboot. As your computer boots, press the Tab key repeatedly before the Fedora splash screen appears to get the Grub Menu to appear. Press ‘a’ to do a one-time edit of the kernel options (you’ll see the line above appear) and add the number ’3′ (no quotes) to the end, like so:

kernel /vmlinuz-2.6.35.9-64.fc14.x86_64 ro root=UUID=00311e4e-0043-498c-8532-7301b19eae76 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet nouveau.modeset=0 3

This will do a one-time boot to Run Level 3, much like adding ‘single’ to the end of the above line would put you in to Single User Mode. Once you’re at the text-mode long prompt (at a really low screen resolution, I might add), login as root and browse to the folder you saved the driver binary to, then run it. Let it go through it’s process and create the files it wants to, and when it finishes, you’re almost done.

The last thing to do is make the framebuffer work on the correct resolution. In my case, my monitor uses 1680×1050 as it’s native resolution, so that’s what I want to set it to.

Reboot the computer again, and do the Tab key trick to get back to the Grub Menu. Once again, press ‘a’ to edit the kernel options and this time add ‘vga=ask’ in addition to the number ’3′ to the end of the line, and then press enter. You should get a list of the framebuffer modes. Find the one that matches your resolution, enter it (and make a note of it), and then press enter. When you get to the login prompt, you should see that everything is the correct size and resolution. If not, try again. For reference, 1680×1050 in 32bit colour for my GeForce 260 is mode 369.

Once you have the correct mode, we’re ready to make it permanent. Login as root and edit the ‘/boot/grub/menu.lst’ file again. Now add the following to the end of the kernel line:

vga=873 video=nvidiafb

eg, kernel /vmlinuz-2.6.35.9-64.fc14.x86_64 ro root=UUID=00311e4e-0043-498c-8532-7301b19eae76 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet nouveau.modeset=0 3 vga=873 video=nvidiafb

Where 873 is the the mode you entered above converted from hex to decimal (369 hex == 873 dec).

Save, reboot, and watch as both the framebuffer and Xorg now work at the proper resolution for your monitor. You’ll also now be able to turn on Desktop Effects in Gnome if you so choose.

After 5000 Tweets: A Review/HowTo of Twitter

I recently hit the 5,000 tweet mark on Twitter, and figured that it’s as good a time as any to write something about my experience on the abbreviated social networking site. It also seems appropriate as I permanently deleted my Facebook account (well, I’m in the process, anyway).

Click ‘Continue Reading’ below for the wall-of-text review.

»Read More

Rogers Wireless Hijacks Wildcard DNS Records

Rogers LogoAlthough I can’t confirm when this happened (it may have happened a while ago and I just never noticed), I was browsing the internet last night on my Google Nexus One and noticed that, when I mistyped http://imdb.com, I was redirected to http://www20.search.rogers.com (which doesn’t work outside of Rogers’ network) instead of receiving a normal Not Found error. This all smacks of the infamous VeriSign Site Finder fiasco.

I’m no fan of browser redirects in any form, and I’m even less of a fan of Yahoo which Rogers partners with to, among other things, provide results on their hijacked landing page. But what can you do? It’s their service, and there’s no opt-out link on the page.

Well, the answer is to manually opt-out. Unfortunately, you need to have a rooted/jail-broken phone to do this. As stated above, I have a Google Nexus One which runs CyanogenMod, but this should work with any other rooted Android phone and even jail-broken iPhones (although the paths are different — you’ll need to alter them as applicable).

To manually opt-out, do the following (assumes Android phone):

  1. Open a shell on your phone. You can use ConnectBot, Terminal Emulator, or adb shell.
  2. Assume root (su command).
  3. Remount the system partition in to read/write mode —  mount -o rw,remount /system
  4. Browse to /system/etc.
  5. Use your favourite text editor to open hosts.
  6. Add the following to the bottom of the hosts file — 127.0.0.1 www20.search.rogers.com
  7. Save and quit!

You’re done! You’ve just manually opt’ed-out of Rogers Wildcard DNS hijack. Now you’ll just get the normal ‘Not Found’ errors, as when Rogers see that the domain you’ve entered doesn’t exist and tried to redirect you to their search page, your phone will point that domain to itself and fail as it isn’t running a webserver.

TL;DR Version: To prevent getting directed to Rogers’ Search Page when you mistype an address, edit your hosts file to point www20.search.rogers.com to the 127.0.0.1 loopback address.

Update (05/01/2011): You can now officially opt-out using this link: http://searchassist.teoma.com/templates/rogers/optout

How To: Delete Your Facebook Account

Facebook LogoDeleting your Facebook account isn’t as it should be. If you simply browse to Account and then Account Settings, you are only given an option to Deactivate your account. All this does is temporarily hide your profile details from everyone, and does not actually remove any information what-so-ever from the site. All you need to do is login again and you can easily reactivate your account. To permanently delete yourself from Facebook’s database of evil, you have to go through the following process:

  1. Click on Help Center in the footer.
  2. Select Profile under the Using Facebook heading.
  3. Choose Account Settings and Deletion (oddly, the first item on the list).
  4. Now click on the How do I permanently delete my account? heading.
  5. This will expand a wall-o-text explaining how to deactivate your account, which you don’t want to do. Instead, read to the half-way point, where there is a link to submit a request to have your account deleted – click it.
  6. After reading the guilt-trip, click the submit button.
  7. In the new window, enter your password, and then the two words in the captcha box, then click Okay.

Note that at this point, your account still hasn’t been deleted! After clicking okay on the last box, you’ll see the following text:

Your account has been deactivated from the site and will be permanently deleted within 14 days. If you log into your account within the next 14 days, your account will be reactivated and you will have the option to cancel your request.

Yes, even though you went through 8 steps (the waiting is the 8th step) to delete your account, Facebook really wants to make sure you haven’t accidentally done so! As such, if you login in anytime in that 14 day period, you’re account will be reactivated (fortunately, it doesn’t automatically cancel the deletion request).

So quitting Facebook is nearly as hard as quitting smoking, but it can be done. I’ve started the process, and in 14 days my account will finally be out of there! What will I do with all of my Facebook time? Probably put it towards Twitter instead….

Updated – Android: ADB on Windows 7 x64

EDIT 01/08/2012 – Latest SDK supports Java 7.

Updated 02/22/2011 to reflect changes to the SDK installation process. This process is confirmed to work under Windows XP x64 as well. Also, check the comments section for information on adding support for additional devices to the driver INF.

Surprisingly, it isn’t actually that difficult to get ADB (Android Debug Bridge) working correctly under Windows 7 x64 – you just need to perform a few steps in the right order.

  1. Download the latest 32-bit and 64-bit Java JDK from here: http://www.oracle.com/technetwork/java/javase/downloads/index.html (click the JDK link).
  2. Install the 32-bit JDK first, then the 64-bit. Note — Technically you can just use the 64-bit version, but you will occasionally get errors about the 32-bit version (x86) being missing. Best bet is to install both.
  3. Once Java is installed, download the Android development kit for Windows from here: http://developer.android.com/sdk/index.html – you can now opt to download the SDK install in .exe format, which is recommend (and will be used by this guide).
  4. After the installer has finished downloading, run it. If you haven’t yet installed the JDK packages, the installer will remind you that they are required and won’t let you proceed.
  5. The installer will automatically launch the Android SDK Manager and prompt you to install a number of default packages. Of those listed, only the first two options (Android SDK Tools and Android SDK Platform Tools) and the Google USB Driver package are needed.
  6. After the process has finished, allow the Manager to restart the ADB process, then close the dialog box.
  7. When it’s finished downloading and installing, enable debugging mode on your Android phone and plug it in. Windows should now automagically detect the correct ADB driver. Once Windows has completed the driver installation, open Device Manager and ensure that the “Android Phone” category at the top has an entry called ‘Android Composite ADB Interface’ (pictured below). If the driver wasn’t installed automagically and appears in Device Manager as a Nexus One (or whatever your model of phone is), you can find the driver downloaded by the SDK Setup in the folder you extracted the SDK to (by default, C:\Program Files (x86)\Android\android-sdk-windows\google-usb_driver).
  8. Finally, open a command prompt, navigate to the platform-tools (note: adb used to reside in the tools directory, however it was moved when the SDK was updated for Gingerbread) directory in the SDK folder and type ‘adb devices’ — ADB should now list your device.
Device Manager showing the ADB Driver is correctly installed

Device Manager showing the ADB Driver is correctly installed

It should be noted that the driver installed by the SDK works for Windows XP 32bit and Windows Vista/7 32bit and 64bit. I haven’t tested it with Windows XP 64bit edition, however.

Expediting Microsoft’s Telephone Activation System

I rarely have to use it, but Microsoft’s Telephone Activation System is a real pain-in-the-ass. Most of the time I’m able to activate my various Microsoft products online, but from time-to-time it just doesn’t work. Then I have to dust off the phone and make the call.

Today, for example: I just purchased six new Dell Optiplex workstations and ghosted my standard image on to them. Would Windows automatically activate after I entered the correct product keys? No way. Instead, I was forced to activate each machine, one-by-one, over the phone.

So, what do you do to speed the whole process up? Here are a few tips:

  • Mute your phone. The voice recognition system that Microsoft uses has trouble telling the difference between your voice and background. Mute the phone to avoid the problem altogether.
  • As soon as you her the disembodied voice start to ask if you are in front of your computer, press ’1′ on the keypad. Don’t worry about interrupting – she doesn’t care.
  • You should now be prompted to read off the numbers from the Activation screen. Remember that your phone is muted, and use the keypad to enter the numbers instead – it’s faster this way, anyways. Also, you can start entering the numbers as soon as she starts asking for the next block. Again, don’t worry about interrupting. I usually let her get as far as ‘And—’ when she tries to say ‘And block #2?’
  • After you enter in the last block, let her talk. She’ll likely ask you ‘How many computers have you installed this copy of Windows on?’. As soon as she starts to ask the question, press ’1′ on the keypad.
  • If you did it all right, she should happily say ‘Verified!’
  • Once she starts giving instructions, press ’1′ on the keypad to skip them.
  • As she reads out each block of numbers, once you’ve got them typed in, just press ’2′ on the keypad to make her start reading the next block. If you miss something, press ’1′ to have her repeat the last box.
  • If you’ve typed the numbers in correctly, Windows should activate now!

Also, something to ponder – why does everything she say end in a question, even when not appropriate? Food for thought?

Installing a Font via GPO (Server 2003/2008)

I was approached today by a manager requesting that I install the Eco Font on our 60+ workstations. Not being big on manual installations, and definately not wanting to take the ‘email the font as an attachment with installation instructions’, I opt’ed for the only route that made sense – installation via Group Policy Object!

This process is fairly straight forward, with the only potentially annoying portion being the creation of the actual .msi file to install the font. Sure, you can create batch startup scripts that copy the file to the fonts folder and update the registry, but this is a lot cleaner.

To create the .msi package used to install the font, I grabbed a free copy of WinInstall LE. Unfortunately registration with a non-free (read: Hotmail, Gmail, etc… accounts not accepted) email address is required. I tend to create throw-away accounts (eg, a9s6dfa9@my_domain.com) that I promptly delete afterwords. I get enough spam as it is.

Once downloaded and installed, there isn’t that much to do: launch the app, then create a new package by right-clicking on Windows Installer Packages in the top middle and click on New Package. Give it a name and description and you’re ready to start. Expand the package you just created, and you’ll see a new line item called New Feature. Select it, then change the name and description in the right-hand pane. No other changes required.

Next, expand the feature line that you just renamed, and you’ll get another line itm with a GUID (eg, {82B7A2B4-45E8-497A-AFB5-D182960CABF1}) – go ahead and delete it by right-clicking and choosing Delete. Now right-click on your feature and choose Add Files to Feature. Leave the Source line at it’s default value, but change the Target line by pressing the browse button (“…”).  From the list, select [WindowsFolder], then in both the Long folder path and Short folder path boxes add Fonts, so they read “[WindowsFolder]\Fonts” (without the quotes, of course). Now click OK. All we need to do now is add the file, which can be done by clicking the Add File button directly under the Target box. Browse to find your font and click Open. Now click OK, and you’ll see two new GUIDs under your feature.

The last thing we need to do is make this .msi package install without prompting the user. Simply click on the package line (not the feature), and click on the Install Modes tab on the right. Select Install only per machine and check the Show basic user interface only (simple progress and error handling) box.

Now all you need to do is compress the package – this will physically include the font inside the .msi package so that you only need the .msi file itself, rather than the .msi and the font files. To do this, simply select the Windows Installer Package inside WinINSTALL LE (not the feature or the components) and choose ‘Compress’ from the ‘Action’ (or right-click) menu. In the new window, simply press ‘Compress’, and you’re done!

By default, the .msi packages you create with WinInstall LE are located at \<Computer Name>\WinInstallPackages\<Package Name> on the computer you created them. Although the permissions on their share are very relaxed, we want the installer package to be in a high-availability location so that we can be sure the GPO we’ll create in just a short while will always be able to access it. I suggest copying it to \<Domain Controller>\SYSVOL\<Domain Name>\scripts. The guarentees that all of the clients will be able to access it.

Now login in to one of your Domain Controllers and fire up Group Policy Management. Create a new GPO and link it to whatever computer groups you may have, then right-click it and choose Edit. We’ll be working under the Computer Configuration header – if you’re using Server 2008, select Policies, then Software Settings – Server 2003 users just select Software Settings. Now right-click on Software Installation and choose New -> Package. Browse for your .msi package, select it, and choose OK. Selected Assigned, then OK.

You’re done! Just allow time for the GPO to propagate through your domain, and the next time your domain-joined systems reboot the font will be installed.

Repost: Getting Neverwinter Nights running in Windows 7

I’m re-posting this from another blog I contribute to, Carnival of Wank.

As I’ve been testing Windows 7, I thought it would be fun to dig out some old games. Rifling through my collection, I found and installed the Neverwinter Nights Diamond disk and figured it would be worth a shot to try.

The game installed without issue, however it would not update (the patch utility would download it, but then said the file was invalid). After popping over to Bioware’s website, I downloaded the manual patch, and it went in without issue.

Running the game was another story. After configuring to the highest video settings and resolution possible (which ran great under Windows XP), I tried to open from the launcher app (nwn.exe). Nothing happened. Remembering that it had an issue with UAC and Windows Vista, I set the compatibility mode options to force nwmain.exe to run as Administrator, and the game launched.

All looked good during the intro movies, however when I got to the menu screen, scrolling black lines (like the ones that show up when your refresh rate is buggered and your video card is dying) filled the screen. I fought with this for quite a while, and found that in order to get it to work you need to manually edit the following files (note that this is case sensitive and spacing counts!):

In ‘nwn.ini’, set the following in the [Display Options] section:

AllowWindowedMode=1
FullScreen=0

In ‘nwnplayer.ini’, set the following in the [Game Options] section:

Client CPU Affinity=1

And finally, in ‘nwnconfig.ini’, set the following in the [Processor] section (note that the ‘Speed’ setting should be your speed in Mhz):

NumCPUs=1
Speed=3000

As a result of this, your game will be in Windowed Mode, however it will play. The appears to be the result of the game detecting the video card as being an ‘RDPD Chained DD’ device – for some reason it detects the Remote Desktop video device as the primary display adapter.

Update: Probably should have included this originally, but if you haven’t already, make sure that you’ve updated to the latest Windows 7 compatible video card drives from the card manufacturer. Do not rely on the drivers provided by Windows Update, as they are often significantly more limited than the ones from Nvidia/ATI/Intel/etc….

Update #2: According to Alain from the comments below, if you are experiencing lagging issues with NWN on Windows 7, the issue is likely due to the 1.69 patch. He suggests uninstalling NWN, then reinstalling and only patching to 1.68.

Update #3: IMPORTANT (05/17/2010): You should also make sure that you have the latest DirectX 9 Runtime installed – Windows 7 does not include most bits of the DirectX 9 Runtime which can cause problems. You can download the (at time of posting) latest full version here: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=0cef8180-e94a-4f56-b157-5ab8109cb4f5