---
# System prepended metadata

title: Mikrotik RouterBoard

---

# Mikrotik RouterBoard

## GRE Tunnel

ref. [MikroTik Site to Site GRE Tunnel Configuration with IPsec - System Zone](https://systemzone.net/mikrotik-site-to-site-gre-tunnel-configuration-with-ipsec/)

看youtube影片會比較清楚
* [MikroTik Site to Site GRE Tunnel Configuration with IPsec - YouTube](https://www.youtube.com/watch?v=udoqiU_X9mY)


## L2TP Server

ref. [MikroTik L2TP VPN Setup - Cloud Brigade](https://www.cloudbrigade.com/mikrotik-l2tp-vpn-setup/)

* LAN Interface -> proxy arp
* l2tp-in 加入LAN，才不會被Firewall擋住

ref. [How to create a simple VPN server with Mikrotik ( L2TP/IPSec ) - YouTube](https://www.youtube.com/watch?v=WW2i5SVcPw4)

## L2TP Client

* [Mikrotik device as a L2TP/IPSec client | MiViLiSNet](https://mivilisnet.wordpress.com/2017/01/26/mikrotik-device-as-a-l2tpipsec-client/)
* [Connect to L2TP VPN on Ubuntu 20.04 - Ana's Dev Scribbles](https://www.amarjanica.com/connect-to-l2tp-vpn-on-ubuntu-20-04)

* 把 l2tp-out 加入WAN，才不會被Firewall擋住

## Ubuntu L2TP Client

* Netplan

加上 renderer: NetworkManager
```
network:
  version: 2
  renderer: NetworkManager
  ethernets:
    enp0s25:
      dhcp4: yes
    config:
      dhcp4: yes
```

* L2TP版本問題

手動更新版本v1.3.16

    sudo apt install libpcap-dev
    git clone https://github.com/xelerance/xl2tpd.git
    cd xl2tpd
    git checkout v1.3.16
    make
    sudo make install

[vpn - 22.04 l2tp client not working - Ask Ubuntu](https://askubuntu.com/questions/1405854/22-04-l2tp-client-not-working)
* [vpn - How to set up L2TP client on Ubuntu 18.04? - Ask Ubuntu](https://askubuntu.com/questions/1146861/how-to-set-up-l2tp-client-on-ubuntu-18-04)

## DNS

     /ip dns> set servers=140.96.254.100,140.96.254.102,140.96.254.96 allow-remote-requests=yes

## Hostname

    /system identity set name=MyRouter

## Firewall

* [Basic universal firewall script - MikroTik Wiki](https://wiki.mikrotik.com/wiki/Basic_universal_firewall_script)
* [Building Advanced Firewall - RouterOS - MikroTik Documentation](https://help.mikrotik.com/docs/display/ROS/Building+Advanced+Firewall)

export

    ip firewall filter export file-name=firewall

import

    import file-name=firewall.rsc

# Wireguard

* [How to setup Proton VPN on MikroTik routers using WireGuard](https://protonvpn.com/support/wireguard-mikrotik-routers/)

## Reference

* [pwlgrzs/Mikrotik-Blacklist: Mikrotik friendly blacklist to filter all these damn hackers.](https://github.com/pwlgrzs/Mikrotik-Blacklist)
