Create a PPTP VPN connection on Fedora 9
In many companies, they use Windows PPTP VPN servers because they are easy to set up. However, there isn’t a native support for this protocol in NetworkManager. Ever wondered how to create a PPTP VPN with Fedora 9? It’s actually not that complicate once you know how to do it.
First of all, switch to user root and install the pptp package, which provides all the tools needed to create a PPTP VPN connection:
su -
yum install pptp
Now create a configuration file for your connection in /etc/ppp/peers. You can give it the name you want, we’ll call it myvpn.
vim /etc/ppp/peers/myvpn
In this file, insert all the configuration options to create a persistent connection. Replace VPN_URI with an URL or IP address of your VPN server, USER with your VPN username and set the connection name you want with remotename directive. Read man pppd for further options:
pty "pptp VPN_URI --nolaunchpppd" require-mppe-128 persist maxfail 0 name USER remotename myvpn file /etc/ppp/options.pptp logfile /var/log/vpn.log
Now you need to set the login information needed by your CHAP-based VPN:
vim /etc/ppp/chap-secrets
Insert your username and password in this file, before the (begin) line, in the form:
USER remotenane password
Then you’re done if you connect to an MSCHAP-2 server, simply type:
pppd call myvpn
You can watch the /var/log/vpn.log file for help if it doesn’t connect, and ifconfig to see if it has successfully established a connection. You may have to alter routes depending on your network configuration, but the link is established now. To disconnect, type:
killall pppd (there is probably a more elegant solution)
It may display some junk on your screen during some seconds, but it will disconnect after that.