PPTP Server With Profile

From MikroTik Wiki
Jump to: navigation, search

PPTP server with profiles

Assalam-O-Alaikum.

In this article i will be setting up a Point-to-Point Tunneling Protocol (PPTP) Server with different profiles.


First we will configure interface that is connected to WAN.

/ ip address add address=10.0.0.2/24 network=10.0.0.0 broadcast=10.0.0.255 interface=ether1

Now we will configure second interface for our Local Network.

/ ip address add address=192.168.112.1/24 network=192.168.112.0 broadcast=192.168.112.255 interface=ether2

Now we will configure PPTP through Winbox, download Winbox from http://demo.mt.lv/winbox/winbox.exe


Now goto IP > Pool. Press the PLUS sign in RED, then create a IP Address Pool that will be used by the PPTP to give out IP and Press OK. It should look something like this.

Ip-pool.JPG


Now we will create a PPTP Server. Goto PPP then press PPTP Server, a new small window will popup, and select Enabled and just press OK.

Pptp-server.JPG


Now we will create a profile that will be used by different users. Goto the main PPP window, goto Profiles tab, here you will see two profiles by default, dont do any thing to these default profiles, create a new profile by pressing the PLUS sign. Name the profile what ever you like (here i have named it name=profile 256k). Local Address is the address of the server (here it is 172.16.0.1) local-address=172.16.0.1. In Remote Address box press the down arrow button you will see the name of the pool that we created in the first step, select it. If you dont see the name of the pool dont worry, name type the name of the pool in the Remote Address Location. In the DNS Server, enter the IP of your SERVER (here i am using mikrotik as my DNS Server) DNS-Server=172.16.0.1. Then goto Limits tab in the same window, now here we have to setup the bandwidth rate at which the users using this profile will be restricted at. Here set the Rate Limit (tx/rx) to what ever you like (i am setting it to 256k up/down). Then press APPLY and OK.

Profile256k.JPG


Now we will create users.

Createuser.JPG



Our PPTP Server Setup is complete.


Goto IP > Firewall. In the NAT tab add a new FIREWALL rule, press the PLUS sign. chain=srcnat , src.address=172.16.0.0/24 , then goto Action's tab in the same window, select action=masquerade. Then press APPLY and OK.

Natrule.jpg



Now we will setup Default ROUTE. Goto IP > Routes , in here add a new Static ROUTE by pressing PLUS sign. Destination=0.0.0.0/0 , set the gateway to the gateway of the interface connected to INTERNET or the main IP of your ADSL Router (here its 10.0.0.1) gateway=10.0.0.1. Then Press APPLY and OK.

Newroute.jpg


Now the last and final step, setup DNS Server on Mikrotik Router. Goto IP > DNS, press the settings butting. Enter the primary and secondary DNS Server's IP provided by your ISP (here i have a DNS Server on my network i am using that) primary DNS=10.0.0.1 , also select "Allow Remote Request" this will make your Mikrotik Router act as a DNS Server. Notice that i have setup the Cache size=2048 , if you want you can change that, its not that big deal. Now press APPLY and OK.

Dns setting.jpg


Now our PPTP Server Setup with Profiles is complete.


Created by Mehmood - |CyPH3r|