Community discussions

MikroTik App
 
Frank607
just joined
Topic Author
Posts: 11
Joined: Wed Aug 05, 2009 7:42 pm

PPTP through internet to RB

Sat Sep 12, 2009 7:47 pm

Hi there. I followed the wiki and created a PPTP server successfully in mikrotik. I can connect to it with a windows client on a pc connected to my home network. I already set up DDNS and forwarded port 1723 to the mikrotik router. But my friend cannot connect from the internet. My modem says in the log the packet was accepted and sent on - but the mikrotik router does not even register in its log. But if I forward the port in my modem to a windows pc on my network with a PPTP server running my friend on the outside can connect! For what I want to achieve it is neccessary for him to be able to connect to my mikrotik router. I probably need some kind of route set up - please help me if you know what to do! Thanks.
 
User avatar
Ibersystems
Forum Guru
Forum Guru
Posts: 1686
Joined: Wed Apr 12, 2006 12:29 am
Location: Cabrils, Barcelona - Spain
Contact:

Re: PPTP through internet to RB

Sun Sep 13, 2009 3:18 pm

Hi,

only one connected at the same time.
 
Frank607
just joined
Topic Author
Posts: 11
Joined: Wed Aug 05, 2009 7:42 pm

Re: PPTP through internet to RB

Sun Sep 13, 2009 6:09 pm

Huh? What do you mean? It's not a user problem. I think I would've picked that up.
 
User avatar
hilton
Long time Member
Long time Member
Posts: 634
Joined: Thu Sep 07, 2006 5:12 pm
Location: Jozi (aka Johannesburg), South Africa

Re: PPTP through internet to RB

Sun Sep 13, 2009 11:54 pm

Post your config.
 
kirshteins
MikroTik Support
MikroTik Support
Posts: 592
Joined: Tue Dec 02, 2008 10:55 am

Re: PPTP through internet to RB

Mon Sep 14, 2009 8:40 am

PPTP uses both TCP 1723 connection and GRE tunnel. Maybe you need something that forwards GRE protocol as well.
 
Frank607
just joined
Topic Author
Posts: 11
Joined: Wed Aug 05, 2009 7:42 pm

Re: PPTP through internet to RB

Mon Sep 14, 2009 4:58 pm

Hey! I figured it out! I created a route destination: 41.x.x.x (the internet ip of his) and gateway: the lan ip of my modem that is connected to the mikrotik routerboard. Looks like the RB didn't know where to send back to the client. But there is another problem now. His internet ip is dynamic. I have set up DDNS for him but how and where do I set it up in my mikrotik router to look up his internet DNS address? It doesn't work if I type it in 'destination' of the route. Looks like it wants an ip :D
 
Frank607
just joined
Topic Author
Posts: 11
Joined: Wed Aug 05, 2009 7:42 pm

Re: PPTP through internet to RB

Wed Sep 16, 2009 12:04 pm

Hey guys. Anyone know how to route to DNS adress?
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7054
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: PPTP through internet to RB

Wed Sep 16, 2009 12:52 pm

 
oceanmaster
newbie
Posts: 30
Joined: Sat Nov 03, 2007 2:29 pm

Re: PPTP through internet to RB

Wed Jul 28, 2010 10:12 am

