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.
- 143
3 Answers
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
- 351
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).
- 1,735
Its a bit late, but I'll post anyway. There was a forum post somewhere I was just reading that says to add a line in at /etc/services, called pptp. just specify the port you want after that and you should be good.
Note: I have not tested this to be correct
"so my line would state pptp [tab][tab]1723/tcp because default is 1723
- 21