Search in uioop.blogspot.com

Blog Archive

Tuesday, July 31, 2007

How to troubleshoot Internet Connection Shariang Problems

http://support.microsoft.com/kb/q238135/

Block access to Web sites with the Route command in Windows XP!

http://www.internetfixes.com/weekly_news_letters/windowsXP/windows_xp_17.htm

If there are specific Web sites you want to prevent users from accessing, you could use Internet Explorer's Content Advisor or invest in a third-party solution to block access. But you can also block access to specific Web sites using the Route command to modify the route table.

When you type an Internet address into the browser, Windows XP uses the local route table as a network map to determine where to send the packet. In most cases, the route table directs the packet to the gateway, which then sends it out to the Internet.

However, you can configure the route table to send packets addressed to a certain Web site to a dead end. The result makes it appear as if the site doesn't exist.

To begin, you need the IP address of the Web site to which you want to block access. You also need an unassigned IP address within your local subnet that isn't in use by any computer or device.

For example, let's say that the IP address you want to block is 100.100.100.100, and an IP address on your local subnet that isn't in use is 192.168.100.51. Modify the route table with the following command:

Route -p add 100.100.100.100 mask 255.255.255.255 192.168.100.51

Wednesday, July 25, 2007

HOWTO: Get Instant Access to the HOSTS file

http://www.allthingsmarked.com/2007/05/01/howto-get-instant-access-to-the-hosts-file/

The HOSTS file is a file used to map IP addresses to domains. There are many uses for it — my favorite it to block ad servers. The HOSTS file has no extension, so you can’t associate a program with it automatically to open it all the time. Instead, you can create a shortcut that calls a text editor of your choice to open it.

Create a desktop shortcut with the following program path to open the HOSTS file in Notepad:

notepad "c:\windows\system32\drivers\etc\hosts"

Create a desktop shortcut with the following program path to open the HOSTS file in WordPad:

"c:\program files\windows nt\accessories\wordpad.exe" "c:\windows\system32\drivers\etc\hosts"

If you want to auto-open it in any other editor, just change the first path to the program editor’s main executable.

Once you have your shorcut, rename it to hosts and drop it in C:\windows\ so you can run it from the Run box by entering in hosts and hitting enter

HOWTO: Block websites using the HOSTS file

http://www.allthingsmarked.com/2006/08/28/howto-block-websites-using-the-hosts-file/

Blocking ad servers and malicious websites is a tough task these days. There are so many tools out there to keep ads blocked, remove spyware, and scan for viruses. Most of this unwanted content comes from known ad servers and known malicious websites. You can harness the power of the Windows’ HOSTS file to actually block some of this stuff. I’ve been doing this for years, and I’m still surprised how well it works.

In a nutshell
For your version of Windows, the HOSTS file is located in

Windows XP:C:\WINDOWS\system32\drivers\etc\

Windows 2000:C:\WINNT\system32\drivers\etc\

Windows 98/ME:C:\WINDOWS\

It does not have an extension — it is just called hosts. The purpose of the HOSTS file is to allow you to manually enter IP addresses associated with websites, so the DNS server can quickly resolve an address. Say you know that google.com is the IP address 64.233.187.99 — you could enter that into the HOSTS file so when your machine requests google.com, it will immediatly know to go to http://64.233.187.99/. Instead, we can take known ad servers, and tell them their IP addresses are 127.0.0.1. For those of you that don’t know, 127.0.0.1 is your local machine, if you were running a server on it. So say, some ad server hosts a banner ad at http://www.adsite.com/ads/23bh3.jpg. If you redirect this server to your lcoal machine in the HOSTS file, when a website calls that hosted image from the ad server, it will try to load http://127.0.0.1/ads/23bh3.jpg. Since that folder and that image don’t exist on your computer, the image won’t show, and you’ve blocked the ad from showing on that website.

Putting it together

This first line of the HOSTS file should list the local IP address:

127.0.0.1 localhost

That tells the rest of the file, 127.0.0.1 is your local machine, like I explained above. You could also use 0.0.0.0 instead of 127.0.0.1 — either will work, but whatever you use for localhost, use below. After that, enter known ad servers and use your local IP (whichever you chose at the top). You can find maintained HOSTS files online or start to build your own. Here’s a little snippit of what my HOSTS file looks like:

127.0.0.1 localhost
127.0.0.1 92.132.206.rev.adknowledge.com
127.0.0.1 a-con1.adknowledge.com
127.0.0.1 a-lbs.adknowledge.com
127.0.0.1 a-pwr.adknowledge.com
127.0.0.1 a-sw1.adknowledge.com
127.0.0.1 aa1-1.adknowledge.com
127.0.0.1 aa1.adknowledge.com
127.0.0.1 aa2-1.adknowledge.com
127.0.0.1 aa2.adknowledge.com
127.0.0.1 aa3-1.adknowledge.com

Extra step: Windows XP/2000 only

In XP and 2000, the DNS Client (a system service), will make your machine come to a grinding hault if your HOSTS file is too large. This service is unnecessary and can be stopped and disabled. Go to Start > Run > enter “services.msc” then hit [Enter]

Navigate to DNS Client, right-click it, select Properties, under Start-up Type, select Manual. Click Apply. Then below that, click the Stop button. You should do this before you save a large list of servers to your HOSTS file.

Disabling/Enabling the HOSTS blocking

If you ever need to disable the blocking, just rename the hosts file to anything. I usually rename it to hosts.disable. After you do that, you need to restart your browser to see the changes. To enable it again, just rename it back to hosts.

You could also write a script to do this for you. An example called disable.bat:

cd C:\WINDOWS\system32\drivers\etc && ren hosts hosts.disable

And another example called enable.bat:

cd C:\WINDOWS\system32\drivers\etc && ren hosts.disable hosts

More info about HOSTS

To get a HOSTS file already full of servers, you may go to MVPs.org. To learn more about the HOSTS file, check this site out; it’s where I learned about it. Also, I posted this tip a while back, at Of Zen and Computing.

Friday, July 20, 2007

HOWTO get a wireless router talking to your ADSL router.

HOWTO get a wireless router talking to your ADSL router.

Introduction

So you've had an ADSL router for years and have just acquired a brand new wireless router. You connect the two and find that things don't work at all, or that the behavior is inconsistent. This document describes how to connect these two routers the right way.

The method described here is for networks with two routers - one wireless router and one ADSL router. If you have one device that does both functions, then you shouldn't have any problems configuring the network and therefore wouldn't be reading this ;-). If the wireless router supports bridging and you know how to configure it, that would be a better configuration than what is described here. However, since most (cheap) wireless routers don't support bridging, we'll stick to a method that works on either kind.

Concepts

A router is a device that inter-connects (atleast) two different networks. Its primary function is to forward data from one network to another (when required) and vice-versa. For example, the ADSL router connects the Internet (WAN) to the Local Area Network (LAN). On the WAN, the router is identified by a public (globally unique) IP address assigned by the ISP and on the LAN the router is identified by a private IP address.

When a device on the LAN connects to the Internet, the ADSL router also does something called as Network Address Translation. This enables multiple hosts to share a single upstream connection. To anyone on the outside, all traffic coming from the LAN appears as coming from the globally unique public IP assigned to the ADSL router.

Configuration

Since both our devices are routers, they can only forward data between two different networks. For the wireless router to forward data to the ADSL router, they need to be in two different networks. This network configuration that we'll implement is illustrated in the following diagram -

ADSL Router

The ADSL router connects to the ISP (WAN) and obtains an IP address through DHCP or has an IP statically configured. (We do not change this configuration). Enable Network Address Translation on the ADSL router and enable DNS server (or DNS relay).

On the LAN side, configure 192.168.1.1 as the IP address of the ADSL router (with 255.255.255.0 as the subnet mask) and enable DHCP server so that wired clients can pick up network configuration automatically. Set aside a range of IP addresses for use by the DHCP server in the 192.168.1.x range (say 192.168.1.100-192.168.1.200). In the DHCP server settings, set the DNS server IP as 192.168.1.1 if required.

Wireless Router

In this setup, the wireless router forwards traffic between wireless clients and the ADSL router. As far as it is considered, the ADSL router is its ISP - its connection to the Internet. Configure 192.168.1.2 as its WAN IP address (subnet mask: 255.255.255.0), with the ADSL router as the default route (192.168.1.1). If a DNS server's IP is required, use 192.168.1.1. Disable NAT as it is not needed in this configuration.

On its LAN side, configure 192.168.2.1 as the IP address of the wireless router (subnet mask: 255.255.255.0) and enable DHCP server so that wireless clients can pick up network configuration automatically. Set aside a range of IP addresses for use by the DHCP server in the 192.168.2.x range (say 192.168.2.100-192.168.2.200). In the DHCP server settings, set the DNS server IP as 192.168.1.1 (ADSL router). If this setting is not available, then enable DNS server (or DNS relay) with the same settings as in the ADSL router device.

Configure a ESSID (name) for your wireless network and some form of security and privacy like WEP and configure WEP keys on your wireless router. MAC address filters can also be used to disallow unauthorised use of the wireless network.

Switch

The switch (or a hub) is needed if we have wired clients. If either the ADSL router or the wireless router has additional ports to connect the wired clients, then the need for the switch is obviated. Usually there is no explicit configuration changes needed on small switches.

Clients

Set up clients to obtain IP address and DNS information through DHCP and you should be good to go! Wireless clients need to know the ESSID of the wireless network and the WEP key to be able to talk to your wireless router.

Conclusion

Thats it, your setup should be up and running flawlessly. Do remember to save the configuration on all devices!

Wireless Router Recommendation

The network configuration detailed in this document will work with any wireless router. In any case, here are a few additional features to look for in a wireless router -

  1. Ethernet ports for wired clients - eliminates need for a switch if we have wired clients
  2. Bridging support

  3. ADSL support in the wireless router itself - eliminates the need for a separate ADSL router

AVG Internet Security 2013

Total Pageviews

Contributors