How to change default port for PPTP VPN?

By default, PPTP VPN is running on port 1723, how can I change default service port for PPTP VPN as it’s not supported by its configuration file?

To change port for PPTP VPN, we need to follow unusual ways. Here we will show you 2 ways on how to change PPTP VPN service port.

Way 1: Modify its /etc/services to redeine PPTP service

You can just edit /etc/services and reset 1723 to any other port you like,

hks-lm           1722/tcp
hks-lm           1722/udp
pptp             1723/tcp
pptp             1723/udp
csbphonemaster   1724/tcp
csbphonemaster   1724/udp

Then restart PPTPD service to make the change take effect.

Way 2: Use iptables to redirect a port
If you are running TCP mode, you can redirect a port like this,

iptables -t nat -A PREROUTING -p tcp --dport 11723 -j REDIRECT --to-ports 1723

This will make the service available at TCP port 11723 as well.

Good luck!

Share Button

Leave a comment

Your email address will not be published. Required fields are marked *