How to Secure a Linux Server with UFW, SSH Keygen, fail2ban & Two Factor Authentication

preview_player
Показать описание
In-depth guide on how to secure a Linux home server running Ubuntu 20.04. This video explains how to change the default SSH port, how to configure an UFW firewall, how to use ssh key-based authentication, how to install and configure fail2ban, and finally how to setup two factor authentication (2FA).

This video is part of my ultimate home server tutorial video series!
Part 3: You are here :)

Timeline:
00:00 - Intro
01:21 - Get a VPN for less than 50$ for a full year!
02:25 - How to change default SSH port
05:26 - How to set up UFW
09:02 - How to set up key-based authentication
12:11 - How to disable password based authentication
12:52 - How to set up fail2ban
16:03 - How to set up two factor authentication

Video Resources

#Secure #Server #TechGuides
Рекомендации по теме
Комментарии
Автор

I would love an apache webserver tutorial from you. These are very concise and extremely useful. Thank you for making them. There are a lot of verbose and confusing tutorials out there that can be difficult to follow.

feralshadw
Автор

Very helpful video, thanks!

Just a couple of things to note from my experience of trying to do some of these:

1. I think you need to edit/add the [sshd] jail in jail.local rather than fail2ban.local
2. You can set findtime = x (e.g., x = 1d). This is useful if you have maxretry > 1; it can look at the past x to detect previous login attempts rather than just the past 600 seconds
3. Using `sudo service fail2ban reload` may be preferable. Apparently `reload` is normally a neater/tidier version of `restart`. For example, using reload, you won't reset the currently failed, etc.

TheNuclearManx
Автор

Thank you so much for these videos. I am very interested in learning how to make my server apache and php secured, so I hope you do that video too!

ryanmitchell
Автор

Thanks, I look forward to watching the rest of these when they are uploaded.

justinreed
Автор

I have never, in my life, learnt so much, from one video, sir! Thank you!

IbanMieZ
Автор

I have ungoogled my life so this last bit with the authentication I cannot use but the rest of the video is brilliant, thank you.

rosemarieosborn
Автор

Nice bitesized video for basic security.
Thanks keep up the good work!

beundeteunhaas
Автор

Wow one of the best most detailed videos, I have ever seen. I need more of these videos. You are the man. Tech guides

ox
Автор

Your tutorials have changed my IT world man! Danke schöne!

tjames
Автор

The most informative video series in a very straightforward manner. You do not just type the command you are explaining what is behind the scene in a few concentrated informative pice of knowlde. Thank you very much. Could you please complete the series by Secure the next cloud instance itself (apache and PHP), also performance tuning for the server. (Apache, PHP, next cloud). Backup and restore.

ahmadaisabry
Автор

I would like to learn more on how to make my server apache and php secured, so I hope you do that video soon!

andinfoser
Автор

Discovering your videos is probably the best thing to happen while building my own Ubuntu server. I have already built it and have multiple hard drives, I have dedicated one to PLEX. I'm worried that following this video would block access to plex, thus I won't be able to stream. Any thoughts on how to go about it? Perhaps adding plex into the list of allowed UFW's or allowing plex to access only the one harddrive? Would that compromise my server security? What do you recommend?
Thanks.

tidusimango
Автор

Wow learnt something new about the 1024 limit and how the model is becoming obsolete. nice video.

ahmadimran
Автор

I recently decided to convert my old laptop in a home server for a learning experience and why not. I have a 920m 2b Nvidia gc and 2tb hdd and i7-5500U with 16gb ddr3. My target is to have a secure network storage, a workstation to spin up VMs for small projects so I feel like a developer and learn the art of maintaining a system. I wish to keep the stack private, open source and stable. I got a good start with your videos, and would love to know popular use cases of dedicated home servers you have come across other than plex, nas and dhcp.

AbhaySingh-ywej
Автор

I realize this tutorial is 3 years old but it's still very informative and also s

robyngutierrez
Автор

Chapeau pour toi man!! This video was so useful. Keep up the great job!

yassinenacif
Автор

You are the best. I would love to see more videos about securing an Ubuntu server. Are you still planning to make the other guides?

greenland
Автор

You should look into a dashboard i.e. Heimdall, Homer, Dashmachine.
The videos are great keep up the good work! :)

pac
Автор

Great job man! Thanks. BTW are you aware of any setup or guide to use ubuntu server to enroll/approve devices connection to the home wifi router?

molbar
Автор

Just awesome video. I got stuck at google authenticator ... did everything as told, but it is not asking for ph code

infodiff