As others have pointed out, changing the port number does not offer you much security.
I'd like to add that changing the port number may actually be detrimental to your security.
Imagine the following simplified scenario. A cracker scans 100 hosts. Ninety-nine of these hosts have services available on these standard ports:
But then there is one host which stands out from the crowd, because they the system owner tried to obfuscate their services.
Now, this might be interesting to a cracker, because the scan suggests two things:
- The owner of the host is trying to hide the port numbers on their system. Perhaps the owner thinks there is something valuable on the system. This may not be a run-of-the-mill system.
- They chose the wrong method to secure their system. The administrator made a mistake by believing in port obfuscation, which indicates that they may be an inexperienced administrator. Perhaps they used port obfuscation in lieu of a proper firewall, or a proper IDS. They might have made other security mistakes as well, and might vulnerable to additional security attacks. Let's probe a little further now, shall we?
If you were a cracker, would you choose to take a look at one of the 99 hosts running standard services on standard ports, or this one host which is using port obfuscation?