Self-Hosting Security Guide for your HomeLab

Techno Tim
29 Jan 202218:43

Summary

TLDRThis video script delves into best practices for securely self-hosting services at home. It emphasizes the importance of foundational security, starting from hardware and firmware updates to network segmentation and firewall configurations. The guide explores using VPNs for secure access, leveraging cloud services like Cloudflare for protection, and setting up reverse proxies and authentication for enhanced security. The script also touches on the use of intrusion detection systems and the principle of least privilege, offering a comprehensive approach to home lab security.

Takeaways

  • 🛡️ The importance of securing the foundation of your home lab, not just the last mile, is emphasized for self-hosting services.
  • 🏗️ A well-architected home lab should consider various components including hardware, network configuration, and security measures.
  • 🛍️ Microcenter is recommended for great deals on hardware and technology needs for building and maintaining a home lab.
  • 🔒 Self-hosting VPNs are suggested as a secure method to expose services without public exposure, limiting access to only those with VPN credentials.
  • 🌐 Public cloud hosting is an alternative to self-hosting that mitigates some risks by isolating compromised machines from the local network.
  • 🔩 The necessity of keeping server hardware and firmware up-to-date to maintain security in a home lab environment is highlighted.
  • 🖥️ Choosing a secure and supported operating system for your applications and avoiding running services as root or admin is recommended.
  • 🔁 The benefits of using minimal container images to reduce attack surfaces and the importance of containerization engine updates are discussed.
  • 🌐 Network segmentation is crucial for security, allowing control over network traffic and mitigating risks from compromised devices.
  • 🚧 External networking should only forward necessary ports and utilize a reverse proxy for added security and performance benefits.
  • 🛡️ Utilizing services like Cloudflare can provide external protection, including DDoS attack mitigation, TLS encryption, and performance enhancements.

Q & A

  • What is meant by the 'last mile' in the context of self-hosting services?

    -The 'last mile' refers to the final hop or connection point before a user accesses the self-hosted services. It often involves using certificates or a reverse proxy for security.

  • Why is it important to consider the foundation of a home lab for self-hosting services?

    -Security and architecture of a home lab are crucial because they form the basis for the entire setup. A strong foundation ensures that the system is secure from the ground up, not just at the last mile.

  • What are some of the best practices in architecture for self-hosting services within a home lab?

    -Best practices include individual systems and hardware configuration, application hosting considerations, network configuration and segmentation, reverse proxies, certificates, two-factor authentication, firewall configuration, and internet security settings.

  • Why should one consider using a VPN for self-hosting services?

    -A VPN creates a secure tunnel from outside to inside the network, allowing for controlled access and mitigating the risks associated with exposing services directly to the internet.

  • What is the significance of keeping hardware patched with the latest firmware in a self-hosted environment?

    -Keeping hardware patched ensures that the server and all connected devices are up to date with the latest security fixes, reducing the risk of vulnerabilities being exploited.

  • What are the considerations for choosing a secure operating system for self-hosting?

    -One should choose an operating system that is still supported, regularly patched, and follows the principle of least privilege, ensuring minimal access levels for users and avoiding running services as root or admin.

  • Why is network segmentation important for self-hosting applications?

    -Network segmentation divides the network into multiple segments or subnets, controlling the flow of traffic and improving both performance and security by isolating trusted devices from those exposed to the internet.

  • What role does a reverse proxy play in self-hosting services?

    -A reverse proxy directs traffic from clients to servers, simplifies certificate management, and can integrate with other systems using middleware, enhancing both security and maintenance efficiency.

  • How can using an auth proxy like Authelia enhance security for self-hosted services?

    -Authelia provides an additional layer of authentication and authorization for services, even if they don't have their own authentication mechanisms, including support for two-factor authentication.

  • What is the purpose of using an intrusion detection system (IDS) and intrusion prevention system (IPS) in self-hosting?

    -IDS and IPS analyze traffic for signatures of known attacks and either alert the user (in the case of IDS) or block the traffic (in the case of IPS), providing an extra layer of security against threats.

  • Why is it recommended to use a public reverse proxy like Cloudflare along with a private one?

    -Using Cloudflare improves performance, provides some protection against attacks, caching, TLS encryption, and can block malicious traffic before it reaches the private reverse proxy or server.

Outlines

00:00

🏠 Home Lab Security Foundations

The script emphasizes the importance of securing the foundational elements of a home lab beyond just the last mile. It suggests that while the final access point is critical, a holistic approach to security is necessary. The speaker introduces the concept of a complex yet manageable home lab architecture, covering hardware, network configuration, and security practices. The video promises to delve into best practices for self-hosting services, including the use of reverse proxies, certificates, two-factor authentication, firewall settings, and external protections like Cloudflare. The sponsor, Microcenter, is highlighted as a go-to store for hardware needs, offering deals and expertise for various tech purchases.

05:00

🛡️ Advanced Self-Hosting Security Measures

This paragraph delves into the nuances of self-hosting services securely. It discusses the benefits of using a VPN for private service exposure and the considerations of public cloud hosting versus home hosting. The focus then shifts to the importance of hardware security, including keeping firmware up to date for all connected devices. The choice between virtualized and bare-metal operating systems is explored, with an emphasis on maintaining a secure and updated environment. The paragraph also touches on the selection of a secure operating system, the principle of least privilege, and the use of application firewalls for added security.

10:01

🌐 Networking Strategies for Self-Hosted Services

The script discusses the critical aspects of internal and external networking for self-hosted services. It highlights the importance of network segmentation to enhance security and performance, suggesting the use of subnetting or VLANs to create distinct network segments. For external networking, the paragraph advises on the careful forwarding of ports to minimize exposure and the use of a reverse proxy for added security. The benefits of using Cloudflare as a public reverse proxy are underscored, including performance improvements, IP protection, and defense against attacks. The speaker also explains how to set up conditional port forwarding to ensure that traffic only comes through trusted sources like Cloudflare.

15:02

🔒 Final Security Layers for Self-Hosted Services

The final paragraph wraps up the discussion on self-hosting services by focusing on the last layers of security. It talks about setting up an internal reverse proxy for traffic direction and certificate management, as well as the use of middleware for authentication services like Authelia, which provides an additional layer of security through two-factor authentication. The paragraph concludes by summarizing the comprehensive approach to self-hosting, from Cloudflare to firewall configurations, and encourages viewers to consider their comfort level with these security measures. It also invites feedback and engagement from the audience, highlighting the speaker's personal connection with viewers from the Netherlands and the US.

Mindmap

Keywords

💡Self-hosting

Self-hosting refers to the practice of hosting services, applications, or websites on a personal server rather than relying on third-party hosting services. In the video, self-hosting is the central theme, as the speaker discusses various aspects of setting up and securing a home lab for self-hosting services. The script mentions considerations for hardware, network configuration, and security practices as part of self-hosting.

💡Last mile

The 'last mile' in the context of the video refers to the final connection point between the user and the services being accessed. It is a critical aspect of self-hosting because it involves securing the final hop before a user accesses the hosted services. The speaker emphasizes that while this is often the focus, security should be considered from the ground up, not just at this last stage.

💡Reverse proxy

A reverse proxy is a server that sits between clients and the origin server, forwarding requests from clients to the appropriate backend server. In the script, the reverse proxy is mentioned as a security measure that can help manage and secure incoming traffic to the self-hosted services, as well as simplify the maintenance of certificates.

💡Certificates

Certificates, specifically SSL/TLS certificates, are digital credentials that provide a secure layer for data transmission over the internet. The script discusses the importance of using certificates for encrypting traffic to and from self-hosted services, enhancing security and trust for users accessing these services.

💡Two-factor authentication

Two-factor authentication (2FA) is a security process that requires users to provide two forms of verification to access a service. In the video, 2FA is presented as an additional security measure that can be implemented through an auth proxy, adding an extra layer of protection for self-hosted services.

💡Firewall configuration

Firewall configuration involves setting up rules and policies to control incoming and outgoing network traffic based on predetermined security criteria. The script highlights the importance of configuring firewalls to protect self-hosted services by allowing only necessary traffic and blocking potential threats.

💡Network segmentation

Network segmentation is the division of a large network into smaller, more manageable segments. In the context of the video, network segmentation is recommended as a security best practice for self-hosting, helping to isolate different parts of the network and reduce the risk of a security breach affecting the entire system.

💡Public cloud hosting

Public cloud hosting refers to the use of remote, third-party servers to host applications and services. The script briefly mentions public cloud hosting as an alternative to self-hosting, noting that it mitigates some risks associated with hosting services at home since the compromise of a cloud-hosted machine does not directly affect the user's local network.

💡Containerization

Containerization is the process of packaging software into containers, which are lightweight, portable, and self-sufficient units that can run on any system. The video discusses the security considerations for using containerization in a self-hosted environment, such as ensuring the container engine is up-to-date and using minimal base images to reduce the attack surface.

💡Firmware

Firmware refers to the software that provides the low-level control for a hardware device. In the script, the importance of keeping firmware up-to-date for all devices in a self-hosted environment is emphasized, as outdated firmware can present vulnerabilities that could be exploited by attackers.

💡Cloudflare

Cloudflare is a web infrastructure and security company that provides a range of services, including a reverse proxy, DNS services, and DDoS protection. The script discusses using Cloudflare as an external protection measure for self-hosted services, highlighting its ability to improve performance, provide TLS encryption, and block malicious attacks.

Highlights

Importance of the last mile in self-hosting services and the often overlooked foundational security.

The necessity of a secure architecture for self-hosting services within a home lab.

Discussion on the best practices in architecture for self-hosting services.

Hardware considerations for self-hosting, including firmware updates and security.

Virtualization versus bare-metal operating systems and the importance of maintaining hypervisors.

Selecting a secure operating system and the principles of least privilege.

The role of containerization in self-hosting services and best practices for container security.

Network segmentation as a method to improve security and performance.

External networking and the importance of port forwarding rules for security.

Use of a public reverse proxy like Cloudflare for performance and security benefits.

Conditional port forwarding to ensure traffic only comes through trusted sources like Cloudflare.

Firewall configuration and the use of IDS and IPS for intrusion detection and prevention.

Setting up a reverse proxy for traffic direction and certificate management.

Authentication methods for services, including the use of auth proxies like Authelia.

The comprehensive approach to self-hosting, from hardware to service configuration.

Alternatives to self-hosting, such as using a VPN or public cloud hosting.

Personal anecdotes on the impact of self-hosting services and recognition in the Netherlands.

Transcripts

play00:00

when most people think about

play00:01

self-hosting services in their home lab

play00:03

they often focus and only think about

play00:05

the last mile and by last mile i mean

play00:08

the last hop before a user accesses your

play00:10

services this last hop whether it's

play00:12

using certificates or a reverse proxy is

play00:14

incredibly important but it's also

play00:16

important to know that security starts

play00:18

at the foundation of your home lab take

play00:20

for instance this diagram this most

play00:22

likely makes up most things in your home

play00:24

lab and whether that be physical or

play00:26

virtual you'll find that you have most

play00:28

of these components but what if i told

play00:29

you your home lab should look like this

play00:31

that might seem incredibly complicated

play00:33

but it's much easier than you think

play00:35

today we're going to discuss some great

play00:37

practices in architecture for

play00:38

self-hosting services within your home

play00:41

we'll dive into individual systems

play00:43

hardware and configuration application

play00:45

hosting considerations network

play00:47

configuration and segmentation reverse

play00:49

proxies certificates and two-factor auth

play00:52

firewall configuration internet security

play00:54

settings and we'll even lean into

play00:56

external protection from a provider like

play00:58

cloudflare this will cover everything

play01:00

from the last mile all the way down to

play01:02

the hardware and speaking of hardware if

play01:05

you're looking for great deals on

play01:06

hardware you should look no further than

play01:08

our sponsor microcenter if you're a huge

play01:10

nerd like me one of the best places to

play01:12

shop for all your technology needs is

play01:14

micro center nothing beats walking into

play01:16

a store and feeling right at home and

play01:18

that's how i feel the minute i walk into

play01:20

a micro center store each and every time

play01:22

they have the best deals on gear for

play01:24

gamers streamers custom build pcs with

play01:26

performance and budget options keyboard

play01:28

and accessories desktops and laptops and

play01:31

much much more whether you're looking to

play01:32

build your own dream system networking

play01:34

and storage pre-built desktops or

play01:36

laptops home security and home

play01:38

automation diy and tech hobbies even

play01:41

printers and television or just some

play01:43

help from any of their experts they

play01:45

really do know what they're talking

play01:46

about microcenter should be your

play01:48

destination also microcenter has been

play01:50

generous enough to give a free ssd to

play01:52

all new customers and is available in

play01:54

store only so see the link in the

play01:55

description so be sure to visit your

play01:57

local micro center store today and if

play01:59

you can't make it in be sure to check

play02:01

them out on the web oh and tell them

play02:03

techno tim sent you they'll have no idea

play02:05

who you're talking about so what's the

play02:07

best way of protecting yourself while

play02:09

self-hosting

play02:10

don't

play02:12

just don't do it seriously you don't

play02:13

have to do it exposing yourself to the

play02:15

internet also exposes yourself to risks

play02:18

and the easiest way to mitigate that is

play02:20

to just don't do it at all i know that's

play02:22

not why you're here or what you want to

play02:24

hear so let's move on to the next best

play02:26

step also keep in mind that i'm not a

play02:28

security professional i'm just some

play02:30

random person on the internet giving you

play02:32

advice exposing your services through a

play02:34

self-hosted vpn is probably the next

play02:36

best way of exposing your services

play02:39

without doing it publicly this will

play02:41

create a secure tunnel from the outside

play02:42

of your network to the inside of your

play02:44

network from there you can create

play02:46

firewall rules and limit what the vpn

play02:48

can access this is a quick win and a

play02:51

secure way of exposing your services but

play02:53

only the people with vpn access will be

play02:55

able to access them so you've made it

play02:57

this far and you decided you still want

play02:59

to expose some services publicly so

play03:01

let's talk about public options this

play03:03

first option kind of falls into the

play03:05

don't host it at home option

play03:07

which is to host it in a public cloud

play03:09

hosting it in a public cloud still has

play03:11

its own set of concerns but it does

play03:13

mitigate a lot of the risk of hosting it

play03:15

at home that's because if that machine

play03:17

gets compromised they haven't

play03:19

compromised a machine on your local

play03:21

network they've compromised a machine in

play03:23

the public cloud but again that's not

play03:25

why we're here today we're here to

play03:27

self-host services on our own network

play03:29

but for those who want to expose some

play03:31

services directly from their home

play03:34

this is where the fun begins and again

play03:36

most people think of the last mile when

play03:38

self-hosting services it's this path

play03:40

right here

play03:41

but security starts at a much deeper

play03:43

level so rather than focus on this last

play03:46

hop right here we're going to zoom in

play03:47

and focus on the server that's running

play03:49

your services

play03:51

you typically don't think of the

play03:52

hardware when you're hosting

play03:53

applications in in the cloud you really

play03:55

don't have to but since we're hosting in

play03:58

our own personal cloud we do need to

play04:00

consider this the biggest takeaway here

play04:02

is to be sure that the hardware that

play04:04

your application is running on are

play04:06

patched with the latest firmware this

play04:08

includes firmware for the server itself

play04:11

firmware for devices like the

play04:13

