Creating a VPN Connection to a Remote Windows Server
From MEPIS Documentation Wiki
!!! Warning! The info contained in this article pertains to older versions of MEPIS !!!
First, use Synaptic to download and install pptpconfig. Then create a shortcut to the pptpconfig application. The reason for this is that you must run it as root. It will start up as a normal user, but will not save any configuration changes you make.
To create the shortcut:
Right click the desktop and go Create New --> File –-> Link to Application. Type over the “Link to Application" title with VPN or some other title you feel happy with. Go to the Application tab and type pptpconfig in the command line. Click the “Advanced Options" button and tick the “Run as a different user" box and put in root as the username. When you click the shortcut it now will ask for your root/su password. Type in the password and then the pptpconfig window opens up.
On the Server tab, in the "Name" field, put a name for the connection you are setting up (Company name or something like that). In the "Server" field type in the IP address of the remote Server you want to connect to. This is the WAN IP, not the internal IP of the Server. I generally leave the domain name field blank. In the "username" and "password" fields type in the account details you use for making the connection. On the Routing tab change the default from Client to LAN to Lan to Lan. Now click the “Add" button and the Server details will appear in the upper half of the pptpconfig window.
Now go to the routing tab. This part may be tricky, since you need to know how the network administrator has configured the VPN network. In general, the VPN net will have a network address in one of the following ranges:
10.0.0.0 to 10.255.255.255
172.16.0.0 to 172.31.255.255
192.168.0.0 to 192.168.255.0
You need to setup the VPN in such a way that it ONLY routes relevant traffic through the encrypted tunnel. All other traffic should be left untouched, so that you can still connect to the internet. You therefore need to know which address range is used, and which mask should be applied. For more info on this, see Wikipedia.
Example If you need to connect to a network in the range 192.168.0.0 to 192.168.0.254
- click on the routing tab - click Edit Network Routes - in the network field, type 192.168.0.0/24 - give a name to identify the network, e.g. WorkVPN - click Add and then Close - Click on the Update button to make sure the routing configuration is stored correctly.
Starting the connection:
Either right click the Server details and click “Start", or just click the “Start" button. A pptpconfig tunnel window will appear detailing the connection being made. Should only take seconds and the details shown will be something like the following (IP details have been altered here, yours may vary):
Using interface ppp0pptpconfig: monitoring interface ppp0
Connect: ppp0 <--> /dev/pts/3
kernel does not support PPP filtering
MPPE 128-bit stateless compression enabled
Cannot determine ethernet address for proxy ARP
local IP address 188.8.131.52
remote IP address 184.108.40.206
primary DNS address 220.127.116.11
secondary DNS address 18.104.22.168
pptpconfig: pppd process exit status 0 (started)
ip route add 22.214.171.124 via 192.168.7.1 dev eth0 src 192.168.7.2
pptpconfig: routes added to remote networks
ip route replace default dev ppp0
pptpconfig: default route changed to use tunnel
pptpconfig: DNS changes made to /etc/resolv.conf
You are now connected to your remote Server. To end the connection just click on the “Stop" button.