Fortify Your MikroTik Router against Hackers with Effective Hardening Techniques

In this video, we're going to show you how to protect your MikroTik router from hackers with device hardening. Device hardening is a great way to protect your router against unauthorized access and attacks.
By hardening your router, you'll make it difficult for hackers to access your router and steal your data. We'll show you how to do device hardening on your MikroTik router and give you some tips on how to protect your router from Hackers. Be sure to check out this video to learn ways to keep your router safe from hackers!
👊Thanks for taking time to watch my video. If you could, pressing LIKE and SUBSCRIBING helps more people discover my videos. Feel free to leave a comment for any other topics you would like to see me cover or what your general opinion is of the video.
🕘Timestamps🕘
📕00:00 - Introduction
📕00:29 - Disabling Default Admin account
📕02:39 - Using Firewall Rules
📕10:31 - Disable unsecure ports
📕11:32 - Changing admin ports
📕14:00 - SSH RSA Keypair
📕18:12 - Configure a VPN
📕18:53 - Update Firmware
Support the Channel:
⭐Become a Patreon: / thenetworkberg
⭐Become a KZread Member: / @thenetworkberg
Social Media:
🌏 / thenetworkberg
🌏 / bergnetwork
🌏 / the-network-berg-39451...
MTCRE Playlist:
• Free MTCRE RoSv6
MTCNA Playlist:
• Free MTCNA RoSv6
Credits:
Thumbnail: Created on Canva
Intro: Created on Canva
Music by Alumo
Songs used:
Dioitic
Outland 85
Music by Bensound.com/free-music-for-videos
• Bensound: "The Elevato...
Thanks again for watching

Пікірлер: 95

  • @TheNetworkBerg
    @TheNetworkBerg Жыл бұрын

    Hey Guys, Are there any other things that you think a person should do that would be considered "Best Practice" when securing your MikroTik device? Feel free to let me know. Below is a list of reference material that you can use with this video to better understand certain topics: MT Getting Started: kzread.info/dash/bejne/pKue1rSFgc2zmqQ.html MT Firewall Chains: kzread.info/dash/bejne/gIyqqsaTkqTbhKw.html MT IP Services: kzread.info/dash/bejne/Zqmfrqd8l8jOqrw.html MT RSA Keys: kzread.info/dash/bejne/aqiomciMpsesgrA.html MT VPN Options: kzread.info/dash/bejne/dHV2xtF-c9m2Yaw.html MT Wireguard: kzread.info/dash/bejne/gmqamrOcZKivpMY.html MT Zerotier: kzread.info/dash/bejne/l3p9l5ujepWzfZs.html

  • @tonygoddard4977

    @tonygoddard4977

    Жыл бұрын

    For us novices would you be able to do a video that works on the default firewall rules that you get and builds on that?

  • @TheNetworkBerg

    @TheNetworkBerg

    Жыл бұрын

    @@tonygoddard4977 that's a great idea Tony, I'll add that to my list of videos that I want to make.

  • @patriklindahl4991
    @patriklindahl4991 Жыл бұрын

    I have a script that converts firehol level 1 and 2 IP block lists into Mikrotik IP lists. They are automatically updated each night. Then I use those lists to block from WAN. I have also segmented my network into different VLANs depending on what the users/servers/devices they serve. The router have explicit allow rules for the usage each VLAN requires, blocking the rest. My management network is only accessible physically from the locked server room or by a VPN tunnel from selected VLANs. Password manager for passwords. Always password protect keys. Each month I have a reminder to go thru and update the software/firmware on relevant devices.

  • @dirkcoduplessis8351
    @dirkcoduplessis8351 Жыл бұрын

    As a general rule, use REJECT when you want the other end to know the port is unreachable' use DROP for connections to hosts you don't want people to see. Usually, all rules for connections inside your LAN should use REJECT. For the Internet, with the exception of ident on certain servers, connections from the Internet are usually DROPPED. Using DROP makes the connection appear to be to an unoccupied IP address. Scanners may choose not to continue scanning addresses which appear unoccupied.

  • @xenonbart5526

    @xenonbart5526

    10 ай бұрын

    while true, scanners being automated may also choose to keep trying, which essential can turn into a DoS attack or DDoS if multiple scanners keep trying.

  • @AlexanderNecheff

    @AlexanderNecheff

    6 ай бұрын

    I also like to use DROP on Internet facing firewalls because there is a noticeable performance impact otherwise.

  • @constantin286
    @constantin286 Жыл бұрын

    Thank you, as always for another good tutorial. Re: Hardening, you could also consider setting up progressively longer timeouts for failed SSH connection attempts (see mikrotik blog - basically compile failed connection attempt IPs and ban them for longer and longer). That reduces opportunities for brute-forcing. The blog over at Mikrotik also suggests turning off Winbox in production environments, presumably because SSH is a more secure way to administer the gateway. If using the web interface is desirable, then upgrading that to HTTPS and turning off the HTTP option is pretty much a must.

  • @mrd4233
    @mrd4233 Жыл бұрын

    Awesome demo and tips! Your channel and your presentation skills about networking stuff rocks man! Thanks!

  • @TheNetworkBerg

    @TheNetworkBerg

    Жыл бұрын

    I really appreciate that, thanks for the nice feedback :D!

  • @davidwood1641
    @davidwood1641 Жыл бұрын

    Awesome! Super helpful for home users on a budget...

  • @Fozzie-Bear
    @Fozzie-BearАй бұрын

    Thanks for the many videos, certainly making my adventure into Mikrotik a lot easier.

  • @maurabbit
    @maurabbit Жыл бұрын

    Thanks again buddy, thanks to you i discover version 7, unreal man, thanks very much for all your tips.

  • @n56241
    @n56241 Жыл бұрын

    Nice vid thanks Mate

  • @technik4486
    @technik4486 Жыл бұрын

    You are great. Thanks

  • @cgolebio
    @cgolebio Жыл бұрын

    Good video. Have a question… how about physical port security-like if you have security cameras or other fixed hardware you don’t want someone to just unplug a port and plug into just anywhere. Generally I’ve seen MAC binding as something basic even though it can be spoofed it’s at least something… if there are other more secure suggestions that’d be cool to go over as well.

  • @thefixitgal
    @thefixitgal Жыл бұрын

    Thank you

  • @TheNetworkBerg

    @TheNetworkBerg

    Жыл бұрын

    Your MikroTik content is also great Sarah you do a lot more cool "Hands-On" labs and I actually love seeing you do teardowns of the hardware and going through what's ticking inside. But thank you for the nice compliment

  • @drumaddict89

    @drumaddict89

    Жыл бұрын

    haha definitely TNB just rocks with his MT videos.

  • @thefixitgal

    @thefixitgal

    Жыл бұрын

    @@TheNetworkBerg Im no longer posting on Facebook. I hope you can fill the void & start posting your tutorials in the wisp, Fisp groups. There's a lot of new wisp operators lacking understanding. They need someone like you! I just cant operate on there anymore. Its not healthy for me.

  • @TheNetworkBerg

    @TheNetworkBerg

    Жыл бұрын

    ​@@thefixitgal I'm not active on any facebook or reddit groups either. I only post on my own page now. What I found when using groups was that my posts would either not get approved or just be seen as spam and receive the most random messages critiquing stuff like my accent.

  • @kuroizora8600
    @kuroizora8600 Жыл бұрын

    thank you for your easy explanation. may I ask ? if I want to put ids/ips such as pfsense/opnsense should I put it infront of the mikrotik or after the mikrotik? thanks

  • @muhitshalgimbaev6602
    @muhitshalgimbaev6602 Жыл бұрын

    Greetings from Kazakhstan👍

  • @w0ble
    @w0ble Жыл бұрын

    Good rule of thumb is block everything and allow explicitly only what you need. That way it's visible what has access to what.

  • @toxmaster1
    @toxmaster1 Жыл бұрын

    Nice video, you should make some comments about default mikrotik firewall rules.

  • @TheNetworkBerg

    @TheNetworkBerg

    Жыл бұрын

    Thanks for the idea!

  • @superworstje
    @superworstje Жыл бұрын

    Hi, Nice video. Can you make a video about further securing your router with management vrf and dedicated management interface? Lot's of bigger mikrotik's have a dedicated management port but are part of the same vrf.

  • @marjoni
    @marjoni Жыл бұрын

    Good job

  • @cybervlado
    @cybervlado Жыл бұрын

    Thank you for all this information that you share. I appreciate this! Can you show how to upgrade packages automatically with some script?

  • @navigk4404
    @navigk44042 ай бұрын

    Thanks!

  • @TheNetworkBerg

    @TheNetworkBerg

    2 ай бұрын

    Thank you kindly for the support

  • @thenanook
    @thenanook10 ай бұрын

    awesome video, very easy to follow, thanks

  • @pierpaolocarone5783
    @pierpaolocarone5783Ай бұрын

    Grazie.

  • @JaZzDeOliveira
    @JaZzDeOliveira Жыл бұрын

    Tend to add port knock security to my device for management logins

  • @watangi
    @watangi9 ай бұрын

    Duplicate mac address "phones" for mikrotik active What is the solution, please?

  • @user-bf1cm2jm5h
    @user-bf1cm2jm5h4 ай бұрын

    Good review Only one comment - I generally drop the packet, because a reject gives a response which is information.

  • @perryuploads776
    @perryuploads776 Жыл бұрын

    Great video, I have a question though about the firewall rules. in Pfsense you make outbound and inbound rules like RouterOS, but for ICMP you need to make a inbound ICMP rule (for response of echo). On the video you only made a outbound ACL, but the client received a inbound ICMP. how is this possible? only TCP connections are connection oriented, so that would be a statefull firewall, UDP and ICMP doesn't keep track of a connection, it just shoots packets and hope something returns back . For that packet to come back a inbound rule for the ICMP should be made right ? Or is all inbound traffic for ICMP default allowed on Mikrotik ? Thanks again.

  • @TheNetworkBerg

    @TheNetworkBerg

    Жыл бұрын

    The MikroTik is a stateful firewall, the ICMP Out rule was for traffic leaving from the LAN to the internet which is how I was able to make pings stop and also make them work because the return traffic is automatically being allowed. The Deny rule I added is for traffic from the outside like the internet trying to initiate a connection to the MikroTik on it's "WAN" port.

  • @trexx_media
    @trexx_media Жыл бұрын

    love from India.....

  • @drumaddict89
    @drumaddict89 Жыл бұрын

    very well explained - as always! got to share it to two friends to get a basic grasp of security on MTs thanks for the curl tip btw! much appreciated PS: could you make an updated video on VRRP on rOS7 maybe?

  • @TheNetworkBerg

    @TheNetworkBerg

    Жыл бұрын

    Much appreciated! Will probably revisit VRRP as well :D

  • @drumaddict89

    @drumaddict89

    Жыл бұрын

    @@TheNetworkBerg yeah i would love to do it myself but i cannot seem to get eve-ng to run properly. nodes are not starting or when they start they turn off after ~1s

  • @MOOOS-REWFEWETRGTEerTGTRGRHRHR
    @MOOOS-REWFEWETRGTEerTGTRGRHRHRАй бұрын

    You can also accept all input from the IPs of MGMT-range, then set another rule to finally drop all remaining packets, without designating any in/out interface.

  • @asarkhan1933
    @asarkhan19336 ай бұрын

    Hlo, I was wondering if you could help me to understand what is split tunneling and how to configure it. Please create one video. I really like your video. And it is very easy for me to understand. Your explaining is very unique.

  • @n56241
    @n56241 Жыл бұрын

    Nice tip for reject ICMP, how to enable ping from Mikrotik, now this rulle ist only allowed to ping from Lan > to internet, but Mikrotik router not allowed to ping from terminal?

  • @antoniocerasuolo757
    @antoniocerasuolo7575 ай бұрын

    I can understand when you say management range 172.16.0.0/24 which is your LAN is yuour management network but what does it mean when you say management network 192.168.149.0/24 ? does this mean that if you aree also sitting on this network you will be able to access the router? which is probabaly the WAN interface IP LAN?

  • @oliverrichardblancofernand5651
    @oliverrichardblancofernand56512 ай бұрын

    como puedo hacer para q funcione el hotspot con esta configuracion en mikrotik no puedo hacerlo funcionar amigo me sale red no disponible en la señal wifi

  • @bartomiejsikora910
    @bartomiejsikora910 Жыл бұрын

    We want how to firewall in details. Ty for awesome vids

  • @TheNetworkBerg

    @TheNetworkBerg

    Жыл бұрын

    I will definitely deep dive specifically more into the Firewall itself and other security features we have available on MikroTik.

  • @johndutt1436
    @johndutt1436 Жыл бұрын

    Great video - I disabled all IP Service except Winbox 8291. I allowed only internal LANs to access. However, after doing an NMAP scan externally, I noticed that port 8291 is open externally. Is there a way to shut this off externally but have it accessible internally for Inbox admin? Thanks.

  • @TheNetworkBerg

    @TheNetworkBerg

    Жыл бұрын

    You could use an input firewall filter rule to drop port 8291 traffic on the incoming WAN port

  • @johndutt1436

    @johndutt1436

    Жыл бұрын

    @@TheNetworkBerg Thanks!!!

  • @yuralatala9520
    @yuralatala9520 Жыл бұрын

    Great video as always 🙂 Just one small problem I'm no savvy when it comes to computers. so excuse my lack of knowledge in resolving this problem, I just got the Mikro tik a few days ago and I have a few updates but when I watch and try to apply the updates as you explain it come up with this message (Couldn't perform action - not permitted (9) . How do I remove this message so I can update my rooter/WIFI. awesome

  • @TheNetworkBerg

    @TheNetworkBerg

    Жыл бұрын

    It sounds like the account you use to administrate the device doesn't have sufficient admin privileges, is your account a read/write admin?

  • @yuralatala9520

    @yuralatala9520

    Жыл бұрын

    @@TheNetworkBerg Hi Mr. Berg 😁 I have Administrative access only. yip I guess I cant really do much, but I do see that there is upgrades available for my Rooter that has not automatically upgraded as of yet. Not sure how to change this know. Keep up with the awesome job you doing

  • @DenverRoot
    @DenverRoot10 ай бұрын

    So many mentions in this video of "in the pinned comment", except there are no pinned comments. ☹ By sorting the comments by date and then scrolling all the way to the bottom I found the intended comment... could you pin it for easier access? ♥

  • @TheNetworkBerg

    @TheNetworkBerg

    10 ай бұрын

    Was sure I did pin the comment, might have unpinned it by accident will definitely update it

  • @walden_
    @walden_ Жыл бұрын

    Did you cover how to disable any sort of ssh login if the keys don't match? You mentioned that as a possibility, but I don't think it was covered. I love using keys so I don't have to type my password, but keeping people out who don't have the keys would be nice.

  • @TheNetworkBerg

    @TheNetworkBerg

    Жыл бұрын

    The method I demonstrated should do this automatically. If anyone without the SSH key tries to SSH onto the router they will not be able to connect. They can type in the username & password (Even with it being correct) and access will be denied.

  • @walden_

    @walden_

    Жыл бұрын

    @@TheNetworkBerg Oh ok cool. I'll test it out. Thanks.

  • @Jorvs
    @Jorvs Жыл бұрын

    Do you have a video on dual isp? Load balancing, sperate gaming, browsing and downloading?

  • @TheNetworkBerg

    @TheNetworkBerg

    Жыл бұрын

    I have multi-wan videos, however, I don't think I explicitly have it setup in a way where gaming traffic uses one link and all other normal traffic uses another link. Will add this to my todo list :)!

  • @Jorvs

    @Jorvs

    Жыл бұрын

    @@TheNetworkBerg Thank you ^_^

  • @didzisuzulins2092
    @didzisuzulins20928 ай бұрын

    There are 2 better ways to copy your ssh public key to remote host. 1. A Linux command "ssh-copy-id". I haven't tested it with Mikrotik, but it's the correct way to install ssh key to remote hosts ~/.ssh/authorized_keys file. 2. A Linux command "scp" what is also bundled with "ssh" command on every Linux distro. It works the same way as "ssh" command (most parameters match the parameters of "ssh" command), so you won't have to expose your password on videos.

  • @teacher_bernie
    @teacher_bernie9 ай бұрын

    just works with ROS 7 ??? NOT FOR PREVIOUS VERSIONS?

  • @IG2296
    @IG2296 Жыл бұрын

    Like

  • @FunnyTukums
    @FunnyTukums6 ай бұрын

    Since MTik deplyed Back-To-Home feature (based on Wireguard) there is no reasonable option use another secure access to your Mikrotik

  • @FunnyTukums

    @FunnyTukums

    6 ай бұрын

    Wireguard is absolute secure VPN for remote access to the MTik

  • @TheNetworkBerg

    @TheNetworkBerg

    6 ай бұрын

    If you plan on creating an access list with wireguard(BTH) being a part of that management list it makes sense to restrict access based off of that it makes complete sense, it does however not invalidate many of the best practices described in this video like upgrading your firmware etc.

  • @FunnyTukums

    @FunnyTukums

    6 ай бұрын

    Hackers need to discover IP address and they do not have peer Public Key. And WG presence is not scanable until public key being sent to the peer....

  • @warpdag
    @warpdag Жыл бұрын

    Decent start but you left out all the tools still enabled by default, like bandwidth server. Also, stuff like neighbor discovery, it needs to be killed. Or even mac-server, kill it, much cleaner to dedicate one interface to management and bind the associated subnet under services for https-only access (and for that, you need to show how to create a certificate). And so on… Security is only as strong as the weakest link

  • @pheaktravlog149
    @pheaktravlog1497 ай бұрын

    My Mikrotik has been hacked by someone, they create new user and put my user to read only. They disable all reset. Do you know how to solve.?

  • @TheNetworkBerg

    @TheNetworkBerg

    7 ай бұрын

    Either factory reset by holding down the reset button physically on your MikroTik or use the netinstall tool to completely reload ROS with the default configuration. You will have to reconfigure everything...

  • @rodrigoroaduterte9415
    @rodrigoroaduterte94158 ай бұрын

    What the sense of creating a new account and disabling the old one when you may just RENAME it?

  • @TheNetworkBerg

    @TheNetworkBerg

    8 ай бұрын

    I guess you could do that, I just prefer having a separate object ID for a user should something weird happen in the event of a firmware upgrade/downgrade.

  • @kevinmiole
    @kevinmiole Жыл бұрын

    Nice tutorial. Then a wifi user shares the wifi password with a QR code. How do we stop that?

  • @9mk
    @9mk Жыл бұрын

    Hello.. How can I know the PIN WPS code of Mikrotik router please

  • @jasperwilliams5729
    @jasperwilliams572910 ай бұрын

    Excuse me sir, wine is not an emulator 😂

  • @TheNetworkBerg

    @TheNetworkBerg

    10 ай бұрын

    😂

  • @oleksiistri8429
    @oleksiistri84295 ай бұрын

    "legacy IP" sounds funny, considering that 99.9% of internet is still ipv4

  • @anthonyverwey9684
    @anthonyverwey96842 ай бұрын

    Are you South African by any chance?

  • @TheNetworkBerg

    @TheNetworkBerg

    2 ай бұрын

    Yes I'm South African

  • @anthonyverwey9684

    @anthonyverwey9684

    2 ай бұрын

    @@TheNetworkBerg Mooi man! Thought I couldn’t miss the accent. Great channel, btw. 👍🏻 I’ve just started getting into Mikrotik devices and found your content easy to understand, very helpful, thanks.

  • @Anavllama
    @Anavllama Жыл бұрын

    I reject (pun intended) your approach on the input chain. Why add the confusion of negative symbol. The best advice, especially for new users, is to state adopt most of the default rules, they are good for many reasons, then add the traffic that should be allowed ( easy to discern ) and then drop all else. So in this case, add chain=input action=accept src-address-list=Management where the firewall address list could be comprised of admin IP on any subnet desired, admin IP for the devices on the lans used, could be desktop, laptop, ipad and finally admin IPs for any VPN remote warrior connections coming in. Thus only the admin has full access to the router, heck one could even limit that just to the winbox port........ As for the rest of the lan users ( interface-list=LAN) they need normally simply DNS services (tcp,udp) and perhaps NTP and the last rule should block all else. SImple clean neat, easy conceptually. So forget about complex negatives ( and the use of the ! symbol is not trivial and can have unintended consequences ). I should add if applicable one also adds the ability for any incoming vpn connections to connect to the router services coming in from the WAN side.

  • @Anavllama
    @Anavllama Жыл бұрын

    I am not sure I understand the concept or context of what you are doing for forward chain firewall rules. FIrst I dont like any rules that dont have a clear ( from where and going to where ). Ambiguity is NOT a good thing. It also tends to mix up purposes and intent so that the reader is left in the dark and the originator may not understand consequences of open ended rules. For example your intent to only allow 80, 443 and 53 makes sense For 80,443 ( LAN TO WAN ) and for 53 ( WHY). THis in effect allows users to use the DNS server of their choice and in terms of security in hardening, its much better to provide that FOR them etc... be it on router services, set in DHCP servers, redirect etc.. DNS is a whole other topic anyway. Finally, you have effectively blocked email and telephone services by restricting to the above ports.......... Once again a clear consistent easy to follow approach leads to good security and understanding of the config. keep the good default rules, add user required traffic, drop all else. Nothing wrong with attempting to limit what ports are used outbound but one has to really know what they are doing. Also your open ended rules block users from accessing any servers on other local subnets for example.........

  • @webkazan2007
    @webkazan2007 Жыл бұрын

    Ерунда!

  • @TheNetworkBerg

    @TheNetworkBerg

    Жыл бұрын

    No? These are pretty much industry standard things to do whenever it comes to security, in most cases the human element is the main culprit :)

  • @qfina
    @qfina Жыл бұрын

    A network router is pronounced roo-ter, not row-ter, thats a woodworking tool.

  • @TheNetworkBerg

    @TheNetworkBerg

    Жыл бұрын

    Rooter, rowter, same shit different pronunciations:^) I actually pronounce it both ways depending on my audience, which for the most part on KZread are based in the US.

  • @chuy8549

    @chuy8549

    11 ай бұрын

    A horse trained for distance races is also called a "roo-ter" you piece of $***!

  • @VoklavTube
    @VoklavTube Жыл бұрын

    From the change log of ver 7.7: ssh - added support for Ed25519 key exchange; :O

  • @TheNetworkBerg

    @TheNetworkBerg

    Жыл бұрын

    Need to test it out, but would be great if it works.