The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,861 other subscribers

Archive for the ‘MikroTik’ Category

Mikrotik firewall URLs

Posted by jpluimers on 2017/06/14

Some links that inspired me for various Mikrotik firewall rules:

–jeroen

Posted in Development, Internet, MikroTik, Power User, RouterOS, routers, Scripting, Software Development | Leave a Comment »

URLs for Mikrotik scripts to block IP addresses after repetitive login failures

Posted by jpluimers on 2017/06/13

For my research list:

–jeroen

Posted in Development, Internet, MikroTik, Power User, RouterOS, routers, Scripting, Software Development | Leave a Comment »

Mikrotik – splitting your local LAN so you can assign different gateways and DNS servers by the DHCP server

Posted by jpluimers on 2017/06/09

When you want your Mikrotik DHCP Server handout different gateways (or DNS/WINS/NTP/.. servers and other settings), many of the answers tell you to fiddle with the DHCP networks like DHCP Server different gateways – MikroTik RouterOS [WayBack] but lack concrete examples, so here we go elaborating a lot on DHCP server with static leases – MikroTik RouterOS [WayBack]:

Read the rest of this entry »

Posted in Internet, MikroTik, Power User, routers | Leave a Comment »

Mikrotik scripting language: a list of questions I had linking to the forum messages having answers

Posted by jpluimers on 2017/06/08

The RouterOS scripting language you can use on Mikrotik device immediately shows it’s origin: the console.

  • It is a statement oriented language where statement separators can be both semicolons and new-lines.
  • You can use the \ at the end-of the line as line-continuation character effectively spreading statements over multiple lines.

As promised some links to questions I asked:

Some questions by others that were also extremely useful:

And a few observations:

  • Functions do not need to be global. The RouterOS Scripting Manual paragraph on functions shows an example with :global that works just as fine with :local
    :local myFunc do={:put "hello from function"} 
    $myFunc
     
    # output: 
    # hello from function
  • a

–jeroen

Posted in Development, Internet, MikroTik, Power User, RouterOS, routers, Scripting, Software Development | 1 Comment »

APC 7xxx models, DHCP Option 43 and Mikrotik DHCP servers

Posted by jpluimers on 2017/06/07

When switching my DHCP to a Mikrotik CCR1009, both the AP7920 and AP7921 failed to get IP addresses. The APC7921 would look bounce between waiting and offered states like this:

