change default PPTP TCP port

Is there a way to make pptpd listen for PPTP trafic on a TCP port other than the default 1723 port?
I khow that PPTP uses more then just tcp/1723. It also uses GRE. it's not a problem. just how to change default PPTP TCP port.
And how to configure pptp client on linux to use port other than the default 1723 port I use pptpd on debian.


My understanding of poptop (the pptpd server) is that you are unable to specify a port number for the server without patching the source and recompiling.

Having a look over the source seems to suggest similar

[welby@blackpudding pptpd-1.3.4]$ fgrep PPTP_PORT -R .
./pptpmanager.c:                address.sin_port = htons(PPTP_PORT);
./pptpdefs.h:#define PPTP_PORT                  1723

As you can see it is defined in pptpdefs.h - and as such in order to change this port - you would have to recompile.

It may be possible on the server side to preform an IPTables src-nat to accept connections on another port and redirect this - however I would suspect that the client would still need to be updated.

Is there a requirement to only use PPTP as if other VPN solutions are acceptable you may find openvpn lends its self to your needs better


Clien is easy: edit /etc/openvpn/openvpn.conf add port 7654 if it's not already there (but it should be). The server is also easy because you can't (unless you edit the source code).