Internet Connection Sharing (ICS) Configuration in Windows 7

Before you start

Objectives: Learn how to enable and configure ICS in Windows 7.

Prerequisites: you should already know what is ICS in general.

Key terms: network, computer, ICS, connection, Internet, private, enable, server, address, IP, port, settings, Windows 7


 How to Enable ICS

The computer on which we want to enable ICS has to have two network connections. One network connection has to be connected to the public network (Internet), and another connection has to be connected to our private network (LAN). To manage network connections on Windows 7, we can go toControl Panel > Network and Internet > Network Connections. In our case, on our computer we have two Network Interface Cards which provide two network connections. One connection is called โ€œInternetโ€, and another is called โ€œLocal Area Connectionโ€.

1 Connections

Connections

So, we want to share our Internet connection from this computer with other computers which are located on our LAN. Internet connection is typically connected to a cable modem, a DSL modem, etc. Local Area Connection is typically connected to a Switch on our local (private) network. On that Switch we will typically have other computers connected.

 ICS Diagram

Example Schema

To enable ICS, we will select our Internet connection, go to its properties, and select the Sharing tab. Here we will select the โ€œAllow other network users to connect trough this computerโ€™s Internet connectionโ€ option. This will basically enable ICS on this computer. In our case we will uncheck the โ€œAllow other network users to control or disable the shared Internet connectionโ€ option.

 Sharing

Sharing Tab

If we click the Settings button, we will be able to control some basic firewall settings. This way we can quickly enable some basic services that we want to be accessible from the Internet trough our ICS computer. As you can see, when we enable ICS, our computer starts to act as a router and a NAT device.

 Advanced Settings

Advanced Settings

For example, letโ€™s say that we have a web server on our private network and that we want to make it publicly accessible. The host name of the web server is โ€œweb-serverโ€. To configure this, we will select โ€œWeb Server (HTTP)โ€ from the list of services and click the Edit button. We will enter the name of the computer โ€œweb-serverโ€. We could also enter the IP address of the computer.

 5 Web Server

Web Server Port Forwarding

Notice that other settings canโ€™t be changed (port is 80). Note that we can only do this for one computer on the same port. This is considered port forwarding. We can add other or the same services, but they have to use different ports. With this configured, when someone on the public network tries to access our public IP address together with the port 80, that request fill be forwarded to the โ€œweb-serverโ€ computer on our private network.

When the ICS is enabled, our network connections will automatically be configured with some specific settings. First, the Local Area Connection will be configured with the 192.168.137.1 IP address. With ICS, our computer automatically becomes the gateway for computers on our private network, and the gateway address will be the address of the LAN interface of the ICS computer. ICS computer will also start to hand out IP addresses and other information to computers on our private network (it will become the DHCP server). This is why it is important that the computers on the private network are DHCP enabled. We can use commands โ€œipconfig /releaseโ€ and โ€œipconfig /renewโ€ to obtain new configuration from the ICS server. If we see an IP address which starts with โ€œ169.254.โ€, this means that the computer was not able to contact the DHCP server.