Skip to content

Secure Arch Linux Multi-User Desktop

Sorry this is so long but I didn't want to miss anything.

So I just rebuilt my Arch Linux Desktop to switch from LUKS to ZFS native encryption. I've been sharing the desktop with my wife and now my daughter will be using it to play games (Steam/Proton). I'm working on securing the desktop following the Arch wiki. I was hoping to get other Arch lovers' opinions. Did I miss something? Did I go too far? Is there an alternative to the option/software I chose? Let me know.

1: Root account disabled, only I have sudo access, password requirements (min 30 characters, I prefer passphrases), pam_tally2 set to 25 failures since such long passwords, lockout reset only by root, user umask set to 077.

2: Passwords/passphrases set for BIOS, Grub2, ZFS pools

3: EFI and Boot partition on USB drive, two copies attached to my wife and my keys, planning on Secure Boot and encrypting EXT4 boot partition and putting ZFS keyfile in encrypted boot partition so I don't have to type so many passwords at boot. (System is almost always on)

4: AppArmor, easier than SELinux, also auditd so I can use AppArmor parser.

5: For sandboxing I chose Firejail. Firejail now has Xorg sandboxing. It integrates with AppArmor. It's easier than containers, and it doesn't mess up app theming like snaps or Flatpak. I know it's not for use on a multi-user system, but I'm more worried about my wife or daughter opening malware accidentally than purposely trying to break in the system. I am considering containerizing Steam/Proton or even KVM with GPU passthrough. Luckily neither my wife or daughter play high end graphic games.

6: Chose Firewalld over UFW because I wanted nftables.

7: ClamAV, planning on trying rkhunter

8: Been playing with AIDE. Want to set it up with a Pacman Hook and encrypt the database on my USB drive.

9: Setuid, devices, and exec turned off for /var and /home using ZFS (except for exec on my ~/.scripts directory)

10: Firefox setup according to privacytools.io, Brave as backup browser.

11: Cryptomator for financial and other personal documents.

12: Systemd coredump disabled

13: Hardened SSH with strong SSH key passphrases (client only).

14: Planning on setting up USBGuard now that my daughter will be using the desktop.

15: I'm using mstmp as my mail transfer agent to notify me of issues/alerts, but I haven't figured out how to send messages yet PGP encrypted. Anyone know how to do this with msmtp or another MTA that supports OpenPGP?

16: I've only done the barest sysctl changes (kernel logs, disable IPv6). I haven't tried the hardened kernel or hardened malloc. Anyone have experience with these? Any performance or other issues?

17: I also have a local NextCloud server, a pfSense firewall setup with snort, vlans, pfBlockerNG, and FreeRADIUS for WPA2 enterprise.

Thanks in advance for your input!

0 points20 comments
Open on Reddit
About this post
Posted
Archived
Score
0 · 100% up
Kind
Text
ID
cpolvd

Author

1
posts
11
comments
0
media
View profile

20 comments

Sorry for not having any useful info on the topic, but, holy cow, I think you are a bit too paranoid about your daughter hacking your system. LOL

19 points

Why?

Why so much protection layers? As I understood, it should be family PC, not some public PC where the number of threats is way bigger

8 points

It always depends on the threat you want to protect against. I assume that this is a stationary PC?

Encrypting partitions helps agains theft of the device or somebody with Linux knowlege breaking into your home while you are not here and trying to access your computer. Installing some software. It does not help against attacks via internet as they happen when the computer is unlocked.

Protecting the boot steps until the root partition gets loaded helps against attackers that have either root or physical access to your PC and bother to install some malware kernel module on your PC.

Protecting against the companies trying to track your every move usually is done via browser addons and maybe using tor.

I have my documents on an encrypted partition that I only unlock when I want to access them. The rest of the system has no encryption. In addition I use keepass for my various online accounts. The firewall is on my (openwrt) router. Thats it when it comes to security.

I am a gamer myself and have several Steam games. I have not yet heared about malware coming this way.

A PC is a tool and the last thing that you want is that your family is pissed about how complicated it is to use.

For your daughters account it is probably sufficient for the time being when you ensure that your family users do not share a common group. This way she cannot destroy any of your data by mistake. This worked fine for me for years.

To sum it up: I would keep it simpler as it is easier to maintain and probably sufficient for you. But I do not know where you live and what your typical threats are.

7 points

A PC is a tool and the last thing that you want is that your family is pissed about how complicated it is to use.

Exactly.

Just because you can do something doesn't mean you should - especially when you're sharing that machine with two other people. God knows, at some point they'll end up too intimidated to even touch it and resent you for it.

You and your family aren't supper villains hiding evil plots from James Bond. KISS.

6 points

Agreed. However it depends on the situation in which one lives. There are countries where it might be better to have all stuff encrypted; just to be sure that it is not so easily used against you. Even if you think that you have not done anything wrong. You know like having interests in Amnesty International is enough to put you on a watchlist.

2 points

"17: I also have a local NextCloud server, a pfSense firewall setup with snort, vlans, pfBlockerNG, and FreeRADIUS for WPA2 enterprise."

It made my day... Now hide your imaginary tinfoil hat..Now for real, I don't get people claiming they did all this to 'secure' themselves, yet I don't see a single point on backups. You might want to reconsider your actual threat model, and keep to the basics, that will actually matter. You're not being spied on by NSA or any other three letter agency. And if you were you wouldn't be posting this attention seeking elaborates, not would this all you did do you any good.. Keep calm and keep it simple. Backups and simple yet effective setup are top priority

3 points

I guess I don't consider backups, security. But one of the main reasons I switched to ZFS was because of its great backup features. I use Sanoid and Syncoid for backups.

  1. Root is on four SSDs, two mirrored vdevs. Automatic Snapshots every 15 minutes.
  2. Snapshots are replicated to two USB mirrored external drives again every 15 minutes.
  3. Every hour snapshots are replicated to two mirrored drives in my NAS.
  4. Other devices in my house sync data files using Syncthing to my NAS which is snapshotted every 15 minutes and NAS replicates back to my USB mirrored external drives.
  5. 2nd NAS at my sister's house that replicates both directions.

I'm really big on backups.

1 points

Wow, you're a master who has gone through much more than what I've been through. Would love to be your apprentice if given the chance (not kidding)

But yeah many people here have good points specially the "A PC is a tool and the last thing that you want is that your family is pissed about how complicated it is to use."

Sad fact about today's IT world and technology is the fact that nothing is ever unhackable and we can only rely on defense-in-depth

That said, you're most likely paranoid about the threats that are capable of persisting through reformats, wipes, and/or nukes - Encountered one and it's extremely nasty. In those extreme cases it is imperative to extremely harden network security and actually get you and your family rid of those electronics through whatever way you prefer. Since security is very important for you, though I don't know if you have done it yet, it's good to ensure that none of your devices are talking to each other.

Oh right I forgot to add to you m8 that one big hole you forgot to leave unpatched is your network's and devices' exposed in-plain DNS queries that could be jacked by MITM attacks, DNS poisoning, and etc. You can protect these either through deploying DNSCrypt or DNS-over-TLS, I highly recommend stubby for implementing this.

Also consider employing the use of Openvpn/Wireguard in order to encrypt communications to be considerably MITM-proof. If you're capable of rolling DIY on this instead of paying a provider then I highly recommend you get a VPS up and running with Openvpn + obfsproxy which is the real deal since no VPN provider actually does this (probable exceptions are some of those who claim that they have implemented some proprietary "StealthVPN" technology)

1 points

Totally paranoid about security with a very complicated setup - uses bleeding edge rolling distro. Doesn't make all that much sense to me.

3 points

OK, I guess this is way overkill, but I'm disabled with A LOT of time on my hands. I love playing with new technology. If I have it configured correctly it shouldn't affect them. Of course, if I've made any mistakes...

My family is used to me trying the latest technology and usually breaking stuff as I figure it out. Should have seen when I first weighed from a simple netgear router to pfSense :).

Luckily my wife and daughter rarely use the PC and prefer to papyrus games or stream video on their tablets or our Switch.

What I've setup so far has gone pretty smoothly. The hardest part was firejail, but only because I created more strict configurations for any apps with internet access. I do a lot of research reading and watching videos before I start messing around with something new.

I love Arch because I have so much control. I can pick and choose just the software or features that I want instead of using what comes with the distro.

1 points

If it really is as you describe here, I'd strongly advise to build a home lab to test all the things in more appropriate environment (you can then test both blue and red sides of things), there's a good book on how to start on it called Building Virtual Machine Labs by Tony Robinson. You can get it as low as free on Leanpub. Give it a try, you won't be disappointed.

2 points
unknown author

Deleted before we saved it.

3 points

haters up in this thread... Good job OP. You appear to have a good grasp on how to manage the extra complexity that results from your desired security configurations and setup. Definitely utilize the zfs features for backups and snapshots in case you run into issues. Consider using zfs send for external backups as well. "Just because you're not important enough to be a target, doesn't mean you aren't insecure enough to be collateral." -MalwareTech

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.