Microsoft KB Archive/231162

= How to Map a Port in ICS Using an .inf File =

Article ID: 231162

Article Last Modified on 1/24/2007

-

APPLIES TO


 * Microsoft Windows Millennium Edition
 * Microsoft Windows 98 Second Edition

-



This article was previously published under Q231162



SUMMARY
This article describes how to create a new port mapping for Internet Connection Sharing (ICS) by using an .inf file. The .inf file adds additional port mappings to direct incoming IP packets through a specific UDP or TCP port or to a specific client address. Certain Internet programs may require a specific port to be reserved for their use. This information should be provided by the manufacturer of the program.

If port addressing information is stored within the data section of a TCP or UDP packet used by a particular program, an editor is required and this .inf file will not facilitate the program's functionality with an ICS host. In these cases, the ICS host should be disabled and the program should run on a computer directly connected to the Internet.

Although Microsoft provides this informational article for the convenience of its customers, Microsoft Product Support Services does not provide support for the use or editing of the .inf file in this article.

NOTE: This article is for informational use only. It does not contain any troubleshooting information. If you are searching for troubleshooting information that is not mentioned in this article, search the Microsoft Knowledge Base again by using keywords that are listed in the following Microsoft Knowledge Base article:

242450 How to Query the Microsoft Knowledge Base Using Keywords



MORE INFORMATION
You can create the base contents of the .inf file by copying or typing the information below into a new file. After the .inf file is created, you can right-click the file and then click Install.

NOTE: Each entry that starts with a semicolon is a comment. These lines can be removed. They are provided to describe each line. The computer must be rebooted for the registry values added by this .inf file to take effect. This .inf file should be used only on the computer running ICS.

Sample .inf File
NOTE: Setup information (.inf) files use "HKLM" as an abbreviation for the "HKEY_LOCAL_MACHINE" registry hive. [version] signature="$CHICAGO$"

[DefaultInstall] AddReg=PortSample

[DefaultUnInstall] DelReg=PORT_SAMPLE_DEL_REG
 * This section included for ease of removing any maps added in.
 * To uninstall, type the following line:
 * rundll.exe setupx.dll,InstallHinfSection DefaultUnInstall 0
 * YOUR_INF_FILE_NAME
 * YOUR_INF_FILE_NAME

[PortSample]
 * MYMAPNAME should be replaced with a friendly
 * descriptive name that is unique.
 * This data points to the computer that is running the service.
 * 0.0.0.0 represents the computer running the ICS services. This
 * can alternatively contain the IP address of one of the ICS client
 * computers.
 * computers.

HKLM,%ICSACTIVE%,MYMAPNAME,,"0.0.0.0" HKLM,%ICSINSTALLED%\MYMAPNAME


 * "My Friendly Name" should be replaced with something short and
 * descriptive such as the name of the program that needs these ports
 * open.

HKLM,%ICSINSTALLED%\MYMAPNAME,Name,,"My Friendly Name"


 * Options is a DWORD value and is currently always set to 00,00,00,00

HKLM,%ICSINSTALLED%\MYMAPNAME,Options,1,00,00,00,00


 * The next four lines describe the specific ports that need to be open
 * or mapped. The first port is always 0000, each additional port is
 * incremented (the second port to open would be listed as 0001,
 * the third would be 0002, and so on). This information is strictly
 * dependent on what is needed by the program. If you do not know what
 * ports your program requires or are unsure, you need to contact the
 * manufacturer of the program to get this information.
 * The four lines need to be re-created for each port.
 * On the second line, valid entries for type are "TCP" or "UDP."
 * The third line contains the actual port or port range needed by the
 * program.
 * The entry below demonstrates a port range. If the program only needs
 * a single port, the last part of the line below would read ,Port,,"5678"
 * Note that you can only use a port range when the translation type is
 * NORMAL or BLOCK.
 * If Translation is set to anything else, you must list each port
 * individually.
 * Valid types of translation are NORMAL, BLOCK, CUSEEME, DPLAY, FTP,
 * H323, PPTP, and QUAKE
 * NORMAL or BLOCK.
 * If Translation is set to anything else, you must list each port
 * individually.
 * Valid types of translation are NORMAL, BLOCK, CUSEEME, DPLAY, FTP,
 * H323, PPTP, and QUAKE
 * Valid types of translation are NORMAL, BLOCK, CUSEEME, DPLAY, FTP,
 * H323, PPTP, and QUAKE

HKLM,%ICSINSTALLED%\MYMAPNAME\0000 HKLM,%ICSINSTALLED%\MYMAPNAME\0000,Type,,"TCP" HKLM,%ICSINSTALLED%\MYMAPNAME\0000,Port,,"5678-5679" HKLM,%ICSINSTALLED%\MYMAPNAME\0000,Translation,,"NORMAL"

[PORT_SAMPLE_DEL_REG] HKLM,%ICSINSTALLED%\MYMAPNAME HKLM,%ICSACTIVE%,MYMAPNAME

[Strings] ICSINSTALLED="System\CurrentControlSet\Services\ICSharing\Mappings\Installed" ICSACTIVE="System\CurrentControlSet\Services\ICSharing\Mappings\Active"

Additional query words: dun kbwinme kbdialup

Keywords: kbenv kbhowto KB231162

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.