Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

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

share|improve this answer
1  
"It may be possible on the server side to preform an IPTables src-nat to accept connections on another port and redirect this" Could you explain how that would be possible? / provide an example? –  caesay Feb 16 '12 at 6:51
add comment

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).

share|improve this answer
    
Is it possible to use pptp client instead of openvpn client? In another words how to change pptp client default port? –  ir01 Jan 1 '12 at 14:54
add comment

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

share|improve this answer
    
Posting an answer that you found in a forum somewhere and haven't tested... thanks for the effort, but it's of doubtful value. –  Andrew Schulman Feb 4 at 1:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.