Change PPTP control connection's TCP port number

25,214

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 :

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0001

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:
25,214

Related videos on Youtube

abond
Author by

abond

I'm in a committed relationship with good code, so if we go out it will only be as friends. Feel free to contact me by email at mk.stackexchange<a>caesay.com

Updated on September 18, 2022

Comments

  • abond
    abond over 1 year

    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?

    EDIT

    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 127.0.0.1:1723
    

    I still have nothing for the windows side of it.

    EDIT #2

    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.

  • abond
    abond about 12 years
    Could this be in a different location on any computer? i searched and found it in a totally different area.
  • harrymc
    harrymc about 12 years
    Yes, the location depends on your version of Windows and your card.
  • fisherman
    fisherman about 11 years
    mr harrymc: in vista,i can find TcpPortNumber in the registry,but in win7,i cannot find TcpPortNumber in the registry.what to do?