Archive for the ‘Networking’ Category

D-Link DIR-600: Installing custom firmware (DD-WRT)

Nearly 2 years ago, I have posted a small review and introduction to the D-Link DIR-600’s basic and advanced settings. With time, I ended up finding a few bugs on the router, and so did my visitors, who left a good amount of comments there.

I ended up installing custom firmware on the router, but didn’t really want to post anything on that subject until I had tested it for a while on my router. It turned out very well, so I am now guiding you on how to do the same on yours.

LIMITATIONS AND RECOMMENDED PRECAUTIONS:
1) Make sure you are connected to the router using a cable. You won’t be able to complete the tutorial using a wireless connection.
2) This tutorial is meant for the D-Link DIR-600 Revisions B1 and B2 only!  Revisions A and C aren’t supported, and trying to install DD-WRT on them may “brick” your router. Below, I’m posting 2 easy ways to find out the revision version of your device:

Option A » Check your router’s original box. You should have a sticker on the side with this information.
Here’s what you’ll be looking for:

Shows the location of the revision number on the original D-Link DIR-600 box

Location of the HW revision

Option B » Open your router’s  administration panel. By default, it should be http://192.168.0.1/. If you have modified the subnet used by your router, then change the URL accordingly. The revision number should be shown on the top bar, like this:

Shows the location of the revision number on the original D-Link DIR-600 administrative panel

Location of the HW revision

Do not proceed with the rest of this tutorial unless you’re absolutely sure that your device is supported.

THE ACTUAL PROCEDURE:
1) First we’ll obviously need to download the DD-WRT firmware files.
I’ll provide for that, as I want to make sure the files I’m working with will be the same you’ll work with – this will avoid surprises that come with different versions.

You can download an archive containing the files needed to complete the tutorial here.
Using a file compressing utility (such as 7-Zip or p7zip), extract the files to an easily accessible folder – such as your desktop.
You should now have 2 files in your desktop folder; dlink-dir600b-factory-webflash.bin and dir600b-revb-ddwrt-webflash.bin.

2) Enter the D-Link DIR-6oo’s control panel by pointing your browser to http://192.168.0.1/.
This is the default subnet used by the router (192.168.0.x). If you have modified yours, then change the URL accordingly.

(Reminder: By default, this router is shipped with the username setup as “admin” and no password defined.)

Now click on “Maintenance” -> “Save and Restore”.  Under the “Save and Restore Settings” section, click on “Reset to Factory Default Settings”.
This will reboot the router and restore it to the default settings. Please be patient during this process, as it may take up to 3 minutes for the router to reboot and revert the settings. During this time, you won’t be able to connect to the network. (Your operating system should notify you once you’re connected again.)

Note for advanced users: If you were using a static IP address on a different subnet (anything other than 192.168.0.x), you should either update your static IP to something within the default subnet (such as 192.168.0.111 – by default the address pool is set to start on 192.168.0.100 and end on 192.168.0.199), or simply set your network connection to obtain the IP address automatically (in other words, use DHCP). If you’re already obtaining your IP address automatically through DHCP (default setting in every OS), this note does not apply to you.

3) Log into the administrative interface again (http://192.168.0.1/ – The username is “admin” and the password field should be left blank)
4) Click on “Maintenance” -> “Firmware Update”. Under the “Firmware Upgrade” section, click on “Browse…” and select “dlink-dir600b-factory-webflash.bin” from your desktop folder. (Picture below)

D-Link DIR-600 Firmware Upgrade Section

D-Link DIR-600 Firmware Upgrade Section

5) Click on “Upload” to initiate the flashing process. It should take about 3 minutes, do NOT reset or power cycle the router during this stage. Just monitor the leds, once they stop blinking, it means it finished.
6) DD-WRT does not use the same subnet as the original D-Link DIR-600’s  router’s firmware, so we’ll need to make sure your OS detects the change.
A simple way of forcing your computer to do this is to simply disconnect the ethernet (network) cable, and reconnect it again once your operating system tells you that the connection was lost. Your operating system should detect the connection again and hopefully also the new IP address.

If this does not turn out to be the case, you can set a static IP address in your computer within the same subnet as DD-WRT’s default (such as 192.168.1.111), or you can reboot your computer, as that will force an IP renewal/network detection as well.
7) Log into DD-WRT’s administative interface (http://192.168.1.1). You will be forced to select an administrative username and password.
8) Click on the “Administration” tab in the top menu.  Then, click on “Firmware Upgrade” (screenshot below).

