Archive for September, 2008

Linux Internet Connection Sharing

September 24, 2008 Leave a comment

Iptables is a well known program for its firewall and traffic filtering capabilities. But it also can be used to share our beloved Internet connection. And amazingly it’s relatively easy to setup a shared connection in Linux.

For this example I will be using a Fedora 9 x86_64 system with a wireless Ethernet device named wlan0

First you have to enable IP forwarding. Log in as root and type:

# echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
# /sbin/iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
# /etc/init.d/iptables save

Now a little bit of theory on what the previous commands do.

The first command is mostly self explanatory; it just tells the system to activate the IP forwarding feature.
Next, the iptables command line defines a Routing Table of NAT (Network Address Translation) type which is used to hide (masquerade) an IP address space behind a single IP address in another address space.
Finally, the last command just saves the configuration.

At this point, the configuration is ready and the only thing left is to actually modify the machines network configuration:

Example Router Address:

First Computer (Connected to Internet):

Second Computer:

That’s it, now both computers share the same Internet connection… fast and simple.

Be aware that this is a very simple example of network sharing, not an Enterprise Level solution. There are many alternative ways… more “elegant” and more secure ways to share a connection (proxy servers, SSH encrypted tunnels, etc)… you might want to try different methods and go for the one that fits your needs.

Categories: networking Tags: , ,

Change Windows XP Serial Number

September 6, 2008 4 comments

If you downloaded accidentally purchased a pirated copy of Windows XP and find that you cannot update it, you might have to enter a new valid serial number

You need to edit the Windows registry to do this so its recommended to make a Restore Point just in case you mess the things up.

Be careful though, if you make any error while editing the registry, you can potentially cause Windows to fail or be unable to boot, requiring you to reinstall Windows. Edit the registry at your own risk and always back up the registry before making any changes.

Having said that, lets get started:

Go to Start > Run, type regedit and press Enter

Go to HKey_Local_Machine\Software\Microsoft\WindowsNT\Current Version\WPAEvents

Double click on oobetimer and change at least one digit of this value to deactivate Windows.

Go to Start > Run (again) and type %systemroot%\system32\oobe\msoobe.exe /a

This will bring up the Activate Windows window. Click “Yes, I want to telephone a customer service representative to activate Windows” and then click Next.

Click Change Product Key and enter your downloaded legally purchased serial number for your Windows XP.

Now just click Update, close the window and reboot your computer.

Categories: Windows Tags: