Document Revision 1.4 (Tue Aug 09 12:01:21 GMT 2005) : This Document Applies To V2.9
Document Revision 1.4 (Tue Aug 09 12:01:21 GMT 2005) : This Document Applies To V2.9
Document Revision 1.4 (Tue Aug 09 12:01:21 GMT 2005) : This Document Applies To V2.9
For mobile or remote clients to remotely access an !ntranetfLAN of a company (see PPTP setup for
Windows for more information)
Each PPTP connection is composed of a server and a client. The NikroTik RouterOS may function as a server
or client - or, for various configurations, it may be the server for some connections and client for other
connections. For example, the client created below could connect to a Windows 2000 server, another
NikroTik Router, or another router which supports a PPTP server.
Quick Setup Guide
To make a PPTP tunnel between 2 NikroTik routers with !P addresses 10.5.8.104 (PPTP server) and
10.1.0.172 (PPTP client), follow the next steps.
[HomeOffice|
!nterface LocalHomeOffice 10.150.2.25+f2+
!nterface To!nternet 192.168.80.1f2+
[RemoteOffice|
!nterface To!nternet 192.168.81.1f2+
!nterface LocalRemoteOffice 10.150.1.25+f2+
Each router is connected to a different !SP. One router can access another router through the !nternet.
On the Preforma PPTP server a user must be set up for the client:
[admin@HomeOffice] ppp secret> add name=ex service=pptp password=lkjrht
local-address=10.0.103.1 remote-address=10.0.103.2
[admin@HomeOffice] ppp secret> print detail
Flags: X - disabled
0 name="ex" service=pptp caller-id="" password="lkjrht" profile=default
local-address=10.0.103.1 remote-address=10.0.103.2 routes==""
[admin@HomeOffice] ppp secret>
Then the user should be added in the PPTP server list:
[admin@HomeOffice] interface pptp-server> add user=ex
[admin@HomeOffice] interface pptp-server> print
Flags: X - disabled, D - dynamic, R - running
# NAME USER MTU CLIENT-ADDRESS UPTIME ENC...
0 pptp-in1 ex
Page 7 of 12
Copyright 1999-2006, MikroTik. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.
Other trademarks and registred trademarks mentioned herein are properties of their respective owners.
[admin@HomeOffice] interface pptp-server>
And finally, the server must be enabled:
[admin@HomeOffice] interface pptp-server server> set enabled=yes
[admin@HomeOffice] interface pptp-server server> print
enabled: yes
mtu: 1460
mru: 1460
authentication: mschap2
default-profile: default
[admin@HomeOffice] interface pptp-server server>
Add a PPTP client to the RemoteOffice router:
[admin@RemoteOffice] interface pptp-client> add connect-to=192.168.80.1 user=ex \
\... password=lkjrht disabled=no
[admin@RemoteOffice] interface pptp-client> print
Flags: X - disabled, R - running
0 R name="pptp-out1" mtu=1460 mru=1460 connect-to=192.168.80.1 user="ex"
password="lkjrht" profile=default add-default-route=no
[admin@RemoteOffice] interface pptp-client>
Thus, a PPTP tunnel is created between the routers. This tunnel is like an Ethernet point-to-point connection
between the routers with !P addresses 10.0.103.1 and 10.0.103.2 at each router. !t enables 'direct'
communication between the routers over third party networks.
To route the local !ntranets over the PPTP tunnel you need to add these routes:
[admin@HomeOffice] > ip route add dst-address 10.150.1.0/24 gateway 10.0.103.2
Page 8 of 12
Copyright 1999-2006, MikroTik. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.
Other trademarks and registred trademarks mentioned herein are properties of their respective owners.
[admin@RemoteOffice] > ip route add dst-address 10.150.2.0/24 gateway 10.0.103.1
On the PPTP server it can alternatively be done using routes parameter of the user configuration:
[admin@HomeOffice] ppp secret> print detail
Flags: X - disabled
0 name="ex" service=pptp caller-id="" password="lkjrht" profile=default
local-address=10.0.103.1 remote-address=10.0.103.2 routes==""
[admin@HomeOffice] ppp secret> set 0 routes="10.150.1.0/24 10.0.103.2 1"
[admin@HomeOffice] ppp secret> print detail
Flags: X - disabled
0 name="ex" service=pptp caller-id="" password="lkjrht" profile=default
local-address=10.0.103.1 remote-address=10.0.103.2
routes="10.150.1.0/24 10.0.103.2 1"
[admin@HomeOffice] ppp secret>
Test the PPTP tunnel connection:
[admin@RemoteOffice]> /ping 10.0.103.1
10.0.103.1 pong: ttl=255 time=3 ms
10.0.103.1 pong: ttl=255 time=3 ms
10.0.103.1 pong: ttl=255 time=3 ms
ping interrupted
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 3/3.0/3 ms
Test the connection through the PPTP tunnel to the LocalHomeOffice interface:
[admin@RemoteOffice]> /ping 10.150.2.254
10.150.2.254 pong: ttl=255 time=3 ms
10.150.2.254 pong: ttl=255 time=3 ms
10.150.2.254 pong: ttl=255 time=3 ms
ping interrupted
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 3/3.0/3 ms
To bridge a LAN over this secure tunnel, please see the example in the 'Eo!P' section of the manual. To set
the maximum speed for traffic over this tunnel, please consult the 'Queues' section.
Connecting a Remote Client via PPTP Tunnel
The following example shows how to connect a computer to a remote office network over PPTP encrypted
tunnel giving that computer an !P address from the same network as the remote office has (without need of
bridging over Eo!P tunnels)
Please, consult the respective manual on how to set up a PPTP client with the software You are using.
Page 9 of 12
Copyright 1999-2006, MikroTik. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.
Other trademarks and registred trademarks mentioned herein are properties of their respective owners.
The router in this example:
[RemoteOffice|
!nterface To!nternet 192.168.81.1f2+
!nterface Office 10.150.1.25+f2+
The client computer can access the router through the !nternet.
On the PPTP server a user must be set up for the client:
[admin@RemoteOffice] ppp secret> add name=ex service=pptp password=lkjrht
local-address=10.150.1.254 remote-address=10.150.1.2
[admin@RemoteOffice] ppp secret> print detail
Flags: X - disabled
0 name="ex" service=pptp caller-id="" password="lkjrht" profile=default
local-address=10.150.1.254 remote-address=10.150.1.2 routes==""
[admin@RemoteOffice] ppp secret>
Then the user should be added in the PPTP server list:
[admin@RemoteOffice] interface pptp-server> add name=FromLaptop user=ex
[admin@RemoteOffice] interface pptp-server> print
Flags: X - disabled, D - dynamic, R - running
# NAME USER MTU CLIENT-ADDRESS UPTIME ENC...
0 FromLaptop ex
[admin@RemoteOffice] interface pptp-server>
And the server must be enabled:
Page 10 of 12
Copyright 1999-2006, MikroTik. All rights reserved. Mikrotik, RouterOS and RouterBOARD are trademarks of Mikrotikls SIA.
Other trademarks and registred trademarks mentioned herein are properties of their respective owners.
[admin@RemoteOffice] interface pptp-server server> set enabled=yes
[admin@RemoteOffice] interface pptp-server server> print
enabled: yes
mtu: 1460
mru: 1460
authentication: mschap2
default-profile: default
[admin@RemoteOffice] interface pptp-server server>
Finally, the proxy APR must be enabled on the 'Office' interface:
[admin@RemoteOffice] interface ethernet> set Office arp=proxy-arp
[admin@RemoteOffice] interface ethernet> print
Flags: X - disabled, R - running
# NAME MTU MAC-ADDRESS ARP
0 R ToInternet 1500 00:30:4F:0B:7B:C1 enabled
1 R Office 1500 00:30:4F:06:62:12 proxy-arp
[admin@RemoteOffice] interface ethernet>
PPTP Setup for Windows
Nicrosoft provides PPTP client support for Windows NT, 2000, NE, 98SE, and 98. Windows 98SE, 2000, and
NE include support in the Windows setup or automatically install PPTP. For 95, NT, and 98, installation
requires a download from Nicrosoft. Nany !SPs have made help pages to assist clients with Windows PPTP
installation.
http:ffwww.real-time.comfCustomer_SupportfPPTP_Configfpptp_config.html
http:ffwww.microsoft.comfwindows95fdownloadsfcontentsfWUAdminToolsfS_WUNetworkingToolsfW95WinsockUpgradefDefault.asp
Sample instructions for PPTP (VPN) installation and client setup -
Windows 98SE
!f the vPN (PPTP) support is installed, select 'Dial-up Networking' and 'Create a new connection'. The option
to create a 'vPN' should be selected. !f there is no 'vPN' options, then follow the installation instructions
below. When asked for the 'Host name or !P address of the vPN server', type the !P address of the router.
Double-click on the 'new' icon and type the correct user name and password (must also be in the user
database on the router or RAD!US server used for authentication).
The setup of the connections takes nine seconds after selection the 'connect' button. !t is suggested that the
connection properties be edited so that 'NetBEU!', '!PXfSPX compatible', and 'Log on to network' are
unselected. The setup time for the connection will then be two seconds after the 'connect' button is selected.
To install the 'virtual Private Networking' support for Windows 98SE, go to the 'Setting' menu from the main
'Start' menu. Select 'Control Panel', select 'AddfRemove Program', select the 'Windows setup' tab, select the
'Communications' software for installation and 'Details'. Go to the bottom of the list of software and select
'virtual Private Networking' to be installed.
Troubleshooting
Description