7/25/2019 Mikrotik Basic
1/21
Presentation: Basic & Advanced RouterOS Setups( & ROUTEROS)
Author: Markos PapadatosProject ManagerIonianWiFi Internet Serviceswww.ionianwifi.gr
MUM ATHENS, GREECE 2015
7/25/2019 Mikrotik Basic
2/21
Mikrotik
RB9
2HnD router.
Mikrot
(http://www.mikrotik.c
wnload)
WinBox
.
ro
(Remove Configuratio
MUMATHENS,Author: Markos
7/25/2019 Mikrotik Basic
3/21
1:
Files
router
dradrop.
router (System > Rebo
2
(
Firmwar(System >
Routerboa
Upgrade).
router (System > Rebo
MUMATHENS,Author: Markos
7/25/2019 Mikrotik Basic
4/21
. :
Sy
Identity.
router.
:
SystemPassword.
&
MUMATHENS,Author: Markos
7/25/2019 Mikrotik Basic
5/21
router DHCP Server (interface).
(4 ) (subnets) IP Pools.
MUMATHENS,Author: Markos
7/25/2019 Mikrotik Basic
6/21
(Interfaces) ethe
wlan .
5 ( ppp.
wl(wireless interface) .
INTERFACE
MUMATHENS,Author: Markos
7/25/2019 Mikrotik Basic
7/21
IP
(interface). : IP >Addresses.
IP Range:192.168.1.1/24 e192.168.2.1/24 e192.168.3.1/24 e192.168.4.1/24 e
IP
MUMATHENS,Author: Markos
7/25/2019 Mikrotik Basic
8/21
DHCP S (interface).
IP > DHCP Server > DHCSetup.
Range (inte DHCP Server.
(IP RangeLease time, etc).
SERVER
MUMATHENS,Author: Markos
7/25/2019 Mikrotik Basic
9/21
router internet PPPoE.
router (DNS, NAT, etc).
MUMATHENS,Author: Markos
7/25/2019 Mikrotik Basic
10/21
PPPoE C
internet. : Interfa> PPPoE Client.
interface ewan,
credent (username,password) Out.
MUMATHENS,Author: Markos
7/25/2019 Mikrotik Basic
11/21
DNS.IP > DNS. DNS S
(.: 8.8.8.8, 8.8.4.4)
Allow Remote Requ
FNAT: srcnat masquerad: IP > Firewall > NAChain: srcnat, Action:Masquerade.
router
FIREWALL NAT
MUMATHENS,Author: Markos
7/25/2019 Mikrotik Basic
12/21
(wlan) router.
SSIDs .
MUMATHENS,Author: Markos
7/25/2019 Mikrotik Basic
13/21
WLA: Wireless.
: Mode: ap brBand: 2GHz-B/G/N, SSI . default settings.
MUMATHENS,Author: Markos
7/25/2019 Mikrotik Basic
14/21
tab: SecurProfiles
default. Mode
Dynamic Keys, Authentication Type .
!
MUMATHENS,Author: Markos
7/25/2019 Mikrotik Basic
15/21
VirtualAP T
Interfaces > +. SSID
SeProfile .
/security profiles Security Profiles.
router SSIDs !
WLAN
MUMATHENS,Author: Markos
7/25/2019 Mikrotik Basic
16/21
SSIDs , .
addresses DHCP Servers, Bridges , .
RouterOS interfaces ( vlans, vwlans).
(Bridge) wlan ether interface.
MUMATHENS,Author: Markos
BR
7/25/2019 Mikrotik Basic
17/21
Bridge Bridge.
Tab: Ports (+) interfether1-office1 wlanBridge
IP > Addre DHCP Server etoffice1 bridge1-offic
wlan1 ether1-office1
BRETHER & WLAN
MUMATHENS,Author: Markos
7/25/2019 Mikrotik Basic
18/21
DynDNS IP .
script RouterOS.
scheduler.
MUMATHENS,Author: Markos
SC
7/25/2019 Mikrotik Basic
19/21
: DynDNS.org.
Script RouterOS. : SystemScripts. s Source.
Schedule RouterOS. : SystemScheduler. script On Event Int .
DynDNS IP .
SCSCHEDULER
MUMATHENS,Author: Markos
DynDNS
Script for
RouterOS
:
7/25/2019 Mikrotik Basic
20/21
DynDNS Script for RouterOS:
MUMATHENS,Author: Markos
:local ddnsuser DYNDNSUSERNAME // change this with your dyndns username:local ddnspass DYNDNSPASSWORD // change this with your dyndns passowrd:local theinterface PPPoE-INTERFACE // change this with your PPPoE client name:local ddnshost DYNDNSHOSTNAME // change this with your dyndns hostname
//DONT CHANGE ANYTHING BELOW THIS LINE
:local ipddns [:resolve $ddnshost];:local ipfresh [ /ip address get [/ip address find interface=$theinterface ] address ]:if ([ :typeof $ipfresh ] = nil ) do={
:log info ("DynDNS: No ip address on $theinterface .")} else={
:for i from=( [:len $ipfresh] - 1) to=0 do={:if ( [:pick $ipfresh $i] = "/") do={
:set ipfresh [:pick $ipfresh 0 $i];}
}
:if ($ipddns != $ipfresh) do={:log info ("DynDNS: IP-DynDNS = $ipddns"):log info ("DynDNS: IP-Fresh = $ipfresh"):log info "DynDNS: Update IP needed, Sending UPDATE...!":local str "/nic/update?hostname=$ddnshost&myip=$ipfresh&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG"/tool fetch address=members.dyndns.org src-path=$str mode=http user=$ddnsuser \
password=$ddnspass dst-path=("/DynDNS.".$ddnshost):delay 1:local str [/file find name="DynDNS.$ddnshost"];/file remove $str:global ipddns $ipfresh
:log info "DynDNS: IP updated to $ipfresh!"} else={:log info "DynDNS: dont need changes";}
}
7/25/2019 Mikrotik Basic
21/21
Thank you!
Author: Markos Papadatos
Project ManagerIonianWiFi - Western Greece Wireless Internet Service Providerwww.ionianwifi.gr | Email: [email protected]
MUMATHENS GREECE 2015