Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've PPTP on Ubuntu, and want to change the default listening port, but apparently there's no option to do this. Is there another VPN service that i can install and configure and change to any port i want?

share|improve this question

OpenVPN will let you change ports on server side and if you want on client side too (not very used). In this example config file you can see the port 1194 line and you can define the port you want instead.

Probably other VPN servers too but I don't know any of them sufficient to answer that.

share|improve this answer

As long as what matters is that the control connections are received on a different port, and not that you need to have something else listening on port 1723, you can redirect incoming connections from another port.

iptables -t nat -I PREROUTING -p tcp --dport 31723 -j REDIRECT --to-ports 1723

However, if you need to change the port, PPTP may not be the best tunnel for you. PPTP can be tricky to get through firewalls, if that's your problem. PPTP itself does not deal with authentication or encryption, so if you want any form of security (controlling who uses the VPN, protecting against eavesdroppers and hijackers), you'll need to set it up either through a PPTP extension or at some other layer of the network stack.

A popular choice for VPNs over the Internet is OpenVPN Install OpenVPN. It is fairly easy to set up, even under Windows, and you can configure it to listen over UDP for performance or over TCP for firewall friendliness. You can even share port 443 between OpenVPN and a web server.

share|improve this answer

Your Answer


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.