The cause is the need of DHCP Option 43 (Vendor Class Identifier) specified in RFC2132 – based on [WayBack] RFC 2131 – Dynamic Host Configuration Protocol and [WayBackRFC 1533 – DHCP Options and BOOTP Vendor Extensions – which I found first via these links:

Read the rest of this entry »

Posted in Development, Internet, MikroTik, Power User, RouterOS, routers, Scripting, Software Development | 3 Comments »

Reminder to self: when your PPTP server is behind a NAT, forward both GRE protocol and TCP port 1723

Posted by jpluimers on 2017/06/06

The WAN sides of my Mikrotik CCR1009 are partly behind Fritz!Box routers that do NAT and contain a truckload of port-forwards.

A while ago, I wanted the CCR1009 to do PPTP as Fritz!Box 7360 and 7490: static routes over VPN don’t work (so I could only VPN to the WAN side of the CCR1009). However, it would not pass through the Fritz!Box from the outside.

It appears you need to forward both:

Maybe one day I will ditch the Fritz!Box 7490 and directly hookup the Mikrotik to the NTU: xs4all ftth en Mikrotik router – Google Groups.

But preferably I should follow Don’t use PPTP, and don’t use IPSEC-PSK either (via: CloudCracker blog)

–jeroen

via: VPNs einrichten mit PPTP – administrator.de: Achtung mit PPTP VPN Servern hinter NAT Firewalls !

Forward both PPTP TCP port 1723 and the GRE protocol

Forward both PPTP TCP port 1723 and the GRE protocol

Posted in Fritz!, Fritz!Box, Fritz!WLAN, Internet, IPSec, MikroTik, Network-and-equipment, Power User, PPTP, routers, VPN | Leave a Comment »

Mikrotik – Choosing your SFP/SFP+ modules and direct access cables

Posted by jpluimers on 2017/05/09

For hooking up SFP and SFP+ ports on Mikrotik devices you basically have two options:

  • Direct Access Cable (passive and affordable for 1 and 2 meters; active and more expensive for more than 3 meters)
  • SFP/SFP+ modules with LC-LC optic fiber cable in between them (pairs of modules are more expensive than passive DAC, but the fiber is a lot cheaper)

Choosing the SFP/SFP+ modules is a bit intimidating as the MikroTik SFP module compatibility table – MikroTik Wiki has very few details.

Then I found sfp_all-150601132341.pdf (archived) which lists many of the SFP and SFP+ modules including their specifications.

Since neither the matrix nor the PDF contains links to the products, here is a small list of what I could source last year and is compatible with both the CCR1009 routeres and CRS226 switches:

–jeroen

via: Connect CCR1009 with CSR226 over a longer distance than 3 meter – MikroTik RouterOS

Posted in Internet, MikroTik, Power User, routers | Leave a Comment »

Some links for MikroTik tips and scripts

Posted by jpluimers on 2017/04/25

MikroTik has great hardware, but getting things to work can be a bit ehm intimidating.

So here are some links that were useful getting my CCR1009 and CRS226 configurations to do what I wanted.

Very advanced stuff:

Packet flow (maybe the toughest part to wrap your head around):

Scripts:

Load balancing:

Syntax highlighting:

Pictures

Very well written blog:

Manito Network’s Mikrotik solutions blog. In-depth articles on Mikrotik routing, security, best practices, VPN, and more.

Source: Mikrotik — Manito Networks

Solutions for RouterOS-based Mikrotik networks. Includes security and best practices, VPN, routing, switching, and more.

Source: Mikrotik-1 — Manito Networks

–jeroen

Posted in DNS, Internet, IPSec, MikroTik, Network-and-equipment, OpenVPN, Power User, PPTP, routers, VPN | Leave a Comment »

Multi-WAN routers compared

Posted by jpluimers on 2016/05/20

Mikrotik have statistics and way more features. Of the not so good features on the TP-LINK ER-5120 multi-WAN router (none of which are mentioned in their documentation), the worst 2 are:

  • Virtual-Server table can only handle 32 incoming port redirects
  • no IPv6 support
  • both incoming WAN and outgoing NAT isn’t very stable (my guess it’s a NAT table filling up)

Source: Gigabit Load Balance Broadband Router TL-ER5120 – Welcome to TP-LINK

Source: MikroTik – Forum – Tweakers

RouterBoard RB3011UiAS-RM description. The RB3011 is a new multi port device, our first to be running an ARM architecture CPU for higher performance than ever before. The RB3011 has ten Gigabit ports divided in two switch groups, an SFP cage and for the first time a SuperSpeed full size USB 3.

Source: RouterBoard.com : RB3011UiAS-RM (link has high res images)

Source: RB3011UiAS-RM – MikroTik RouterOS

The CCR1009 will always be faster, even passively cooled: Source: RB3011 Fan Notice compared to CCR 1009 – MikroTik RouterOS. The passively cooled versions run at a lower clock-speed which you can even make lower yourself:Source: CCR1009-8G-1S-1S+PC lower clock – MikroTik RouterOS. On the active cooled CCR1009, you can replace the fans to make them more quiet: Source: CCR1009-8G-1S-1S+ General info & Questions – Page 2 – MikroTik RouterOS

Note the ports in/out the switch groups on the CCR1009: Source: CCR 1009 switch chip menu – MikroTik RouterOS

RouterBoard CCR1009-8G-1S-1S+PC description. Our popular 9-core Cloud Core Router is now available in a new passive cooling enclosure. This CCR1009 unit is equipped with two heat-pipes and a specially designed heat-sink, so its completely silent.

Source: RouterBoard.com : CCR1009-8G-1S-1S+PC

RouterBoard CCR1009-8G-1S-PC description. Our popular 9-core Cloud Core Router is now available in a new passive cooling enclosure. This CCR1009 unit is equipped with two heat-pipes and a specially designed heat-sink, so its completely silent.

Source: RouterBoard.com : CCR1009-8G-1S-PC

Source: Advise: CCR1009-1S-PC – MikroTik RouterOS

Source: CCR1009-8G-1S-1S+ is a BEST ROUTER !!! – MikroTik RouterOS

When the power supply breaks: Source: CCR1009-8G question about part number – MikroTik RouterOS

The actively cooled CCR1009 with lots of pictures and screenshots: Source: CCR1009-8G-1S-1S+ General info & Questions – MikroTik RouterOS

Mikrotik with xs4all

Source: Eigen router achter een XS4ALL-VDSL-aansluiting (2) | Harold Schoemaker

Source: xs4all ftth en Mikrotik router – Google Groups

Heeft iemand van jullie ook ervaring met IPv6 van XS4all met een fritzbox? Ik wil namelijk achter deze fritzbox een mikrotik plaaten en IPv6 door routeert.

Source: IPv6 mikrotik router achter een fritzbox.

Source: [Ervaringen/discussie] MikroTik-apparatuur – Netwerken – GoT

–jeroen

Posted in Internet, MikroTik, Power User, routers | Leave a Comment »

Buffalo WLAE-AG300N DHCP client is buggy and adds a NULL character to the host name.

Posted by jpluimers on 2016/05/13

Buffalo WLAE-AG300N is one of those buggy DHCP clients… Even running firmware Ver.1.85 (R1.05/B1.00)), it gets the length of the DHCP host name wrong so adds a bogus NULL byte to that name.

@Buffalo: please fix this.

The DHCP client options are of structure Type/Length/Value so a client is supposed to set the length of the hostname to exactly the number of characters.
However there exist buggy clients that either send a length of 1 more and a \00 at the end of the name, or send a fixed length and pad it with \00 as necessary.

Source: DHCP server: Odd active hostname behaviour: some views have null character at the end, some don’t. – MikroTik RouterOS

Fromt a packet capture:

Buffalo WLAE-AG300N gets the length of the DHCP name wrong and inserts an extra NULL character.

Buffalo WLAE-AG300N gets the length of the DHCP name wrong and inserts an extra NULL character.

This besides these devices also not automatically powering up when power goes out and comes back up

Mikrotik packet capture and viewing it in Wireshark

Anyway: getting and displaying the packet capture was quite easy:

  1. In Winbox (or from the console):
    1. Tools ->
    2. Packet Sniffer ->
    3.  General tab: set filename and file limit, then click Apply
    4. Filter tab: choose the interface, protocol (UDP) and port (67), then click Apply
    5. Click Start
    6. Wait for the DHCP refresh to happen
    7. Click Stop
  2. In Winbox (or from the console):
    1. Files -> Choose the captured file -> Download
  3. In your file manager, ensure the downloaded file gets the .pcap extension
  4. In Wireshark: load the .pcap file and inspect it

 

–jeroen

Posted in Access Points, Buffalo, Internet, MikroTik, Power User, routers | Leave a Comment »