Documente Academic
Documente Profesional
Documente Cultură
Barry Higgins
Allness IT
UK MuM 2018
Who am I?
●
Barry Higgins
●
Made a living from I.T. since 1996
●
Started a WISP in 2009
●
MikroTik consultant since 2015
●
Independent UK MikroTik Trainer since 2016
●
I am not a security expert
●
I repeat I am not a security expert
2 UK MuM 2018
The importance of security
3 UK MuM 2018
The importance of Security
Because ?
●
Audience participation.. (yeah sure, like that’ll happen !)
●
By the way, feel free to ask questions during the presentation. I’ll do
my best to answer there and then rather waiting till the end.
4 UK MuM 2018
The importance of Security
●
We don’t want to be part of an attack!
●
We don’t want to share all our secrets!
5 UK MuM 2018
The importance of Security
So what do we do?
6 UK MuM 2018
Which option to go with...
Factory Default
Or
Bespoke?
7 UK MuM 2018
Lets start with...
Factory Default?
8 UK MuM 2018
Factory Default
9 UK MuM 2018
Factory Default
Step 1..
10 UK MuM 2018
Factory Default
11 UK MuM 2018
Factory Default
Terminal/CLI..
12 UK MuM 2018
Factory Default
13 UK MuM 2018
Factory Default – new user
14 UK MuM 2018
Factory Default
Logout user ‘admin’ and login with ‘NewUser’ to disable the admin account
15 UK MuM 2018
Factory Default
Terminal/CLI..
[admin@MikroTik] > /user add \
name=NewUser group=full \
Password="********" \
Address=192.168.88.0/24
16 UK MuM 2018
Factory Default
Why? ..
17 UK MuM 2018
Factory Default
Also note..
18 UK MuM 2018
Factory Default
However….
19 UK MuM 2018
Factory Default
/IP Services
Telnet API FTP Winbox SSH are all enabled LAN side
20 UK MuM 2018
Factory Default – IP Services
21 UK MuM 2018
Factory Default – IP Services
0 XI telnet 23
1 XI ftp 21
2 XI www 80
3 ssh 22
4 XI www-ssl 443 none
5 XI api 8728
6 winbox 8291
7 XI api-ssl 8729 none
22 UK MuM 2018
Factory Default
23 UK MuM 2018
Factory Default – Update RouterOS
24 UK MuM 2018
Factory Default – Update RouterOS
25 UK MuM 2018
Factory Default – Update RouterOS
26 UK MuM 2018
Factroy Default
27 UK MuM 2018
Factory Default - Routerboot
28 UK MuM 2018
Factory Default - Routerboot
29 UK MuM 2018
Routerboard Security
That’s it.
30 UK MuM 2018
Factory Default
No wait...
There’s more!
31 UK MuM 2018
Factory Default
32 UK MuM 2018
Factory Default – MAC servers
33 UK MuM 2018
Factory Default – MAC servers
34 UK MuM 2018
Factory Default – MAC servers
35 UK MuM 2018
Factory Default – Neighbor Discovery
Information seen..
37 UK MuM 2018
Factory Default – Neighbor Discovery
38 UK MuM 2018
Factory Default – Neighbor Discovery
39 UK MuM 2018
Factory Default – Disable ports
40 UK MuM 2018
Factory Default – Disable ports
41 UK MuM 2018
Factory Default – Disable ports
42 UK MuM 2018
Factory Default - Wireless
Wireless interface :
Its alive and accepting connections!
43 UK MuM 2018
Factory Default - Wireless
44 UK MuM 2018
Factory Default - Wireless
How to..
45 UK MuM 2018
Factory Default - Wireless
46 UK MuM 2018
Factory Default - Wireless
47 UK MuM 2018
Factory Default – Btest Server
48 UK MuM 2018
Factory Default – Btest Server
49 UK MuM 2018
Factory Default – NTP
50 UK MuM 2018
Factory Default – NTP
51 UK MuM 2018
Factory Default - NTP
52 UK MuM 2018
Factory Default – NTP
53 UK MuM 2018
Factory Default - Packages
And finally…
54 UK MuM 2018
Factory Default - Packages
55 UK MuM 2018
Bespoke option
Why?
56 UK MuM 2018
Bespoke option
57 UK MuM 2018
Bespoke option
58 UK MuM 2018
Bespoke option
59 UK MuM 2018
Bespoke option
------------------------------------------------------
You can type "v" to see the exact commands that are
used to add and remove
this default configuration, or you can view them later
with
'/system default-configuration print' command.
To remove this default configuration type "r" or hit
any other key to continue.
If you are connected using the above IP and you remove
it, you will be disconnected.
60 UK MuM 2018
Bespoke option
Now what?
61 UK MuM 2018
Bespoke Option
First..
62 UK MuM 2018
Bespoke Option
In brief..
1) New username and password
2) IP Services
3) RouterOS and Routerboot
4) Mac server / Bandwidth Test
5) Packages
63 UK MuM 2018
Bespoke Option
64 UK MuM 2018
Bespoke Option
The Firewall..
65 UK MuM 2018
Bespoke Option - Firewall
66 UK MuM 2018
Bespoke Option - Firewall
●
The sequence is this -
●
Allow the packets you want
●
Block everything else
67 UK MuM 2018
Bespoke Option - Firewall
Allow options..
●
Typically 3 ways to approach this -
●
Individual specific rules
●
Utilising address lists for grouping networks
●
New ‘chains’ combining the above
68 UK MuM 2018
Bespoke Option
69 UK MuM 2018
Bespoke Option - Firewall
70 UK MuM 2018
Bespoke Option – Firewall
71 UK MuM 2018
Bespoke Option – Firewall (matcher)
72 UK MuM 2018
Bespoke Option – Firewall (action)
73 UK MuM 2018
Bespoke Option – Firewall (matcher/action)
CLI/Terminal..
74 UK MuM 2018
Bespoke Option – Firewall
Individual accept..
75 UK MuM 2018
Bespoke Option - Firewall
76 UK MuM 2018
Bespoke Option – Firewall (address list)
77 UK MuM 2018
Bespoke Option – Firewall (address list)
CLI/Terminal..
[NewUser@MikroTik] > /ip firewall filter add
chain=<input/output/forward>
<src/dst-address-list>=<address-list>
action=accept
78 UK MuM 2018
Bespoke Option - Firewall
Chains
79 UK MuM 2018
Bespoke Option – Firewall (chain jump)
80 UK MuM 2018
Bespoke Option – Firewall (NewChain action)
81 UK MuM 2018
Bespoke Option – Firewall (address list)
CLI/Terminal..
[NewUser@MikroTik] > /ip firewall filter add \
chain=<input/output/forward> \
<matcher> \
action=jump jump-target=NewChain
82 UK MuM 2018
Bespoke Option - Firewall
●
Established / related packets
●
Protocols
●
ICMP & Routing
●
VPN’s
●
Management access
83 UK MuM 2018
Bespoke Option - Firewall
Firewall efficiency
●
Deal with the biggest bulk of packets first
●
Process unwanted and known bad packets/traffic
●
Process wanted and known good packets/traffic
●
Deal with the unknown last
●
New streams
84 UK MuM 2018
Bespoke Option - Misc
85 UK MuM 2018
Bespoke Option - Misc
IP Services..
●
Restrict the networks these services are
allowed from.
●
Perhaps even contemplate changing the listening port –
‘security by obscurity’
86 UK MuM 2018
Bespoke Option – Misc (Ip Services revisited)
87 UK MuM 2018
Bespoke Option – Misc (Ip Services revisited)
[NewUser@MikroTik] > /ip service print
Flags: X - disabled, I - invalid
# NAME PORT ADDRESS CERTIFICATE
0 XI telnet 23
1 XI ftp 21
2 XI www 80
3 ssh 10022 0.0.0.0/0
4 XI www-ssl 443 none
5 XI api 8728
6 winbox 8291 192.168.88.0/24
7 XI api-ssl 8729
[NewUser@MikroTik] > /ip service set ssh port=10022 \
address=0.0.0.0/0
[NewUser@MikroTik] > /ip service set winbox \
address=192.168.88.0/24
88 UK MuM 2018
Bespoke Option – Misc (SSH)
Ssh..
89 UK MuM 2018
Bespoke Option – Misc (SSH)
90 UK MuM 2018
Bespole Options - Misc
Or consider..
91 UK MuM 2018
Bespoke Option – (Misc RP Filtering)
92 UK MuM 2018
Bespoke Option – (Misc RP Filtering)
93 UK MuM 2018
Bespoke Option – (Misc RP Filtering)
94 UK MuM 2018
Bespoke Option - Misc
95 UK MuM 2018
Bespoke Option - Misc
Routing protocols..
OSPF (v2)
●
Use authentication between routers
(even if it isn’t that strong- MD5/password)
●
Do not broadcast OSPF on interfaces that are visible by prying eyes
(enable passive on the interface in question)
96 UK MuM 2018
Bespoke Option - Misc
Routing cont..
BGP
●
Filters – Only allow the routes you want to have and to send
●
Firewall – Only allow the peers you want to see and talk to
97 UK MuM 2018
Bespoke Option
98 UK MuM 2018
Check list - ‘factory defualt’
99 UK MuM 2018
Checklist – No factory defaults