PPTP configuration examples: Difference between revisions

From Teltonika Networks Wiki
No edit summary
No edit summary
Line 1: Line 1:
==Introduction==
==Introduction==


'''Point-to-Point Tunneling Protocol''' ('''PPTP''') is Virtual Private Network (VPN) protocol that uses a TCP control channel and a Generic Routing Encapsulation (GRE) tunnel to encapsulate PPP packets.
'''Point-to-Point Tunneling Protocol''' ('''PPTP''') is a Virtual Private Network (VPN) protocol that uses a TCP control channel and a Generic Routing Encapsulation (GRE) tunnel to encapsulate PPP packets.


This article provides an extensive configuration example with details on how to create a connection between a PPTP Server and Client, both of which configured on RUT routers.
This article provides an extensive configuration example with details on how to create a connection between a PPTP Server and Client, both of which configured on RUTxxx routers.


==Configuration overview and prerequisites==
==Configuration overview and prerequisites==
Line 10: Line 10:


'''Prerequisites''':
'''Prerequisites''':
* Two RUT routers of any type (excluding RUT850)
* Two RUTxxx routers of any type (excluding RUT850)
* A SIM card with a Public Static or Public Dynamic IP address for the PPTP Server
* A SIM card with a Public Static or Public Dynamic IP address for the PPTP Server
* An end device (PC, Laptop, Tablet, Smartphone) for configuring the routers
* An end device (PC, Laptop, Tablet, Smartphone) to configure the routers


----
----
Line 19: Line 19:
[[File:Configuration examples pptp scheme.png]]
[[File:Configuration examples pptp scheme.png]]


The configuration we are trying to achieve here is very basic, as indicated by the figure above. It concerns two RUT routers - RUT1 and RUT2. One functions as a PPTP Server, the other - a PPTP Client. They are connected into a virtual network via a PPTP Tunnel.
As indicated by the figure above, the configuration we are trying to achieve here is very basic: it concerns two RUTxxx routers - RUT1 and RUT2. One functions as a PPTP Server, the other - a PPTP Client. They are connected into a virtual network via a PPTP Tunnel.


==Router configuration==
==Router configuration==


If you have familiarized yourself with the configuration scheme and have all of the devices in order, you can start configuring your routers using instructions provided in this section.
If you have familiarized yourself with the configuration scheme and have all of the devices in order, we can start configuring your routers using instructions provided in this section.


===PPTP Server (RUT1)===
===PPTP Server (RUT1)===
Line 31: Line 31:
Login to the router's WebUI and go to '''Services → VPN → PPTP'''. Select '''Role: Server''', enter a name for the new instance and click the "Add" button:
Login to the router's WebUI and go to '''Services → VPN → PPTP'''. Select '''Role: Server''', enter a name for the new instance and click the "Add" button:


[[File:Configuration examples pptp adding server.png]]
[[File:Configuration examples pptp adding server v2.png]]


----
----
Click the "Edit" button located to the right of the newly created PPTP Server to enter the instance's settings window. The configuration is fairly simple, just remember to '''Enable''' the instance:
Click the "Edit" button located to the right of the newly created PPTP Server to enter the instance's settings window. The configuration is fairly simple, just remember to '''Enable''' the instance:


[[File:Configuration examples pptp server configuration.png]]
[[File:Configuration examples pptp server configuration v2.png]]


The rest of the parameters are user preferential so you should set them as you see fit. A short explanation on these parameters is provided below:
The rest of the parameters are user preferential so you should set them as you see fit. A short explanation on these parameters is provided below:
Line 53: Line 53:
If you plan on using the PPTP Server as a web proxy, you will need to edit one preexisting '''Zone Forwarding''' rule. In the router's WebUI, go to '''Network → Firewall → General Settings''', locate '''pptp''' in the Zone Forwarding table and click the "Edit" button next to it:
If you plan on using the PPTP Server as a web proxy, you will need to edit one preexisting '''Zone Forwarding''' rule. In the router's WebUI, go to '''Network → Firewall → General Settings''', locate '''pptp''' in the Zone Forwarding table and click the "Edit" button next to it:


[[File:Configuration examples pptp proxy server side 1.png]]
[[File:Configuration examples pptp proxy server side 1 v2.png]]


----
----
After this you will be redirected to the PPTP Zone Settings page where you will need to place a check mark next to the '''wan''' destination zone:
After this you will be redirected to the PPTP Zone Settings page where you will need to place a check mark next to the '''wan''' destination zone:


[[File:Configuration examples pptp proxy server side 2.png]]
[[File:Configuration examples pptp proxy server side 2 v2.png]]


After you save the changes your PPTP Server will now also act as a web proxy.
After you save the changes your PPTP Server will now also act as a web proxy.
Line 68: Line 68:
Now let's configure the PPTP '''Client'''. Login to the router's WebUI and go to '''Services → VPN → PPTP'''. Select '''Role: Client''', enter a name for the new instance and click the "Add" button:
Now let's configure the PPTP '''Client'''. Login to the router's WebUI and go to '''Services → VPN → PPTP'''. Select '''Role: Client''', enter a name for the new instance and click the "Add" button:


[[File:Configuration examples pptp adding client.png]]
[[File:Configuration examples pptp adding client v2.png]]


----
----
Click the "Edit" button located to the right of the newly created PPTP Client to enter the instance's settings window. In the settings window, '''Enable''' the PPTP instance, specify the server's '''Public (WAN) IP address''' and the '''client's authentication''' info as specified in the server's configuration:
Click the "Edit" button located to the right of the newly created PPTP Client to enter the instance's settings window. In the settings window, '''Enable''' the PPTP instance, specify the server's '''Public (WAN) IP address''' and the '''client's authentication''' info as specified in the server's configuration:


