Simple Linux DHCP / DNS Server

I’ve just completed the first DNS and DHCP server that I’ve built for a while. This was using Ubuntu Linux 8.04.

The nice thing about the process this time around as opposed to when I set one up a couple of years ago is that I was a little more au fait with the process. The DHCP successfully updated the DNS records, and everything ticked along nicely.

It’s going into production tomorrow, so I’m hopeful that it will fix a number of network problems that a client has been having with the RM DHCP Server service that runs in Windows XP.

If it would be easy to tie the upcoming Samba 4 into the mix, then I think that you have the perfect open source server! I have another server to put together soon, so I plan to write a ‘howto’ and post it here.

Install a Ranger Package Without Ranger

Following on from my remove ranger script, here is a VBScript that will automatically install Ranger packages without the need for the Ranger software on the network.

It’s a little rough around the edges but it gets the job done. At the moment, it doesn’t report any failures if a file cannot be copied etc.

Download the Ranger Install Package Script and save the file as ranger_installer.vbs. Now just drag a package folder onto the script to install.

Note that the code has been removed from this page to prevent WordPress from stripping tags

Uninstall Ranger from a Computer without the RangerRemove User

Dos Batch FileSometimes it might be necessary to remove Sentinel’s Ranger software from a computer with the minimum of fuss. Even though there is a removal user account. For instance, this may not work.

So here’s a handy script to automitcally disable Ranger on a workstation. This returns some Windows settings back to normal and backs up the Ranger computer info. Just save the code as DeRanger.cmd and run it on any machine that you want to uninstall Ranger.

If you’re having trouble logging into a workstation, either logon as a local administrator or use the Task Manager to stop rgrUIniut.exe in the Processes tab.

DeRanger.cmd

<code>
@echo off

::Stop ranger services
Net Stop ClntCMan
Net Stop SecMon
Net Stop RMNETMON
Net Stop RMNetworkMonitorService

::Remove ranger from winlogon and reset Windows Shell
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v UserInit /t REG_SZ /f /d C:\WINDOWS\system32\userinit.exe
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v Shell /t REG_SZ /f /d Explorer.exe

::Disable ranger services
reg add "HKLM\SYSTEM\CurrentControlSet\Services\ClntCMan" /v Start /t REG_DWORD /f /d 4
reg add "HKLM\SYSTEM\CurrentControlSet\Services\SecMon" /v Start /t REG_DWORD /f /d 4
reg add "HKLM\SYSTEM\CurrentControlSet\Services\RMNETMON" /v Start /t REG_DWORD /f /d 4
reg add "HKLM\SYSTEM\CurrentControlSet\Services\RMNetworkMonitorService" /v Start /t REG_DWORD /f /d 4

::Rename Ranger Registry
reg copy "HKLM\SOFTWARE\Hyperion Security Software" "HKLM\SOFTWARE\Hyperion Security Software_backup" /s /f
reg delete "HKLM\SOFTWARE\Hyperion Security Software" /f

::Rename Rnager Installation Folder
rename "%programfiles%\Ranger" Ranger_

::Now restart
shutdown -f -r -t 0</code>

Tunnelling on the fly

I’ve just been tweaking with SSH. One of the common things that I have to do is reconfigure my SSH tunnels while I’m working remotely to gain access to desktops and the like.

In this situation, the cumbersome but easiest way always seemed to be to disconnect and change the command line. However, having used Putty I was fairly sure that there must be an easier way.

AND THERE IS!

Changing the port forwarding in ssh is as easy, if not easier, than in Putty.

While you’re connected to the host, type a tilde (~) and an uppercase C.This will open the ssh shell. Just type in your port forwarding command like you would when you are typing in the command line option. eg:

<code>-L 3389:localhost:3389</code>

to tunnel an RDP socket to the machine that you are connected to.

And that’s it! If you’re stuck, type a question mark (?) and press ‘Enter’. This will show you the options available.

No More Lost Deleted Files in Ubuntu

I had a shocking error of judgement this morning when I accidentally deleted some of my son’s photos from his toy digital camera. They were sitting on my desktop, and I was on a cleanup… These were a casualty of my cleanup-fest and obsession with the shift key.

Thinking on a Windows vein – I thought that I should be able to backup the files easily and seamlessly. But I don’t want too much aggravation. A quick scoot around the Ubuntu forums, and I found TimeVault.

TimeVault is the equivalent project to Windows’ Shadow Copy service or Apple’s Time Machine. Basically it’s a completely transparent backup that allows you to recover files easily on the system you are working on.

I’ve downloaded the .DEB and forced the installation (there’s no binary x64 version at the moment). I’ll see how it all goes and report back!

Block Facebook Adverts in Firefox

Anyone using Facebook will know that it’s quite annoying losing a good chunk of screen real estate to the adverts on the right hand side.

Of course, many others think so and there is a nice extension that will block various adverts around the internet including Facebook’s own.

Now, I’m not going to get into the morality of blocking adverts on websites here – I’m simply showing you how to do it. If the internet goes bust, it isn’t my fault.

  1. Open Firefox
  2. Click ‘Tools’ > Add-ons
  3. Click ‘Get Add-ons’
  4. Type adblock plus into the search box
  5. Click on the Adblock Plus extension and then click Add to Firefox…
    Firefox Add-ons Window
  6. Click Install Now
  7. Click Restart Firefox

Firefox should restart – so now we can use a subscription to block the adverts. If the Welcom to Adblock Plus window doesn’t open, click on Tools > Add-ons > Adblock Plus > Preferences. Click on Filters > Add filters subscription.

Welcome to Adblock Plus Window

  1. Select the Easylist USA option and click on subscribe.
  2. Click OK

That’s it! Now that you have the ad filtering installed – Facebook should now be advert free in the right-hand side of the page.

Hurrah!