Location of the "Firmware Upgrade" button on DD-WRT

Location of the “Firmware Upgrade” button on DD-WRT

9) Select the option “Reset to Default settings”, click on “Browse…” , select “dir600b-revb-ddwrt-webflash.bin” and click on “upgrade” (screenshot below).

Firmare Management on DD-WRT

Firmare Management on DD-WRT

Wait about 3 minutes for the upgrade process to complete. You should be redirected to the router’s system information page at the end, and the version of DD-WRT should have changed (screenshot below):

Firmware Version (DD-WRT)

Firmware Version (DD-WRT)

This means SUCCESS! DD-WRT is now installed on your D-Link DIR-600 wireless router, and you can proceed with its configuration.

BASIC CONFIGURATION OF DD-WRT:
I know some of you might be new to this so I’m writing an example setup tutorial below for a cable connection, using Google’s Public DNS, and a Secure Wireless Configuration (WPA2).

1) Click on “Setup” -> “Basic Setup”, and try to duplicate the settings shown on the screenshot below:

Basic Setup (DD-WRT)

Basic Setup (DD-WRT)

Make sure you change the timezone to yours (under “Time Settings”).
I suggest leaving the router name set to “DIR-600” unless you have a valid reason to change it. But if you do, you can change it from “DIR-600” to anything else. The router name should only contain alphanumeric characters. Except for dashes (“-“), no special characters are allowed.
Once you complete the configuration above, click on “Save” and then “Apply Settings”.

2) Click on the “Wireless” tab (in the top navigation bar) and try to duplicate the settings shown on the screenshot below:

DD-WRT Wireless Basic Settings

DD-WRT Wireless Basic Settings

After replicating the settings, click on “Save” and then “Apply Settings”.

3) Click on “Wireless Security” (in the blue sub-navigation bar) and try to duplicate the settings shown on the screenshot below:

DD-WRT Wireless Security Setup

DD-WRT Wireless Security Setup

Needless to say, you have to pick your own WPA Shared Key, as this will be your wireless password. The password should contain between 8 and 63 characters.
To ensure better security, make sure you’re using a password that is a combination of uppercase/lowercase letters, numbers and symbols.
After replicating the settings and typing a WPA Shared Key, click on “Save” and then “Apply Settings”.

4) Click on the “Security” tab (in the top navigation bar) and enable the “SPI Firewall” if it’s not enabled yet.
More information on what a Stateful Packet Inspection Firewall is can be found here.
After this, click on “Save” and then “Apply Settings” again.

5) Click on the “Administration” tab (in the top navigation bar), scroll down the page to its very end and click on “Reboot Router”.
Wait a few minutes for the router to reboot. It should take you to the router’s default page (System Information).

You should now be able to connect all your wired and wireless devices to your router and connect to the internet.
I’d recommend you to take some time to review all the options available on DD-WRT and configure it according to your specific needs, but this basic setup should allow you to use the internet and have basic home networking right away.

Connecting your Samsung TV to stream videos directly from a computer / server

I have had difficulties getting this to work as I wanted to, so I thought it would be good something to write about.

I am using a Samsung LED TV from the 7 Series, but you should be able to use this on other series, just as long as your Samsung TV is able to connect to your home network using either a wired or wireless connection.

 

Your first step should be to get the TV’s MAC address and whitelist it in your router’s firewall. You may skip this if you are not using a firewall.

To get the MAC Address for your TV, press the “menu” button on your remote controller, and navigate through:

Setup –> Network –> Network Test

The MAC address will be displayed as the Network Test starts.

Once you’ve whitelisted the MAC address, download Samsung PC Share Manager.

I have no idea why, but the software is extremely hard to find online, even though it’s free and it’s bundled with most Series 6 and Series 7 TVs, so for that reason I have made it available for download. Click here to get it.

 

Install PC Share Manager and start the application.

Navigate through:

Share –> Set Device Policy

Select your TV’s IP Address (it will be listed as a TV) and click toggle the Policy button to Accept. You can then close that menu and return to the main screen.

 

Then, navigate through:

Share –> Share Folder

Select the folder you want to share with the TV and close the menu box by clicking on the Accept button. Repeat the process for all the folders you want to have available on your TV.

(You cannot share individual files)

 

Once you have added all the folders you want to share on the TV, navigate through:

Server –> Server: On

You will have enable or disable the server. Select “On” to connect to the TV. You may also want to make sure the option “Run Digital Media Server when Windows Starts” if you want to share the folders on a permanent basis (for media servers),

 

Finally click on:

Share –> Refresh DB

The database will now synchronize. This will take a while.

Once the process is complete, you should be able to browse your videos through your TV.

Using Windows’ “hosts” file to avoid downtime when switching web hosts

I do have a lot of people asking me what’s the best way to transfer their website from a web host to another without any downtime. While I think this is almost impossible (at least coherently and without anyone noticing it), there are a few tricks that you can use to minimize the downtime.

One of them is to use the Windows HOSTS file to prepare everything at the new web host.
The HOSTS file, is a basic text file that allows you to override your DNS server settings. By having a web address in there, you will make your PC ignore any DNS Resolution (it won’t even try to resolve the address) – Instead, it will use the IP Address you supply in the HOSTS file.

Think of that file as a “God Mode” in DNS.
Whatever you wrote there, will be the absolute path for a given domain name.

So, when you’re moving to a new web host this becomes handy, because you can simply make your PC resolve your URL to the new web hosts’ IP address, without having to change your domains’ nameservers. The advantage here is that you will be able to preview your site *exactly* as it will be functioning at the new location without risking a DNS change; along with its side-effects if it goes wrong (having to change it back to the previous host because it’s not working as expected, etc).

 

So let’s say you’re moving from WEBHOST1 to WEBHOST2.
The very first thing you must do is to find out your website’s new IP address.

This is an information that is usually sent to you by the new web hosting provider through a “Welcome Email” along with other useful technical notes about the new account. If this isn’t the case, simply ask your web host (WEBHOST2) what your IP address will be.

Once you have that information, you can move on to the next step – editing the HOSTS file.
By default, on a standard setup; the HOSTS file is located at the following location:

Windows 95, Windows 98 and Windows ME: C:\Windows\Hosts
Windows NT/2000: C:\WINNT\system32\drivers\etc\hosts
Windows XP: C:\Windows\system32\drivers\etc\hosts
Windows Vista and Windows 7: C:\Windows\System32\drivers\etc **

 

** Under Windows Vista and Windows 7, you will need to open this file using the option “Run as Administrator” in order to prevent issues when saving your file. (you won’t be able to save the modified file if you do not use this option)

Since this file has no extension, you will most likely be asked which program to use to deal with the file. Select NOTEPAD or WORDPAD as an alternative.
Once you open it, you should have the following (or at least similar) text:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host
 
127.0.0.1 localhost

 

On Windows Vista/Windows 7, you might be missing the 127.0.0.1 entry.
This is because both Operating Systems do not need such line there, the localhost entry is handled by the DNS client directly.

You will instead see a few extra lines replacing the first entry, such as:

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost

Moving on, let’s say your domain name is “myblog.com” and your new web hosting IP address is 74.74.74.74 – where is the entries you would need to add to this file:

 

74.74.74.74 myblog.com

74.74.74.74 www.myblog.com

So, to summarize, you would have a file similar to this one:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

74.74.74.74 myblog.com

74.74.74.74 www.myblog.com

This will order your PC to not even try to resolve the domain name, but to use the IP you specified instead. Once you save this file, your domain should start to point to the new IP immediately. If you want to make sure it’s happening, a good way to do it is by performing a PING test on your domain.

To do so, just open a new Command Prompt window (by going to Programs/All Programs –> Accessories –> Command Prompt), and typing the following command:

ping www.myblog.com

Then wait for the output. If you get the new IP address, that means you’re ready.
Upload your website to the new host, restore any databases you need to have working and test it on your PC. The best part is that no one will notice any flaws on the new host – only you will be able to see them, as the rest of the world will still be using the current/old host to retrieve your content.

Once you’re fully satisfied with what you see on your domain, you can safely change your nameservers (pointing them to the ones you have been provided by WEBHOST2) without risking anything – because you have tested it all beforehand.

IMPORTANT NOTE:  Once you are satisfied with the results and are ready to change the nameservers, make sure you remove those 2 lines from your HOSTS file. You will no longer need them, and having them there can cause problems in the future (for example if for any reason your web host has to change your IP address… This seems unlikely but it isn’t. There are many valid reasons to change your IP, such as installing a SSL Certificate!)

D-Link DIR-600 Quick Setup Guide and Micro Review

 

Alright,

Today I decided to review one of my latest routers, the D-Link DIR-600.
The DIR-600 is a small and nice-looking router.

But the looks are not everything.
Just like most of the home-network routers (a.k.a. cheap routers), you will find annoying bugs on it and probably complain about reliability (you will).

Let’s look at its packaging.

Main Box

Box Set

The DIR-600 is bundled with a regular 2M CAT5E ethernet cable (up to 100mb/s).
The box pictures are of my own, and as you can see I haven’t even untied the cable.
This is because my home is fully wired with CAT6 cable, which allows up to 1 Gb/s.

D-Link DIR-600 Inside

Inside the box, below the manuals

Make no mistake, though. This router does NOT allow you to reach such speed.
I only recommend wiring with CAT5E if you have a (very) tiny budget.

CAT6 is the future and it is backwards compatible so it makes sense to do this, as you might get a CAT6 router in the near future. (You can already get one for less than $100)

Moving on: setting up the D-Link DIR-600 is pretty straight forward.

  1. Connect your xDSL or Cable Modem to the WAN port on the router (skip this if you are going to use it as an Access Point)
  2. Using the supplied (or not) ethernet cable, connect your computer to the router’s LAN1 port.
  3. Run the installation CD and follow the On-Screen instructions.

After the installation/setup completes, you will be able to log into the router’s administration panel by pointing your browser to http://192.168.0.1/.
By default, your username is “admin” and no password is assigned, so just leave the password field blank and click on the “Log In” button.


Advanced Setup

I rarely recommend you to keep the basic settings, so here’s what I recommend you to do:

  1. Log into the router by pointing your browser to http://192.168.0.1/ (again, the username is admin and the password should be blank by default)
  2. Click on “Manual Internet Connection Setup” (see screenshot below)
  3. This will bring you to the Internet Connection options page.
    Try to replicate the settings below.

    D-Link DIR-600 Internet Options

    Internet Connection Options

    The main changes you will be doing are:

    » Adding a Hostname (I used DIR-600 but you can use anything else)
    » Using Google’s Public DNS Servers (this is totally optional but I do recommend it)

    After that, Save your settings by clicking on the “Save Settings” button.

  4. Click on the “LAN Setup” link in the left sidebar. Scroll the page down until you find the “DHCP Server Settings” section.
    Make sure that your DHCP Server is enabled, and set the DHCP Lease Time to 14400 (at least).Now here comes a scary part for rookies. Find out your MAC address.
    This is actually easy, just follow these instructions (the Windows XP instructions also work on Windows Vista/Windows 7).
  5. Now that you have your computer’s MAC Address, scroll down the “LAN Setup” page.
    Under “DHCP Reservation”, enter your computer name, select an IP for it (an example would be 192.168.0.2) and the MAC Address.IMPORTANT: Make sure you check the no-label/no-name checkbox. This is actually the box to enable that specific rule.
    Repeat this for all your computers (or at least the ones you intend to connect-to the most).Save your settings.
  6. Click on “Wireless Setup”. If you do not intend to use WPS, I suggest disabling it.
    Try replicating the settings below.

    D-Link DIR-600 Wireless Setup

    Wireless Setup

    I recommend hiding your SSID, just like you see on the screenshot. In terms of security this is technically useless,  but at least it won’t broadcast your network name and basic settings to everyone in your street with a good wireless card.

    Make sure you select a good WPA key.
    If you need to generate a network key, I recommend using Wireless Key Generator.

    Make sure you print your password and store it in a safe and easy to remember place.
    Or, just save it as an encrypted text file on your computer.

    You will need this key everytime you need to attach a new wireless device to your network, so forgetting or losing the password will inevitably force you to reset the WPA key on the router (which in turn means you will have to reconfigure every device all over again to use the new key).

    Save your settings and configure your Wireless Devices with your WPA Key.

  7. Do not forget to pay a visit to the Time Settings. Make sure everything’s correct to avoid issues in the future – and start browsing!

This should cover the basics.
I have been using this router on my home, together with an ASUS WL-520GU (acting as an access point amd print server).

So far, the issues aren’t overwhelming but I reckon this router could be better.
Here’s the list of small (but annoying) issues that I have had with it:

  1. DNS Timeouts when using the DNS Relay option (resolved by using Google’s Public DNS Servers)
  2. DHCP Server Timeouts when connecting or requesting a new IP address (Resolved by using Static IPs)
  3. For some reason my PS3 does not like this router. It would never get an IP from DHCP when connected via Ethernet. (Resolved by setting up a Manual IP on XMB)

Apart from those issues, the router works pretty well and it does handle traffic smoothly.
Still, I cannot recommend it for the “regular joe”; because the issues I have had would have been literally a nightmare for new and inexperienced users (I can see most of them just returning it).