[[File:Configuration examples pptp client configuration.png]]
[[File:Configuration examples pptp client configuration v2.png]]


Once this is done, don't forget to save the changes.
Once this is done, don't forget to save the changes.
Line 82: Line 82:
If you plan on using the server as a web proxy, you should also enable the '''Use as default gateway''' option in the client's configuration:
If you plan on using the server as a web proxy, you should also enable the '''Use as default gateway''' option in the client's configuration:


[[File:Configuration examples pptp proxy client side.png]]
[[File:Configuration examples pptp proxy client side v2.png]]


==Testing the set up==
==Testing the set up==

Revision as of 14:57, 21 May 2018

Introduction

Point-to-Point Tunneling Protocol (PPTP) is a Virtual Private Network (VPN) protocol that uses a TCP control channel and a Generic Routing Encapsulation (GRE) tunnel to encapsulate PPP packets.

This article provides an extensive configuration example with details on how to create a connection between a PPTP Server and Client, both of which configured on RUTxxx routers.

Configuration overview and prerequisites

Before we begin, let's overview the configuration that we are attempting to achieve and the prerequisites that make it possible.

Prerequisites:

  • Two RUTxxx routers of any type (excluding RUT850)
  • A SIM card with a Public Static or Public Dynamic IP address for the PPTP Server
  • An end device (PC, Laptop, Tablet, Smartphone) to configure the routers

Configuration scheme:

As indicated by the figure above, the configuration we are trying to achieve here is very basic: it concerns two RUTxxx routers - RUT1 and RUT2. One functions as a PPTP Server, the other - a PPTP Client. They are connected into a virtual network via a PPTP Tunnel.

Router configuration

If you have familiarized yourself with the configuration scheme and have all of the devices in order, we can start configuring your routers using instructions provided in this section.

PPTP Server (RUT1)


As mentioned in the prerequisites section, the router that acts as the server must have a Public Static or Public Dynamic IP address (more information on the subject can be found here). If that is in order, we should start configuring the server.

Login to the router's WebUI and go to Services → VPN → PPTP. Select Role: Server, enter a name for the new instance and click the "Add" button:


Click the "Edit" button located to the right of the newly created PPTP Server to enter the instance's settings window. The configuration is fairly simple, just remember to Enable the instance:

The rest of the parameters are user preferential so you should set them as you see fit. A short explanation on these parameters is provided below:

  • Local IP defines the server's virtual IP address
  • Remote IP range parameters define the range of virtual IP addresses that will be assigned to connecting clients
  • User name and Password parameters define a client's authentication info
  • PPTP Client's IP is used to assign a specific virtual IP to a specific client. It is not mandatory and, if left empty, the client will be assigned an IP address from the Remote IP range specified above

Once you're done setting these parameters don't forget to click the Save button.

Setting up a proxy (optional)


Web proxies facilitate access to content on the World Wide Web and provide anonymity for the connecting clients. This is because the web proxy relays connected clients' requests through itself. Thus, the clients effectively "adopt" the server's Public IP address.

If you plan on using the PPTP Server as a web proxy, you will need to edit one preexisting Zone Forwarding rule. In the router's WebUI, go to Network → Firewall → General Settings, locate pptp in the Zone Forwarding table and click the "Edit" button next to it:


After this you will be redirected to the PPTP Zone Settings page where you will need to place a check mark next to the wan destination zone:

After you save the changes your PPTP Server will now also act as a web proxy.

NOTE: this step is purely optional and should be used only if you plan on using your server as a web proxy for your clients. If you are just planning to use PPTP to connect multiple remote networks into a single virtual network, you should probably skip this step.

PPTP Client (RUT2)


Now let's configure the PPTP Client. Login to the router's WebUI and go to Services → VPN → PPTP. Select Role: Client, enter a name for the new instance and click the "Add" button:


Click the "Edit" button located to the right of the newly created PPTP Client to enter the instance's settings window. In the settings window, Enable the PPTP instance, specify the server's Public (WAN) IP address and the client's authentication info as specified in the server's configuration:

Once this is done, don't forget to save the changes.


Optional:

If you plan on using the server as a web proxy, you should also enable the Use as default gateway option in the client's configuration:

Testing the set up

If you've followed the steps presented above, your configuration should be finished. But as with any other configuration, it is always wise to test the set up in order to make sure that it works properly. In order to test a PPTP connection, login to one of the routers' WebUI and go to Services → CLI. Login with user name: root and the router's admin password. You should then be able to ping the opposite instance, i.e., if you logged in to the server's CLI, you should be able to ping the client's virtual IP address, and vice versa. To use a ping command, type ping <ip_address> and press the "Enter" key on your keyboard:

If the ping requests are successful, congratulations, your set up works! If not, we suggest that you review all steps once more.

If you're using the server as a web proxy, end devices connected to the PPTP client router should have the Public IP address of the PPTP server. You can visit this website to check the Public IP address: http://www.whatsmyip.org/