News for hackers. Stuff that matters.
Re:Ask HN: How do you securely self-host a server? by doublerabbit on Wednesday March 09, 2022 @08:32PM (#30622240)
Yes. A server is a dedicated machine running an service on a specific port.

Choose an OS.

- FreeBSD - Throws you in the deep-end but documented well to learn. Touching FreeBSD you will enable to manage Linux. Guides for BSD tend to be vague

- Linux - "Everything runs on Linux" easy gui installs. Lots of guides "How do I x on y distro" - Available in many different flaours, dog-food friendly.

Now choose a service(s) you wish to serve.

- Basic Web Server?

Easy Setup - Low Security

- Game Server?

Easy/Advance Setup - Low Security

- DNS Server?

Advance Setup - Medium Security

- Email Server?

Advance Setup - Medium-High Security

Then start with the following beginner steps:

- User Accounts and User Groups

SUDO, Disabling root login via SSH et cetera

- Moving SSH to another port other than 22

- Configuring SSH-Keys and password-less authenication

Now the firewall, pick one.

- Linux has IPTables and UFW

- FreeBSD has PF and IPFW

Once you've chosen your firewall, learn the the basic's of TCP / UDP

> TCP - "Hello, Hi, This is me, Cool. this is you, This is my data, Thanks for the data, good bye, bye"

> UDP - "Hi, so like here is all my data, bye"

then learn how to do the following rules:

- Block all inbound

- Block ICMP

- Block the inbound SSH port and only allow specific IP addresses

- Opening the port of your chosen service.

WebServer - 80/443

GameServer - 27960 for Quake3 Arena

DNS Server - 53

Once you've managed all of that your server is good to sit on the public internet.

Then learn about backups.

There are no comments on this comment yet.