You need two scripts. First one is to connect to the changing ip via dyndns or other such service. I use no-ip.com and here is the script for that (pasted exactly from my board minus the private details):
# Dynamic DNS Update / Simple Edition
# Written by Sam Norris, ChangeIP.com
# Copyright ChangeIP.com 2009
# For support send mail to Support@ChangeIP.com
#
# 2009-06-22 RouterOS 3.25 Tested
# 2009-10-05 RouterOS 4.01rc1 Tested
#
# OVERVIEW:         %
#  This script will update a ChangeIP.com dynamic dns hostname
#  with an ip address located directly on an interface.
#                   %
# NOTES:            %
#  IF THIS SCRIPT DOES NOT PRODUCE ANY OUTPUT PLEASE COPY AND PASTE IT
#  AGAIN.  THERE PROBABLY IS A LINE BREAK IN THE WRONG PLACE! Once you
#  have created this script and tested that it works by running it
#  manually you can schedule it to run every few minutes.
#                   %
# CONFIGURATION FIELD DEFINITIONS:
#  ddnsuser:  Enter your ChangeIP.com user id.
#  ddnspass:  Enter your ChangeIP.com password.
#  ddnshost:  Enter the hostname (www.example.com) to update.
#  ddnsinterface:  Enter a list of interface names - case sensative.
#                   %
#                   %
#                   %
#                   %
#               %   %   %
#                %  %  %
#                 % % %
#                   %
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# EDIT YOUR DETAILS / CONFIGURATION HERE
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:global ddnsuser "putdyndnsusernamehere"
:global ddnspass "dyndnspasswordhere"
:global ddnshost "yourdyndns.url.here"
:global ddnsinterface "Nameofinterfacethatconnectstointernet"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# END OF USER DEFINED CONFIGURATION
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:global ddnssystem ("mt-" . [/system package get [/system package find name=system] version] )
:global ddnsip [ /ip address get [/ip address find interface=$ddnsinterface] address ]
:global ddnslastip

:if ([:len [/interface find name=$ddnsinterface]] = 0 ) do={ :log info "DDNS: No interface named $ddnsinterface, please check configuration." }

:if ([ :typeof $ddnslastip ] = "nothing" ) do={ :global ddnslastip 0.0.0.0/0 }

:if ([ :typeof $ddnsip ] = "nothing" ) do={

:log info ("DDNS: No ip address present on " . $ddnsinterface . ", please check.")

} else={

  :if ($ddnsip != $ddnslastip) do={

    :log info "DDNS: Sending UPDATE!"
    :log info [ :put [/tool dns-update name=$ddnshost address=[:pick $ddnsip 0 [:find $ddnsip "/"] ] key-name=$ddnsuser key=$ddnspass ] ]
    :global ddnslastip $ddnsip

  } else={ 

    :log info "DDNS: No changes necessary."

  }

}
I call it "HomingBeacon-Simple" and have everything ticked except sensitive and sniff. I then have a scheduler run every 5 minutes with the "on event" being "HomingBeacon-Simple". (the name of the script)


The second script is to keep checking the host name and not the ip as Mikrotik resolves the ip immediatelly on adding the URL:
:local "vpn-interface-name" "nameofpptp-out" 
:local "vpn-dns-name" "yourdyndnsname" 
:local "new-vpn-ip" [:resolve $"vpn-dns-name"] 
:local "current-vpn-ip" [/interface pptp-client get $"vpn-interface-name" connect-to] 
:if ($"current-vpn-ip" != $"new-vpn-ip") do={ /interface pptp-client set [find name=$"vpn-interface-name"] connect-to=$"new-vpn-ip"}
Just fill in the "nameofpptp-out" and "yourdyndnsname". Leave the rest. You then need to add a schedule for this one also. Mine runs every 5 minutes.

/system script run "VPNDNSResolver". Paste that into the scheduler. VPNDNSResolver being the name of my second script

Works well. My ip seems to change about once every two to three days. Got it on two separate VPN's and been working for two weeks now. I am a bit confused why the speed of the VPN is so slow though but still working on that. I use it for remote desktop, VOIP and a hotel software.

Hope this helps.
 
User avatar
hilton
Long time Member
Long time Member
Posts: 634
Joined: Thu Sep 07, 2006 5:12 pm
Location: Jozi (aka Johannesburg), South Africa

Re: PPTP through internet to RB

Wed Jul 28, 2010 10:22 am

I use no-ip.com and here is the script for that:
# Dynamic DNS Update / Simple Edition
# Written by Sam Norris, ChangeIP.com
# Copyright ChangeIP.com 2009
# For support send mail to Support@ChangeIP.com
#
So which one is it?
 
oceanmaster
newbie
Posts: 30
Joined: Sat Nov 03, 2007 2:29 pm

Re: PPTP through internet to RB

Mon Aug 08, 2011 12:52 am

my bad,
change-ip.com

Who is online

Users browsing this forum: complexxL9, herger, holvoetn, vingjfg and 48 guests