Community discussions

MikroTik App
 
sontrava
newbie
Topic Author
Posts: 35
Joined: Thu Apr 25, 2013 1:49 pm

Dual Access PPTP, L2TP on the Mikrotik??? It is very sad.

Thu Apr 25, 2013 2:16 pm

Hello.
Tell me - when it is planned to implement a Dual Access PPTP, L2TP to the Router OS ?
Other names - Russian PPTP, Link Duo.

Windows XP, 7, 2003, Linux and almost all routers (Dlink, Asus, Zyxel, TPLink, Edimax ...) - long support Dual access PPTP, L2TP,
and Mikrotik - are not supported.
Topic has been discussed on many forums. Do not ignore normal users, please.
And then say that it works and so, but You configure can't..
And it didn't work.
The connection breaks, the ping is not.

And I know. The problem in the route, which is marked with a red cross.

It is very very sad.
:( :( :(
Thx.

Help also in the setup of the Mikrotik. Contact us. Free.
Vladimir. Odessa. t0965555511@ya.ru
I live in the Ukraine.

See Illustartion.
----------------------------
Здравствуйте.
Скажите – когда планируется ли внедрение Dual Access в Router OS.

Ведь Windows, Linux, почти все роутеры (Dlink, Asus, Zyxel, TPLink, Edimax ...) давно поддерживают Dual access,
А Mikrotik не поддерживает.
Очень печально

Другие названия Russian PPTP, Link Duo
Тема обсуждалась на многих форумах.
Не игнорируйте обычных пользователей.
А то говорите, что все работает и так, но сами настроить не можете.
А оно ничего не работает.
Соединение рвется, пинга нет.

А Я знаю. Проблема в маршруте, который помечен красным крестом.

mikrotik_dual_acces.jpg
You do not have the required permissions to view the files attached to this post.
 
sontrava
newbie
Topic Author
Posts: 35
Joined: Thu Apr 25, 2013 1:49 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Fri Apr 26, 2013 5:41 pm

Simple PPTP routing --------- 10.64.83.130 ----------------------------------------------------- 10.128.4.9 .....internet
Dual-Access PPTP routing --- 10.64.83.130 --10.0.137.56 ---------------------10.0.137.1-- 10.128.4.9 .....internet


Получается при обычном PPTP - маршрут в интернет такой -
10.64.83.130 ------------------------------------------------- 10.128.4.9 .....интернет
А при PPTP Dual-Access маршрут в интернет такой -
10.64.83.130 --10.0.137.56 -----------------10.0.137.1-- 10.128.4.9 .....интернет
You do not have the required permissions to view the files attached to this post.
 
neophyte
just joined
Posts: 18
Joined: Tue Dec 11, 2012 10:39 am

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Fri Apr 26, 2013 6:03 pm

Все в микроитике работает.... Необходимо в ip dhcp-client wan1 занчение add default route сделать no , добавить маршрут(ы) до vpn и dns серверов.

system script add
:local resolvedIP [:resolve "[b]SERVER_NAME[/b]"];
:local pptpID [/interface pptp-client find name="[b]NAME[/b]"];
:local currentIP [/interface pptp-client get $pptpID connect-to];
:if ($resolvedIP != $currentIP) do={
  /interface pptp-client set $pptpID connect-to=$resolvedIP; 
  /log info "ip updated";
}
}
system scheduler add this script and Start time change to startup
Адреса серверов меняются крайне редко , а если поменяется достаточно перезагрузить роутер или выполнить скрипт..
 
sontrava
newbie
Topic Author
Posts: 35
Joined: Thu Apr 25, 2013 1:49 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Fri Apr 26, 2013 7:05 pm

Все в микроитике работает.... Необходимо в ip dhcp-client wan1 занчение add default route сделать no , добавить маршрут(ы) до vpn и dns серверов.
Неправда. не работает как должно.
Да не будет по Вашей методике так работать.
Голову даю на отсечение.
добавить маршрут(ы) до vpn
Добавить то можно - только эти маршруты до vpn не будут рабочими никогда.

Динамический Маршрут до vpn с Distance=0 -
не перекрывается статическим маршрутом с Distance=1.
А динамический маршрут отключить нельзя. Distance поменять тоже нельзя


Поэтому добавляй-не добавляй свой маршрут до vpn - этот маршрут не будет рабочим.

Могу дать доступ к Микротик.
У меня 2 провайдера. Один с белым IP.
Другой Dual Access.


Адреса серверов меняются крайне редко , а если поменяется достаточно перезагрузить роутер или выполнить скрипт..
Тоже неправда. Вернее не совсем так.
У моего провайдера IP меняется при каждом реконнекте. Потому как у него 4 VPN сервера.

За скрипт спасибо конечно. Но...
Ставлю я скрипт в шедулер на каждые 5 минут. И...
:local resolvedIP [:resolve "SERVER_NAME"]; ----- resolvedIP меняется каждый раз при каждом вызове (выдается рандомно один из 4 IP)
И будут регулярные реконнекты каждые 5 минут с обрывами интернета на время реконнекта.
И будет регулярная смена динамического IP - с вытекающими отсюда "сюрпризами".

Нужно чтоб скрипт срабатывал только при дисконнекте.
Зачем менять IP и реконнектиться, если соединие рабочее?

Т.е. нужно проверять состояние PPTP-соединения.
Тогда это будут рабочие костыли.
Last edited by sontrava on Mon Apr 29, 2013 1:04 pm, edited 6 times in total.
 
sontrava
newbie
Topic Author
Posts: 35
Joined: Thu Apr 25, 2013 1:49 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Fri Apr 26, 2013 7:25 pm

Схемы Выше посмотрите, там все наглядно расписано...
Розовыми стрелками я указал в чем отличия.
Только в одном неправильном маршруте.
Который перекрыть не получается. из-за Distance=0.
 
neophyte
just joined
Posts: 18
Joined: Tue Dec 11, 2012 10:39 am

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Fri Apr 26, 2013 8:07 pm

курите мнуал в таком случае или пример настройки микротика на провайдере corbina(beeline) :lol:
 
sontrava
newbie
Topic Author
Posts: 35
Joined: Thu Apr 25, 2013 1:49 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Fri Apr 26, 2013 8:17 pm

I while doing so (Я пока делаю так)
--- Crutches №1 for Dual Access PPTP L2TP on Mikrotik ---
1. In DHCP Client - Default Distance = 20.
2. /ip route rule add action=lookup dst-address=10.128.4.0/24 table=matrix_vpn
3. /ip route add dst-address=10.128.4.0/24 gateway=10.0.37.1 routing-mark=matrix_vpn distance=1
Add Default Route in PPTP-client - enable.

10.128.4.9 - adress of vpn-server
10.0.37.1 - address gateway on DHCP
10.128.4.0/24 - Specially made, that does not change the entries at each change of the address of the server.

--- Crutches №2 for Dual Access PPTP L2TP on Mikrotik ---
In NAT - create 2 src-nat - masquerade
on WAN1 and on WAN1-pptp

--- Crutches №3 for Dual Access PPTP L2TP on Mikrotik ---
Script to update IP from DNS-name of VPN-server, when it disconnects.
Скрипт для обновления IP по DNS имени VPN-сервера при дисконнекте.
Last edited by sontrava on Sun Apr 28, 2013 1:00 pm, edited 4 times in total.
 
sontrava
newbie
Topic Author
Posts: 35
Joined: Thu Apr 25, 2013 1:49 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Fri Apr 26, 2013 8:51 pm

курите мнуал в таком случае или пример настройки микротика на провайдере corbina(beeline) :lol:
Мануал тут не поможет никак.
И Мануал по Корбине - сделан через голову. Там тоже обычный Dual access.

Просто у Микротика нет поддержки Dual Access.
О чем я Вам и говорю, что не работает без костылей. И описал почему.

У всех остальных роутеров Dual Access есть уже давно.
И в Windows xp, 7, Linux тоже есть.

А в Микротике нет.
Я 2,5 года на эти грабли микротивские наступаю уже.

И почти каждый день настраиваю людям Микротики, Vyatt-ы и Cisc-и.
И я кроме того продаю Микротики. От покупателей много приходится "хорошего" выслушивать насчет Микротика и Dual Access.
А покупают часто админы со стажем.

А Вы отсылаете на... мануал Корбины.
Вместо того, чтоб прислушаться и добавить элементарнейший Dual Access.
А ведь нужно всего-то - Просто исправить 1 неправильный маршрут.
Вы хоть схемы мои посмотрите.

Не обижайтесь только. Накипело уже за 2,5 года.
You do not have the required permissions to view the files attached to this post.
Last edited by sontrava on Sat Apr 27, 2013 10:31 am, edited 1 time in total.
 
sontrava
newbie
Topic Author
Posts: 35
Joined: Thu Apr 25, 2013 1:49 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Fri Apr 26, 2013 9:15 pm

Вот поэтому у Вас в Quick Set
нет ни PPTP, ни L2TP,
потому что Dual access победить не можете.
:?
Сорри за критику.

Но это правда.

ЗЫ: как Вам мой коллаж с костылями? :D
 
biomesh
Long time Member
Long time Member
Posts: 574
Joined: Fri Feb 10, 2012 8:25 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Fri Apr 26, 2013 9:39 pm

You might get more replies if this were in english. But if you want to force specific traffic to go over the pptp connection, you might want to look at the following:

http://wiki.mikrotik.com/wiki/Policy_Base_Routing

/ip firewall Mangle add chain=prerouting src-address=10.64.83.0/24 action=mark-routing new-routing-mark=Through_VPN
/interface pptp-client add connect-to=My VPN Connection allow=pap,chap,mschap1,mschap2 name="My VPN" user=kozar password=RxFp add-default-route=no
/ip Route Add Dst-Address=0.0.0.0/0 Gateway="My VPN" Routing-Mark=Through_VPN
/ip firewall nat chain=srcnat src-address=10.64.83.0/24 out-interface="My VPN" action=masquerade

I hope this helps.
 
sontrava
newbie
Topic Author
Posts: 35
Joined: Thu Apr 25, 2013 1:49 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Fri Apr 26, 2013 9:53 pm

Very Thanks. I will try to.

/ip Route Add Dst-Address=0.0.0.0/0 Gateway="My VPN" Routing-Mark=Through_VPN -
This will not work. With the route of 0.0.0.0/0 all rigth.

The problem with the route dst-address=10.128.4.0/24
Dynamic Route - dst-address=10.128.4.0/24 on interface=WAN1-pptp Does not work for Dual Access
It should be so - /ip route add dst-address=10.128.4.9 gateway=10.0.37.1 routing-mark=matrix_vpn distance=1

We just want - to Mikrotik normally supported PPTP, L2TP Dual Access. Without crutches
Last edited by sontrava on Sun Apr 28, 2013 12:53 pm, edited 3 times in total.
 
biomesh
Long time Member
Long time Member
Posts: 574
Joined: Fri Feb 10, 2012 8:25 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Fri Apr 26, 2013 10:51 pm

You should have two default routes. One using policy based routing for your internal interfaces, one for your external interface.

The wan interface will have the address from your ISP, and this will have the default route without the policy based routing. All of the ISP local traffic will be routed over this connection. You might have to add a route for the 10.0.0.0/8 network to the wan interface depending on your address assignment.

Here is an example using 172.16.1.0/24 as your local network

/ip firewall Mangle add chain=prerouting src-address=172.16.1.0/24 action=mark-routing new-routing-mark=Through_VPN
/interface pptp-client add connect-to=My VPN Connection allow=pap,chap,mschap1,mschap2 name="My VPN" user=kozar password=RxFp add-default-route=no
/ip Route Add Dst-Address=0.0.0.0/0 Gateway="My VPN" Routing-Mark=Through_VPN
/ip route add dst-address=10.0.0.0/8 gateway=WAN1
/ip route add dst-address=0.0.0.0/0 gateway=10.0.37.1
/ip firewall nat chain=srcnat src-address=172.16.1.0/24 out-interface="My VPN" action=masquerade
/ip firewall nat chain=srcnat src-address=172.16.1.0/24 out-interface=WAN1 action=masquerade

This will allow all non 10.0.0.0/8 traffic from 172.16.1.0/24 (your local network) to go over the vpn connection while allowing all 10.0.0.0/8 traffic to go over the standard wan connection. You just need to make sure the vpn connection is not set to configure the default route and that you handle this via routing marks.
 
sontrava
newbie
Topic Author
Posts: 35
Joined: Thu Apr 25, 2013 1:49 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Fri Apr 26, 2013 11:07 pm

:D Very-Very grateful for the help. I'm sorry.
I have in my settings, everything works fine. As in the first illustration

1. In DHCP Client - Default Distance = 20.
2. /ip route rule add action=lookup dst-address=10.128.4.0/24 table=matrix_vpn
3. /ip route add dst-address=10.128.4.0/24 gateway=10.0.37.1 routing-mark=matrix_vpn distance=1
4. /ip firewall nat chain=srcnat action=masquerade


But it crutches. (1,2,3)

And I wanted to normal support Dual Access from Mikrotik.
Without any crutches.
 
sontrava
newbie
Topic Author
Posts: 35
Joined: Thu Apr 25, 2013 1:49 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Sun May 19, 2013 12:31 am

Dual Acces PPTP L2TP on Mikrotik - It is very sad.
 
sontrava
newbie
Topic Author
Posts: 35
Joined: Thu Apr 25, 2013 1:49 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Sun May 19, 2013 12:42 am

I want to communicate with programmers.
With those who understand in the routing.
 
pavel7654321
just joined
Posts: 22
Joined: Tue Jun 02, 2009 9:00 am

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Sun May 19, 2013 3:34 pm

The Dual Access is a crutch by design. Nowadays, many providers moves from the dual access to more easier solutions.
As for Mikrotik in comparison with other vendors, such as D-Link, Asus, Zyxel, TPLink, Edimax...: in order to operate with the Dual Access properly All of them MUST to implement a some kind of unusual manipulation with routing tables. In case of Mikrotik, this manipulations should be made by hand with the understanding of the nature of problem (it's feature of the Mikrotik RouterOS to be an instrument to reach any complex target). In case of D-Link, Asus, Zyxel, TPLink, Edimax... all the complexity is hidden in a black box.
 
FatRat
just joined
Posts: 3
Joined: Wed May 29, 2013 3:19 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Wed May 29, 2013 3:48 pm

курите мнуал в таком случае или пример настройки микротика на провайдере corbina(beeline) :lol:
И Мануал по Корбине - сделан через голову. Там тоже обычный Dual access.

Просто у Микротика нет поддержки Dual Access.
Читал - не очень понял - сорри. 2 фразы в цитате не стыкуются.

Корбина использует DualAccess. C микротиком это взлетает.

У меня не Корбина, а Флекс, но те же грабли. Все работает. Что не так?

P.S. Понял что не так. Вы хотите чтобы в Микротике было все как в гламурно-рюшечном Асусе? Тогда зачем вам микротик?
 
sontrava
newbie
Topic Author
Posts: 35
Joined: Thu Apr 25, 2013 1:49 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Mon Jun 10, 2013 2:18 am

P.S. Понял что не так. Вы хотите чтобы в Микротике было все как в гламурно-рюшечном Асусе? Тогда зачем вам микротик?
Вы не поняли меня.
Меня интерфейс Микротика вполне устраивает. И функционал тоже.
Меня удивляет, что супер-Микротик не имеет элементарного PPTP L2TP Dual Access.

Я же хочу элементарной поддержки Dual Access.
Dual Access есть давным давно у всех роутеров, всех Windows, Linux.
Нету только у Микротика.


Я устал постоянно ставить костыли Микротику для Dual Access и name-VPN.

Поэтому в QuickSet и нет PPTP L2TP.
Потому что специалисты Микротик не знают как настроить Dual Access.

Смотрите первый скриншот. Я ж там все расписал.
Просто добавить одну опцию.

Но похоже что эта проблема Микротик не интересует.
А специалисты Микротик даже не понимают, что есть в природе Dual Access.
Да и не хотят об этом слышать.
Увы.
Вот так все печально и обидно.

------------------------------------------------------------
P.S. I understood that not so. You want that in Mikrotik there was all as in glamourous interface of Asus? Then why to you microtic?
You didn't understand me.
Mikrotik's interface quite suits me. And functionality too.
Me surprises that super-Mikrotik has no elementary PPTP L2TP Dual Access.

I want elementary support of Dual Access.
All routers, all Windows, Linux have Dual Access very long time ago.
Isn't present only at Mikrotik.


I was tired to put constantly crutches Mikrotik for Dual Access and name-VPN.

Therefore in QuickSet also there is no PPTP L2TP.
Because experts Mikrotik don't know as to adjust Dual Access.

You look the first screenshot. I there painted everything.
It is simple to add one option.

But it is similar that this problem Mikrotik doesn't interest.
And experts Mikrotik at all don't understand that there is Dual Access.
And don't want to hear about it PPTP L2TP Dual Access.
Alas.
Here so everything is sad and offensively.

I am pleased that Mikrotik though don't delete this topic.
Last edited by sontrava on Mon Jun 10, 2013 2:30 am, edited 2 times in total.
 
sontrava
newbie
Topic Author
Posts: 35
Joined: Thu Apr 25, 2013 1:49 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Mon Jun 10, 2013 2:24 am

Screenshot
You do not have the required permissions to view the files attached to this post.
 
wolfktl
just joined
Posts: 21
Joined: Thu Jun 27, 2013 6:07 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Wed Jul 03, 2013 3:27 pm

Screenshot
У меня билайн и флекс оба Dual L2TP и оба работают все настраиваеться..
Я бы сказал большая проблема в том, что нет жесткой привязки L2TP к интерфейсу как в PPOE


I beeline and flex both Dual L2TP and both work all nastraivaetsya ..
I would say the biggest problem is that there is no rigid peg to the L2TP interface in PPOE
 
Xi2
just joined
Posts: 3
Joined: Sat Jul 27, 2013 3:05 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Sat Jul 27, 2013 3:22 pm

Screenshot
У меня билайн и флекс оба Dual L2TP и оба работают все настраиваеться..
Я бы сказал большая проблема в том, что нет жесткой привязки L2TP к интерфейсу как в PPOE


I beeline and flex both Dual L2TP and both work all nastraivaetsya ..
I would say the biggest problem is that there is no rigid peg to the L2TP interface in PPOE
Maybe you could place here you configuration?
Because i'm new for MikroTik RouterOS, and trying to connect to Beeline in dual access? but i have problem with my current configuration.

Может быть ты выложишь свою конфигурацию здесь?
Для меня работа с MikroTik RouterOS в новинку, и у меня есть проблема с подключением к Beeline в dual access.

Here is my current configuration:
Вот моя текущая конфигурация:

ros code

# jan/01/2002 07:06:09 by RouterOS 6.1
# software id = VFKI-9PEJ
#
/interface bridge
add admin-mac=D4:CA:6D:94:26:74 auto-mac=no l2mtu=1598 name=bridge-local \
    protocol-mode=rstp
/interface ethernet
set 0 name=ether1-gateway
set 1 name=ether2-master-local
set 2 master-port=ether2-master-local name=ether3-slave-local
set 3 master-port=ether2-master-local name=ether4-slave-local
set 4 master-port=ether2-master-local name=ether5-slave-local
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk mode=\
    dynamic-keys wpa-pre-shared-key=418402193E04 wpa2-pre-shared-key=\
    418402193E04
add authentication-types=wpa2-psk eap-methods=passthrough \
    management-protection=allowed mode=dynamic-keys name=profile1 \
    supplicant-identity="" wpa2-pre-shared-key=\
    0123456789_!@@!
/interface wireless
set 0 band=2ghz-b/g/n channel-width=20/40mhz-ht-above disabled=no distance=\
    indoors frequency=2457 hide-ssid=yes ht-rxchains=0,1 ht-txchains=0,1 \
    l2mtu=2290 mode=ap-bridge security-profile=profile1 ssid=MiT
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m \
    mac-cookie-timeout=3d
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=bridge-local name=default
/ppp profile
add change-tcp-mss=yes name=beeline remote-address=127.0.2.1 use-compression=\
    no use-encryption=no use-ipv6=no use-vj-compression=no
add change-tcp-mss=yes name=BEE only-one=yes use-compression=no \
    use-encryption=no use-ipv6=no use-vj-compression=no
/interface l2tp-client
add allow=chap connect-to=80.241.35.46 disabled=no keepalive-timeout=15 \
    max-mru=1420 max-mtu=1420 name=l2tp-out1 password=123456789 \
    profile=BEE user=0010000005
/system logging action
set 1 disk-lines-per-file=1000
/tool user-manager customer
add backup-allowed=yes disabled=no login=admin password="" \
    paypal-accept-pending=no paypal-allowed=no paypal-secure-response=no \
    permissions=owner signup-allowed=no time-zone=-00:00
/interface bridge port
add bridge=bridge-local interface=ether2-master-local
add bridge=bridge-local interface=wlan1
/ip address
add address=192.168.88.1/24 comment=LAN interface=bridge-local network=\
    192.168.88.0
/ip dhcp-client
add comment="Distance 3" dhcp-options=hostname,hostname,clientid disabled=no \
    interface=ether1-gateway
/ip dhcp-server lease
add address=192.168.88.254 client-id=1:0:21:27:fc:f5:a mac-address=\
    00:21:27:FC:F5:0A server=default
/ip dhcp-server network
add address=192.168.88.0/24 comment="default configuration" dns-server=\
    192.168.88.1 gateway=192.168.88.1 ntp-server=192.168.88.1 wins-server=\
    0.0.0.0,0.0.0.0
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 name=router
/ip firewall filter
add chain=input comment="default configuration" protocol=icmp
add chain=input comment="default configuration" connection-state=established
add chain=input comment="default configuration" connection-state=related
add action=drop chain=input comment="default configuration" in-interface=\
    ether1-gateway
add chain=forward comment="default configuration" connection-state=\
    established
add chain=forward comment="default configuration" connection-state=related
add action=drop chain=forward comment="default configuration" \
    connection-state=invalid
/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration" \
    out-interface=ether1-gateway to-addresses=0.0.0.0
add action=masquerade chain=srcnat out-interface=l2tp-out1
/ip route
add distance=20 gateway=10.46.230.1
/system clock
set time-zone-name=Asia/Almaty
/system lcd
set contrast=0 enabled=no port=parallel type=24x4
/system lcd page
set time disabled=yes display-time=5s
set resources disabled=yes display-time=5s
set uptime disabled=yes display-time=5s
set packets disabled=yes display-time=5s
set bits disabled=yes display-time=5s
set version disabled=yes display-time=5s
set identity disabled=yes display-time=5s
set bridge-local disabled=yes display-time=5s
set l2tp-out1 disabled=yes display-time=5s
set wlan1 disabled=yes display-time=5s
set ether1-gateway disabled=yes display-time=5s
set ether2-master-local disabled=yes display-time=5s
set ether3-slave-local disabled=yes display-time=5s
set ether4-slave-local disabled=yes display-time=5s
set ether5-slave-local disabled=yes display-time=5s
/system leds
set 0 interface=wlan1
/system logging
add topics=l2tp
add topics=interface
add topics=packet
add topics=event
add action=disk topics=route
/system ntp client
set enabled=yes primary-ntp=64.236.96.53 secondary-ntp=129.6.15.29
/system ntp server
set enabled=yes
/system scheduler
add interval=15s name=schedule1 on-event="/SYSTEM SCRIPT RUN l2tp_script" \
    policy=reboot,read,write,policy,test start-time=startup
/system script
add name=l2tp_script policy=read,write,test source=":local vpnIface  \"l2tp-ou\
    t1\"\r\
    \n\
    \n:local ethIface  \"ether1-gateway\"\
    \n\r\
    \n:local vpnserver \"l2tp.internet.beeline.kz\"\r\
    \n\
    \n#\r\
    \n:if ([/interface l2tp-client get \$vpnIface running] = false) do={\r\
    \n  :if ([/ip dhcp-client get [/ip dhcp-client find interface=\$ethIface] \
    status] = \"bound\") do={\r\
    \n    /ip route remove [/ip route find dst-address=0.0.0.0/0 distance=20]\
    \r\
    \n    /ip route add gateway=[/ip route get [/ip route find dst-address=10.\
    0.0.0/8] gateway] distance=20\r\
    \n    /ip dns cache flush\r\
    \n    /interface l2tp-client set [/interface l2tp-client find name=\"\$vpn\
    Iface\"] connect-to=[:resolve \$vpnserver]\r\
    \n  }\r\
    \n}"
/system watchdog
set automatic-supout=no
/tool mac-server
set [ find default=yes ] disabled=yes
add interface=ether2-master-local
add interface=ether3-slave-local
add interface=ether4-slave-local
add interface=ether5-slave-local
add interface=wlan1
add interface=bridge-local
/tool mac-server mac-winbox
set [ find default=yes ] disabled=yes
add interface=ether2-master-local
add interface=ether3-slave-local
add interface=ether4-slave-local
add interface=ether5-slave-local
add interface=wlan1
add interface=bridge-local
 
ilyxa
just joined
Posts: 1
Joined: Fri Dec 13, 2013 9:19 am

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Fri Dec 13, 2013 9:31 am

Xi2, seems you need to add few and important additional strings to your script and config.
Route to VPN gate:

\n/ip route add dst-address=\"\$vpnserverIP/32\" gateway=[[/ip route get [\
/ip route find dst-address=10.0.0.0/8] gateway]] distance=1 comment=l2tp-s\
erver\

where vpnserverIP = [:resolve $vpnserver]

Also set correct mtu/mru values in l2tp client: must be max-mru=1414, max-mtu=1454 (because of nature for l2tp connection - ip w/o encryption).

Lastly, i didnt c any routes after connection, looks like you need to add something like:
/ip route
add distance=2 gateway=l2tp-out1

All of things described as my opinion in russian here http://wp.me/pdYh7-1BE .
 
Sacredspirit
just joined
Posts: 1
Joined: Mon Feb 24, 2014 1:45 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Mon Feb 24, 2014 1:57 pm

sontrava, подскажи пожалуйста, не совсем понял из твоих сообщений как костыль поставить :cry:
Ситуация такая: интернет от прова через PPPoE, так же создан VPN к буржуйской прокси (всё в точности по этой инструкции http://wiki.mikrotik.com/wiki/Policy_Base_Routing ), к буржуям с этой настройкой трафик уходит, но когда возвращается, то дропится как будь-то вернулся от провайдера :cry:
Пробовал добавить routes/rules как у тебя, но фокус не прокатывает.

Подскажи пожалуйста, как быть.

Image
 
vladme
just joined
Posts: 3
Joined: Wed Aug 13, 2014 12:35 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Wed Aug 13, 2014 12:54 pm

[[Solved]]
Без шаманств и сложных скриптов.

1. Воткнуть кабель в комп и не создавая соединение сделать в командной строке - nslookup tp.internet.beeline.ru и записать полученный адрес.
2. Воткнуть кабель в роутер, включить его и принять дефолтную конфигурацию.
3. Запускаем Winbox, IP - DNS и записываем два уже полученных динамических DNS.
4. Открыть терминал (New Terminal) и выполнить /ip route print detail . Увидим в 2 и далее маршрутах gateway=10.XX.XX.1. Запоминаем его.
5. Открыть терминал (New Terminal) снова и исполнить этот скрипт. !!! Предварительно XXXX замените на свои Логин и Пароль. А так же полученный адрес из пункта 1 и ДНС из пункта 3 c нулями в место 4-ого диапазона. И конечно гейт полученный из пункта 4.

/ppp profile
add name=Beeline remote-address=192.168.255.254 use-compression=no use-encryption=no use-vj-compression=no
/interface l2tp-client
add add-default-route=yes allow=chap connect-to=tp.internet.beeline.ru disabled=no max-mru=1500 max-mtu=1460 name=Beeline password=XXXXXX profile=Beeline user=XXXXXX
/ip dhcp-client
add default-route-distance=2 dhcp-options=hostname,clientid disabled=no interface=ether1-gateway
/ip firewall nat
add action=masquerade chain=srcnat out-interface=Beeline
/ip route
add comment="Beeline VPN server subnet" distance=1 dst-address=XX.XXX.XXX.0/24 gateway=10.XX.XX.1
add comment="Beeline DNS server subnet" distance=1 dst-address=XX.XXX.XXX.0/24 gateway=10.XX.XX.1
add comment="Beeline DNS server subnet" distance=1 dst-address=XX.XXX.XXX.0/24 gateway=10.XX.XX.1


Все. Если инет не работает, то исполняем в терминале еще три строчки.
/ip firewall mangle
add action=change-mss chain=forward in-interface=Beeline new-mss=1420 protocol=tcp tcp-flags=syn tcp-mss=1421-65535
add action=change-mss chain=forward new-mss=1420 out-interface=Beeline protocol=tcp tcp-flags=syn tcp-mss=1421-65535
Если и после этого не работает, зайдите в ip-routes и посмотрите, не появились ли новые маршруты. Удалите их, либо все маршруты удалите и заново вбейте
/ip route
add comment="Beeline VPN server subnet" distance=1 dst-address=XX.XXX.XXX.0/24 gateway=10.XX.XX.1
add comment="Beeline DNS server subnet" distance=1 dst-address=XX.XXX.XXX.0/24 gateway=10.XX.XX.1
add comment="Beeline DNS server subnet" distance=1 dst-address=XX.XXX.XXX.0/24 gateway=10.XX.XX.1

В моем случае это выглядит вот так :
/ip route
add comment="Beeline DNS server subnet" distance=1 dst-address=85.21.0.0/24 \
gateway=10.185.24.1
add comment="Beeline VPN server subnet" distance=1 dst-address=85.21.0.0/24 \
gateway=10.185.24.1
add comment="beeline dns" distance=1 dst-address=213.234.192.0/24 gateway=\
10.185.24.1

Теперь точно все должно работать.
 
reifwp
just joined
Posts: 1
Joined: Mon Nov 03, 2014 1:35 am

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad

Mon Nov 03, 2014 1:58 am

Приветствую..Чайник интересуется..подскажите.Домашний Роутер.
RB951G-2HnD +Winbox v6.5 +Beeline Дома Казахстан (вроде бы Dual Access PPTP, L2TP)
из настроек,специфических,что знаю MTU 1460 Адрес VPN-сервера: l2tp.internet.beeline.kz
показатели:
dns
212.76.20.3
87.247.0.133
сmd-ping на l2tp.internet.beeline.kz и vpn.internet.beeline.kz выдало такое
80.241.35.52 77.74.65.245
80.241.35.80 77.74.65.246
Собственно,т.к нуб, несколько месяцев не мог настроить роутер ..Благодаря посту выше vladme получилось, все работает..Но мне кажется, есть неточности..Ибо, подключается,если я вытащу кабель или выкл питание роутера(экспериментировал) к интернету 1,5 минуты .. Считаю,что не так.. Подскажите,что ..Настройки прилагаю ..
 RouterOS 6.5 (c) 1999-2013       http://www../

[?]             Gives the list of available mands
mand [?]     Gives help on the mand and list of arguments

[Tab]           pletes the mand/word. If the input is ambigous,
                a second [Tab] gives possible options

/               Move up to base level
..              Move up one level
/mand        Use mand at the base level
[admin@] > export pact
# jan/02/1970 00:08:17 by RouterOS 6.5
# software id = 97RA-DQZZ
#
/interface bridge
add admin-mac=4C:5E:0C:31:35:B7 auto-mac=no l2mtu=1598 name=bridge-local \
    protocol-mode=rstp
/interface ethernet
set [ find default-name=ether1 ] name=ether1-gateway
set [ find default-name=ether2 ] name=ether2-master-local
set [ find default-name=ether3 ] master-port=ether2-master-local name=\
    ether3-slave-local
set [ find default-name=ether4 ] master-port=ether2-master-local name=\
    ether4-slave-local
set [ find default-name=ether5 ] master-port=ether2-master-local name=\
    ether5-slave-local
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=\
    20/40mhz-ht-above disabled=no distance=indoors ht-rxchains=0,1 \
    ht-txchains=0,1 l2mtu=2290 mode=ap-bridge ssid=-3135BB
/ip neighbor discovery
set ether1-gateway discover=no
/interface wireless security-profiles
set [ find default=yes ] authentication-types=wpa-psk,wpa2-psk mode=\
    dynamic-keys wpa-pre-shared-key=4AC70415F494 wpa2-pre-shared-key=\
    4AC70415F494
/ip dhcp-client option
add code=55 name=parameter_request_list value=0x01F90321062A
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m \
    mac-cookie-timeout=3d
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=bridge-local name=default
/ppp profile
add name=Beeline remote-address=192.168.255.254 use-pression=no \
    use-encryption=no use-vj-pression=no
/interface l2tp-client
add add-default-route=yes allow=chap connect-to=l2tp.internet.beeline.kz \
    disabled=no max-mru=1500 max-mtu=1500 name=Beeline password=Beeline1416 \
    profile=Beeline user=0011072274
/interface bridge port
add bridge=bridge-local interface=ether2-master-local
add bridge=bridge-local interface=wlan1
/ip address
add address=192.168.88.1/24 ment="default configuration" interface=\
    bridge-local network=192.168.88.0
/ip dhcp-client
add ment="default configuration" dhcp-options=\
    hostname,clientid,parameter_request_list disabled=no interface=\
    ether1-gateway
/ip dhcp-server network
add address=192.168.88.0/24 ment="default configuration" dns-server=\
    192.168.88.1 gateway=192.168.88.1
/ip dns
set allow-remote-requests=yes
/ip dns static
add address=192.168.88.1 name=router
/ip firewall filter
пс не знаю как под спойлер затолкать ..
 
vladme
just joined
Posts: 3
Joined: Wed Aug 13, 2014 12:35 pm

Re: Dual Access PPTP, L2TP on the Mikrotik??? It is very sad.

Wed Jun 03, 2015 6:33 pm

Да, была такая проблема, при сбросе питания микротик на билайне не хотел автоматом заводиться. Лечится, как я выяснил, изменением маски вместо /24 на 22 или 21.
Чтобы автоматом настройки билайна подхватывались, не лишним будет прописать вот эту команду, даже очень рекомендую. Ну и обновитесь перед этим до самой свежей версии ПО.
/ip dhcp-client option
add code=55 name=parameter_request_list value=0x01F90321062A

Посмотрите какие адреса автоматом появляются в route list и просчитайте маску, чтобы они захватывались.
в моем случае будет вот так
add comment="Beeline VPN server subnet" distance=1 dst-address=85.21.0.0/21 \
gateway=10.185.24.1
add comment="Beeline DNS server subnet" distance=1 dst-address=213.234.192.0/21 gateway=\
10.185.24.1
Шлюз соответственно будет тоже другой у вас.

Вот с этими настройками работает еще и телевидение, можно и на ноуте смотреть часть каналов и на компе, помимо телевизора, причем разных.
/routing igmp-proxy
set quick-leave=yes
/routing igmp-proxy interface
add alternative-subnets=0.0.0.0/0 interface=ether1 upstream=yes
add interface=bridge_local
/routing pim
set switch-to-spt=no

ip firewall filter
add chain=input comment=iptv protocol=igmp
add chain=forward comment=iptv dst-port=5050 protocol=udp
add chain=input comment=iptv dst-port=5050 protocol=udp
add chain=forward comment=iptv dst-address=233.33.0.0/16 protocol=udp

Адреса вещания соответственно у вас тоже другие будут. Есть профильные темы как их находить.