# Securing your server

**URL:** <https://community.learnlinux.tv/t/securing-your-server/1760>\
**Category:** Linux on Servers\
**Created:** [July 31, 2022, 12:59pm UTC](https://community.learnlinux.tv/t/securing-your-server/1760 "2022-07-31T12:59:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnOldSlowHorse](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/a/87869e/32.png) [@AnOldSlowHorse](https://community.learnlinux.tv/u/AnOldSlowHorse)\
**Post date:** [July 31, 2022, 12:59pm UTC](https://community.learnlinux.tv/t/securing-your-server/1760/1 "2022-07-31T12:59:59Z")

</div>

Being new to Linux servers, I did not know how to secure it really, watched this tutorial on YouTube by Jay see link

[![](https://community.learnlinux.tv/uploads/default/original/1X/6136f0d86c2b3c11dde07ded3e2e7239dd259886.jpeg "Hardening Access to Your Server | Linux Security Tutorial") ](https://www.youtube.com/watch?v=eeaFoZlSq6I)

This was so useful to me.

If anyone has a good tip for securing our server’s , please share…

---

<div class="post-metadata">

**Author:** ![ThatGuyB](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/thatguyb/32/784_2.png) [@ThatGuyB](https://community.learnlinux.tv/u/ThatGuyB)\
**Post date:** [July 31, 2022, 2:38pm UTC](https://community.learnlinux.tv/t/securing-your-server/1760/2 "2022-07-31T14:38:09Z")

</div>

Generally I follow the Alpine Linux wiki. Best thing is to disable SSH password authentication, disable ssh root login if it was enabled (by default it’s disabled, but things like VPS enable it), add your key to a non-privileged user and ssh into that, and from the non-privileged user, su into a privileged one.

Other than that, there’s also the linux-hardened kernel, but it’s only applicable to Linux. As far as other things go, they are more specific, like if you run a webserver, you should restrict the /admin page unless it comes from known IPs. Stuff like that.

---

<div class="post-metadata">

**Author:** ![ThatGuyB](https://community.learnlinux.tv/user_avatar/community.learnlinux.tv/thatguyb/32/784_2.png) [@ThatGuyB](https://community.learnlinux.tv/u/ThatGuyB)\
**Post date:** [July 31, 2022, 2:42pm UTC](https://community.learnlinux.tv/t/securing-your-server/1760/3 "2022-07-31T14:42:15Z")

</div>

I forgot that you also probably want CrowdSec and setting some iptables rules to restrict access on certain ports from IPs that try too many times to authenticate and fail.

---

<div class="post-metadata">

**Author:** ![AnOldSlowHorse](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/a/87869e/32.png) [@AnOldSlowHorse](https://community.learnlinux.tv/u/AnOldSlowHorse)\
**Post date:** [July 31, 2022, 3:01pm UTC](https://community.learnlinux.tv/t/securing-your-server/1760/4 "2022-07-31T15:01:00Z")

</div>

Thanks for the great advice …

---

<div class="post-metadata">

**Author:** ![wlz4rd](https://community.learnlinux.tv/letter_avatar_proxy/v4/letter/w/6f9a4e/32.png) [@wlz4rd](https://community.learnlinux.tv/u/wlz4rd)\
**Post date:** [September 22, 2022, 8:15pm UTC](https://community.learnlinux.tv/t/securing-your-server/1760/5 "2022-09-22T20:15:23Z")

</div>

I use the DoD Scap tool and STIG viewer. It is the DoD standard to securing a server. Most of it automated when you run the benchmark as well. I think I have a guide on it, but will need to edit some things out. It could be tricky since it make break a thing or two. Also when doing a fresh install, you can apply the DISA RHEL Profile.
