Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some Windows 7 clients that connect via PPTP to a CentOS server, but I would like them to use a port other than 1723 for the control connection as that port is not available.

Is there some way to do that? Possibly by altering routing / firewall rules of the client & server?


So i have not had the opportunity to try it, but would something this work?

iptables -t nat -A PREROUTING -p tcp --dport [port i can use] -j DNAT --to-destination

I still have nothing for the windows side of it.


So i tested the thing harry suggested, in combination with the iptables rule..

When changing the registry value and restarting, i can no-longer connect to regular pptp servers, so i would assume that it is altering the port but i have no way to know for sure, because when i'm using the modified registry value in conjunction with the iptables rule the connection just times out, or says "busy"..

So basically i have no idea how to test and debug the connection. I might try setting up a linux host on a VM and see if i can play around with doing it just on my local machine before upgrading to the larger scope.

share|improve this question
up vote 2 down vote accepted

For Windows, you may try in regedit to search for TcpPortNumber and change its value from 1723 to the new port number, then reboot. In my computer this is found in :


Ensure you are using CurrentControlSet rather than CurrentControlSet01 or another variant.

Some information about these items may be found in the old Windows CE documentation for PPTP Registry Settings, but it might now be depreciated.

share|improve this answer
Could this be in a different location on any computer? i searched and found it in a totally different area. – caesay Feb 15 '12 at 3:33
Yes, the location depends on your version of Windows and your card. – harrymc Feb 15 '12 at 10:24
mr harrymc: in vista,i can find TcpPortNumber in the registry,but in win7,i cannot find TcpPortNumber in the registry.what to do? – fisherman Mar 6 '13 at 16:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .