Earlier quoted context omitted.
It'd be perfectly reasonable if libpam-google-authenticator relied on Google's infrastructure, but despite the infelicitous name, it does not; it just implements the server side of TOTP. The authentication flow is identical to any other correct TOTP implementation, and you can use any compatible client; no integration with Google services or infrastructure is required. (In fact, I don't think it's even possible.) Spe…
Hurricane Electric's network tools iOS app is free and has an OTP client built in, with iCloud Keychain sync. OTP Auth is another excellent, free OTP client. Edit: clarified both are free.
My First 10 Minutes on a Server
71–80 of 298 posts
Re: My First 10 Minutes on a Server
#72Why do people install fail2ban then disable password based authentication entirely? I legitimately don't understand the purpose. Also, they complain about log spam (from failed SSH attempts) this is one reason to move SSH to a different port. It does NOT increase security, but it DOES reduce log spam from bots trying for easy targets.
Re: My First 10 Minutes on a Server
#73I don't mean to sound flippant but why can't these "lock down your new box" tutorials just be a bash script? Shouldn't they be?
Re: My First 10 Minutes on a Server
#74Earlier quoted context omitted.
The problem isn't that it's long; the problem is that it's not navigable - there needs to be a table of contents. There's great stuff in here, but it's hard to sort out what I already know how to do from what I can actually use.
There is a table of contents in the PDF version.
EDIT: And now the HTML version has a TOC, too! Talk about immediate gratification -- kudos to whoever did that!
Re: My First 10 Minutes on a Server
#75It would be useful to discuss what prevents the server from being rooted without a trace during the 10 minutes it takes to execute these steps.
Re: My First 10 Minutes on a Server
#76I don't mean to sound flippant but why can't these "lock down your new box" tutorials just be a bash script? Shouldn't they be?
Re: My First 10 Minutes on a Server
#77I'm finding that another important step is this one: apt-get install etckeeper && cd /etc && etckeeper init Keeps your /etc under version control so you know what kinds of configuration changes you've perpetrated.
Manually modifying servers was never a good idea; it's worse now, even with tools like this.
Re: My First 10 Minutes on a Server
#78Earlier quoted context omitted.
I recommend iptables-persistent because fail2ban is adding rules dynamically, and it just makes it easier to handle with that aspect automated.
I didn't notice that iptables-persistent actually saves the currently configured rules periodically. That's both kinda neat and a little scary, and I'm not entirely sure I see much value in persisting dynamic rules; it seems like it'd be easy to end up with a long chain of stale rules that way. Still worth knowing about the automatic persistence, though.
Or is the issue that fail2ban et al don't remove stale rules?
Re: My First 10 Minutes on a Server
#79I have been meaning to write up a similar guide. I would like to recommend using just iptables instead of ufw, I had a case on my vps where an update to ufw failed and then the firewall was not working. With iptables, install iptables-persistent package so they are saved when you do restarts. Do not try to block entire country ip ranges as this slows the machine down substantially. fail2ban is great, I would recommen…
proto tcp dport (smtp ssmtp qmtp pop3 pop3s imap2 imap3 imaps) ACCEPT;
.. creates rules for each of the ports listed. You can use multiple groups in the same statement as well (lets say all the services above for some crazy reason also listened to udp - you'd just replace "tcp" with "(tcp udp)").Being able to set variables is also fantastic. E.g.:
@def $DEV_PRIVATE = (eth0 eth1);
[1] https://github.com/MaxKellermann/fermRe: My First 10 Minutes on a Server
#80Technically you don't need the root password, you can always password recovery if you have access to the box. And how exactly did you lock yourself out of every account with sudo? Of course there's always "messed up my ldap or general network settings, can't log in to fix them". There's nothing wrong with setting your root password to a random string and throwing it away, after verifying your sudo works, I guess. I w…
RE ssh note: That's the second time someone has linked it to me. It looks really good. I haven't had a chance to read it yet though. Will do.