How can I change the port that a service uses?

A. Changing the port that a service uses depends heavily on the service. For example, you can set HTTP's port with the Internet Service Manager (ISM).

As a general rule, you can change the port by changing the %systemroot%\system32\drivers\etc\services file with a text editor (e.g., Notepad). For example, to change the port SNMP uses, open the file and modify the following lines:

snmp 161/udp #SNMP
snmptrap 162/udp snmp-trap #SNMP trap

Change 161 and 162 to the ports you want to use, and save the file. You must restart the computer for the change to take effect.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish