Modifying Gopher Ports

For most installations of Internet Information Server, you keep the Gopher server port number set to the default 70 to allow other Gopher clients access to your site. However, if you want to limit access to your Gopher server, you can change the control connection (port 70) to a port number greater than 1023 to "hide" your site.

You can change Gopher server port numbers by modifying the Systemroot\System32\Drivers\Etc\Services file or by modifying their values in the Registry. The setting in the Services file takes precedence over the Registry setting in all cases. By changing the Services file or the Registry, you affect only the Gopher server.

Note

By changing the port number, you can break some or all of your tags and links. You must rebuild these by using the -p option of the gdsset command to change the port number. For example, if you change the port number to 2345, you rebuild the new tag by typing the following line:

gdsset -c -g0 -f "The Mission of this Gopher Site" Readme1.Txt -p2345

To change the Gopher port in the Services file

  1. At a command prompt, change directories to Systemroot\System32\Drivers\Etc.
  2. Use a text editor to search the Services file for the following entry.
  3. gopher 70/tcp

  4. Modify port 70 to a number greater than 1023 and add a comment (#) to show the default. For example, if you change to port 2345, add the following line.
  5. gopher 2345/tcp # gopher 70/tcp

  6. Save and close the file.
  7. To implement the change, stop then restart the Gopher service.

Note This affects the default ports on the Gopher server.

Your Gopher server now waits at port 2345 for all Gopher client requests.

To verify the new Gopher port settings

  1. Start Internet Explorer. In the address box, type gopher://127.0.0.1 and then press Enter.

The following message appears.

The attempt to load 'gopher:127.0.0.1' failed.

  1. Click OK to dismiss the message.
  2. In the address box, type gopher://127.0.0.1:2345 and then press Enter.

The Gopher menu appears on your screen.

To change the Registry entry for Gopher

  1. Start the Registry Editor, Regedt32.exe.
  2. Click the HKEY_LOCAL_MACHINE window and locate the following key.

\System

\CurrentControlSet

\Control

\ServiceProvider

\ServiceTypes

\GOPHERSVC

  1. Click GOPHERSVC and then double-click the TcpPort value.
  2. The DWORD Editor dialog box appears.

  3. Click Decimal and enter 6789 in the Data box.
  4. Click OK and close the Registry Editor.
  5. At the command prompt, type the following information:
  6. cd %systemroot%\system32\drivers\etc
    ren services services.ok

    This step prevents the Gopher server from using the port address in the Services file after it has been restarted.

  7. To implement the change, stop and restart the Gopher server.

Note This affects the default port only on the Gopher server.

Your Gopher server now monitors port 6789 for all Gopher client requests and your Gopher client connects to a Gopher server at port 6789 only.

To verify the new Gopher port settings

  1. Start Internet Explorer. In the address box, type gopher://127.0.0.1 and then press Enter.

The following message appears.

The attempt to load 'gopher:127.0.0.1' failed.

  1. Click OK to dismiss the message.
  2. In the address box, type gopher://127.0.0.1:6789 and then press Enter.

The Gopher menu appears.