motherboard hard drives

play04:15

network adapters

play04:16

and any other device that's physically

play04:18

connected to the server this also

play04:21

includes any firmware for any router or

play04:23

network device in your environment but

play04:25

we'll get into configuration here in a

play04:27

little bit and next we need to decide if

play04:29

we're going to virtualize our operating

play04:32

system or just run them bare metal

play04:34

really there is no wrong answer here it

play04:37

really depends on how you want to manage

play04:38

your infrastructure the key takeaway

play04:41

here is to make sure that your

play04:42

hypervisor is actively maintained up to

play04:44

date and fully patched there are some

play04:47

networking considerations here but we'll

play04:49

cover that in the networking section

play04:51

since virtualized network and physical

play04:53

network have a lot of the same concerns

play04:56

next is making sure you'll choose a

play04:58

secure operating system that your

play05:00

applications will run on now this is a

play05:02

big topic for debate so we aren't going

play05:03

to go into which ones are more secure

play05:05

but you have choices like windows

play05:08

embedded and many flavors of linux here

play05:11

are the takeaways you'll want to use one

play05:13

that's still supported and not end of

play05:16

life

play05:17

you'll want to patch all of these

play05:18

regularly and work it into your

play05:19

maintenance schedule you'll also want to

play05:21

use the principle of least privilege

play05:24

meaning giving the minimum level of

play05:26

access to any user on this system you

play05:28

also want to be sure you don't run

play05:30

anything as root or admin you also want

play05:32

to restrict who has access to these

play05:34

machines and try not to install

play05:37

additional services on these machines

play05:39

it's also a good idea if you can to use

play05:41

an application firewall and at the end

play05:44

of the day the os should be purposely

play05:46

built and maintained if you're running

play05:48

containers you'll have much of the same

play05:50

concerns as you do with an operating

play05:51

system

play05:52

however at a much smaller scale

play05:57

you'll first want to make sure that your

play05:58

containerization engine is up to date

play06:01

whether that be docker container d or

play06:03

pod man or any other you want to be sure

play06:05

that this service is patched and

play06:07

up-to-date also i recommend using

play06:09

containers from official sources

play06:12

this can be a challenge but you'll want

play06:14

to be sure that you're getting

play06:15

containers from the maintainer

play06:16

themselves or from a reputable source

play06:19

something like linux server.io and after

play06:22

you've chosen your container you'll want

play06:25

to check to see if they support a

play06:26

minimal image one that's built on

play06:28

something like alpine the reason you

play06:30

want to do this is for a couple of

play06:32

reasons first of all you get a smaller

play06:34

container next this container now has

play06:37

less attack surface containers with less

play06:40

dependencies means less to worry about

play06:42

and containers with less dependencies

play06:44

have less to patch or the possibility of

play06:48

vulnerabilities so if you choose a

play06:50

container that has more services that's

play06:52

more to patch more with the possibility

play06:55

of vulnerabilities and overall more to

play06:57

worry about after you've selected your

play07:00

container you'll also want to take into

play07:01

consideration the tags that you use now

play07:04

this is kind of a double-edged sword

play07:06

because most people want to pin their

play07:07

containers to latest to ensure that they

play07:09

have the latest container and then

play07:11

they'll use something like watchtower to

play07:13

update it automatically however keep in

play07:15

mind that latest may not have gone

play07:17

through the same testing and rigor that

play07:20

a tagged version of an image has this

play07:22

convention is really going to be up to

play07:24

the container maintainer but my general

play07:27

guidance is looking at the nginx

play07:28

container is that if you can pin to a

play07:31

specific version like this one

play07:32

1.21.5-alpine

play07:35

that's a good bet or you can pin to a

play07:37

less specific version like 1-alpine or

play07:41

even 1.21-alpine

play07:43

and then if all else fails you can pin

play07:45

the latest if you really wanted a high

play07:48

level a specificity you could actually

play07:51

pin to this digest here but that's going

play07:53

a little far but this does add some

play07:55

maintenance over time and you'll need to

play07:57

work this into your maintenance rotation

play07:59

but the takeaway here is that the higher

play08:01

level of specificity on your tag means

play08:04

that it's more easily reproduced in the

play08:06

future and now on to networking there

play08:09

are two sections to networking that are

play08:11

equally important

play08:12

internal networking and external

play08:14

networking starting with internal

play08:16

networking it's a must to segment your

play08:19

network if you're planning on

play08:20

self-hosting applications the idea

play08:23

behind network segmentation is that you

play08:25

divide your network into multiple

play08:28

segments or subnet each acting like its

play08:30

own small network this allows you to

play08:32

control the flow of the network between

play08:35

two networks and even internally based

play08:37

on a network policy

play08:40

this can not only improve performance

play08:42

but also security you can do this by

play08:44

subnetting or vlans and this allows you

play08:47

to keep trusted devices separate from

play08:50

devices that are connected or exposed to

play08:52

the internet or untrusted devices this

play08:55

can help mitigate the risk that if one

play08:57

of these devices get compromised

play09:04

they can only communicate with other

play09:07

devices on this network and if you have

play09:10

a network policy in place

play09:12

they can't get through to your trusted

play09:13

devices thus mitigating the risk this is

play09:16

not only a good idea for machines that

play09:19

are publicly exposed to the internet but

play09:21

also

play09:22

a good idea for iot devices

play09:24

[Music]

play09:27

but maybe more on that some other time

play09:29

the takeaway here is to segment your

play09:31

network to mitigate risk and now on to

play09:33

external network this is where the real

play09:36

fun begins this is how users and devices

play09:39

enter your network

play09:42

and for obvious reasons you want to be

play09:44

sure that only the ports you need to be

play09:45

forwarded are forwarded to the proper

play09:48

device in most cases you'll be hosting

play09:50

something like a website and if that's

play09:52

the case you'll want to be sure that

play09:54

it's only going to port forward 443 for

play09:57

https

play09:59

to the server that it's running on you

play10:01

don't want to open any additional ports

play10:03

and in most cases you'll want to port

play10:05

forward that to a reverse proxy that

play10:08

sits in front of your website

play10:11

however i highly recommend using a

play10:13

public reverse proxy along with your own

play10:16

so cloudflare provides a reverse proxy

play10:19

even with a free tier that you can use

play10:21

to improve performance

play10:23

somewhat protect your ip online

play10:25

provide some caching tls encryption or

play10:28

certificates and i think most

play10:30

importantly protect your site from

play10:32

attacks cloudflare is able to detect and

play10:35

block malicious attacks if you use them

play10:37

for dns

play10:39

and if you use them for dns your dns

play10:41

will point at them at their reverse

play10:43

proxy and it's in their best interest to

play10:46

detect and block these types of attacks

play10:48

since an attack on you is really an

play10:51

attack against them and this might sound

play10:54

complicated to set up but it's as easy

play10:56

as using a dynamic dns container or

play10:59

script that updates your domain to point

play11:01

to cloudflare then this will route all

play11:04

traffic through their reverse proxy and

play11:06

forward it on to you with tls encryption

play11:09

and if you're ever under attack you can

play11:11

simply turn on attack mode and force the

play11:14

javascript language challenge when

play11:16

people visit it

play11:20

so that attackers get stopped

play11:22

but real human beings get through

play11:26

and you can see some of my stats here

play11:28

you can see lots of requests are being

play11:30

routed through cloudflare you can see

play11:32

the total bandwidth over time you can

play11:34

see how many unique visitors visited and

play11:37

then you can also check out the security

play11:38

piece and you can see from this chart

play11:41

that they've actually blocked some

play11:42

threats and these were blocked at the

play11:44

cloudflare level and they never made it

play11:46

down to my reverse proxy you could see

play11:48

threats by country by region and the

play11:51

type of crawlers or bots i feel like

