I'm new to networking. I've been reading jails and VNET a guide by Derik Ramirez, FreeBSD Mastery: Jails by Michael Lucas and other of his books and I'm unsure how to accomplish what I want.
I want to host a set of public services (i.e., accessible from the Internet) and private services (only accessible while on my home network or via wireguard; ideally shouldn't communicate with each other).
Derik's layout has 2 bridges (1 private and 1 public) and I think here I could do the same:
* 2 bridges
* Caddy web server jail connected to both bridges
* Wireguard jail connected to both bridges
* public and private services attached to their respective bridges
* Use PF to enforce the public/private separation and permit only my laptop's IP (fixed within the network) to connect to the private network
The PF part feels complicated, so I'm wondering if there is a more elegant of doing this? Derik also calls his design "ugly" and "weird" in the book, but I have no clue why that's the case.
Does this make sense and will it accomplish what I want, especially from a safety perspective?
I want to host a set of public services (i.e., accessible from the Internet) and private services (only accessible while on my home network or via wireguard; ideally shouldn't communicate with each other).
Derik's layout has 2 bridges (1 private and 1 public) and I think here I could do the same:
* 2 bridges
* Caddy web server jail connected to both bridges
* Wireguard jail connected to both bridges
* public and private services attached to their respective bridges
* Use PF to enforce the public/private separation and permit only my laptop's IP (fixed within the network) to connect to the private network
The PF part feels complicated, so I'm wondering if there is a more elegant of doing this? Derik also calls his design "ugly" and "weird" in the book, but I have no clue why that's the case.
Does this make sense and will it accomplish what I want, especially from a safety perspective?