play11:53

setting up cloudflare is a huge win for

play11:55

privacy security and protection but

play11:58

what's stopping anyone from just going

play12:00

directly to my ip address what happens

play12:03

if someone figures out my ip address and

play12:05

wants to bypass cloudflare altogether

play12:08

well in this setup nothing at all

play12:11

don't worry friends there are ways to

play12:13

protect against this too this is where

play12:15

we'll combine our port forwarding rules

play12:17

along with cloudflare we'll force anyone

play12:19

from the outside coming in to go through

play12:21

cloudflare

play12:22

and if they don't we'll just block them

play12:24

so it looks like this clownflare

play12:27

publishes their list of ip ranges this

play12:29

is super helpful because we can build

play12:31

rules based on these ipv ranges

play12:34

see where i'm going here from these list

play12:36

of rules we can build a conditional port

play12:38

forward to say that if you're not coming

play12:40

from one of these sources just block and

play12:44

if you are let them through and it looks

play12:46

like this i'm basically doing

play12:48

conditional poor forwarding and i'm

play12:50

using udm and it works just the same

play12:53

probably a lot easier on p of sense but

play12:56

if we look at one of these rules what

play12:58

we're saying that hey if the source is a

play13:01

cloudflare ip on the port of 443 that's

play13:04

https then we'll forward to our reverse

play13:07

proxy otherwise we drop it and i had to

play13:10

do this quite a few times in udm because

play13:12

there isn't an easy way to do this but

play13:15

it's much easier if you're using pfsense

play13:17

and if you're using something else just

play13:19

look at your port forwarding rules and

play13:21

see if they support conditional port

play13:23

forwarding and since we're talking about

play13:25

cloudflare we may as well talk about

play13:26

some firewall rules too that you can set

play13:28

up there now some people will block

play13:30

entire countries from their firewall or

play13:32

even blocked or now i've never really

play13:34

found these to be too helpful because

play13:37

most of the time bad actors are just

play13:39

going to use a vpn in your local country

play13:41

and come in that way but if you do want

play13:43

to block countries it's here in firewall

play13:45

rules but while we're talking about

play13:47

networking in firewalls we should also

play13:49

talk about ids which is intrusion

play13:51

detection system and ips which is

play13:54

intrusion prevention system and

play13:56

generally speaking these are just ways

play13:58

to detect and block attacks based on

play14:00

some signatures they do this by

play14:02

analyzing the request and the traffic

play14:04

and then seeing if that matches a

play14:06

signature and then alerting you if you

play14:09

have ids turned on and blocking it if

play14:11

you have ips turned on now i would

play14:13

definitely turn these both on

play14:15

self-hosting or not because they block

play14:16

against known attacks now i say known

play14:20

because they're only as good as the

play14:21

signatures that you have so if you're

play14:23

running something like pfsense that'll

play14:24

be snort or tsurikata and if you're

play14:27

running udm pro it'll be right here

play14:29

under firewall and security but you'll

play14:31

want to make sure that you detect and

play14:33

block and then you can set a sensitivity

play14:35

level here i have mine to the highest

play14:37

possible and here we can see the list of

play14:40

threat categories now i have these all

play14:42

turned on and you might have some

play14:44

additional toggles like dark web blocker

play14:46

and malicious website blocker but you'll

play14:48

want to make sure that all of the

play14:49

security systems that your firewall

play14:51

supports are turned on and up to date

play14:53

and you'll want to make sure that you

play14:55

regularly check these for me that's as

play14:57

simple as going into notifications and

play15:00

making sure that any intrusion attempts

play15:02

were blocked and now that we have

play15:04

everything in place we can finally meet

play15:07

in the middle and use our own internal

play15:09

reverse proxy arguably you don't need

play15:12

one if you're using cloudflare but i do

play15:15

it with or without cloudflare so a

play15:17

reverse proxy is an easy way to direct

play15:20

traffic from your clients to one of your

play15:22

servers

play15:23

we talked about this with cloudflare and

play15:25

it's also a place where you can have

play15:28

your certificates having them here

play15:30

versus each individual server makes

play15:32

maintenance much easier and setting up a

play15:35

reverse proxy can be challenging however

play15:38

i've already documented this in a video

play15:40

and the reverse proxy i usually choose

play15:42

is traffic traffic can route requests to

play15:44

your servers and get publicly signed

play15:46

certificates for you to use and even

play15:49

integrate with other systems using

play15:52

middleware so speaking of middleware

play15:54

another choice you'll have to make is

play15:56

whether or not you want your services to

play15:58

have authentication or not some services

play16:01

do provide authentication

play16:03

but they may not support two-factor

play16:05

authentication this is where something

play16:07

like authalia comes into play authalia

play16:09

is an auth proxy that works with your

play16:12

reverse proxy

play16:13

to provide authentication and

play16:15

authorization for your services even if

play16:18

they don't have authentication of their

play16:20

own this is great for applications that

play16:22

need another layer of protection and

play16:24

with two-factor authentication helps

play16:26

give you confidence that your apps can

play16:28

be accessed by you and only you put them

play16:31

upside down because he's mad because

play16:33

auth is in the middle but whatever this

play16:36

is definitely an advanced use case and

play16:38

should only be set up after you have

play16:40

all of this already running

play16:43

after we have this last step set up

play16:45

we've gone all the way from the end user

play16:47

going through cloudflare to your

play16:49

firewall configured a firewall with

play16:51

protection set up a reverse proxy then

play16:54

set up an auth proxy and for a server we

play16:57

configured our hardware

play17:02

and the operating system and then our

play17:04

service

play17:05

if it's running in a container you

play17:07

should now have a little more confidence

play17:09

in self-hosting some things in your home

play17:11

lab and remember you don't have to do

play17:14

any of this

play17:15

if you feel uncomfortable or you're not

play17:17

ready you can still fall back to a vpn

play17:20

or host it in a public cloud or do

play17:23

nothing at all and there are also some

play17:25

side quests we didn't talk about like

play17:26

tunneling but you could set this up

play17:29

different altogether so what do you

play17:31

think about self-hosting some services

play17:33

at home do you not want to expose

play17:34

anything publicly but your vpn did i

play17:37

miss anything in my guide

play17:39

let me know in the comments section

play17:40

below and remember if you found anything

play17:43

in this video helpful

play17:44

don't forget to like and subscribe

play17:47

thanks for watching first name here from

play17:49

the netherlands all right thank you

play17:50

thank you so much funny i j i i won't go

play17:53

into there but

play17:55

people at work joke around because

play17:56

they're like you must be big in the

play17:57

netherlands and i was like actually a

play18:00

fair portion of my traffic on youtube

play18:02

comes from the netherlands but they they

play18:04

joke around with me because once i

play18:05

jumped on uh a call at work and the

play18:08

people on the other side of the call

play18:09

were from the netherlands and one guy

play18:11

was like are you techno gym do you have

play18:13

a youtube channel i kind of i didn't

play18:15

even see it in chat and then later on

play18:17

that you know they were teasing me at

play18:19

work they're like you must be huge in

play18:20

the netherlands because that guy

play18:21

recognized you and i didn't even see in

play18:23

chat that he had said he knew who i was

play18:26

because it was zoom chat not like

play18:27

anywhere else and that's obviously class

play18:29

but anyways long story short someone

play18:32

from from work

play18:33

when i was on a call

play18:35

recognized me i was like oh that's

play18:37

that's pretty awesome anyways uh thank

play18:39

you and welcome um from the us thank you

play18:42

for being here

Rate This

5.0 / 5 (0 votes)

関連タグ
Self-HostingHome LabSecurity TipsNetwork SegmentationReverse ProxyFirewall ConfigVPN AccessCloudflareHardware FirmwareOS SecurityContainerization
英語で要約が必要ですか?