Ask HN: I finally ditched Windows for Ubuntu - How do I keep things secure?
I'm a Python programmer who finally got fed up enough with Windows to take the plunge.
The thing is I'm totally new to Linux, and am pretty paranoid about security (former Win user, remember.) I really feel like I'm flying blind here.
I know the standard, glib line is that you don't have to worry about security once you leave Microsoft, but I have a hard time accepting that. It seems like I should be installing Anti-virus, anti-malware, and firewall software.
Does anyone know of any basic intros to Linux/Ubuntu security, or have any tips?
Thanks in advance.
(
12 comments
| 13 points
| on HN
)
And I don't think I have a checklist thats uptodate, even the one in my head.
ShowHN: using HN as my personal todo list cos I actually look at my threads list daily...
https://grepular.com/Protecting_a_Laptop_from_Simple_and_Sop...
https://help.ubuntu.com/community/Security
https://news.ycombinator.com/item?id=4018426
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/fi...
http://www.freebsd.org/doc/handbook/security.html
That site on secondary GPGkeys I keep failing to find
I would recommend using NoScript or eqiv. plugin for your browser.
In my opinion, Windows' biggest security flaw, is teaching users to install software via the browser. But for non-open-source software ecosystems, it's quite difficult to create a white-list of safe programs.
My second recommendation is to, as much as possible, only use software from your repository.
In regards to the other recommendations about firewalls, while definitely not bad advice, if you are behind a NAT router, and on a small, trusted LAN, I wouldn't worry too much about it personally.
fail2ban with its default configuration will essentially just block objectionable SSH traffic. If you decide to extend it, create a /etc/fail2ban/jail.local file to supplement the default /etc/fail2ban/jail.conf file (the former augments the latter).
As others have mentioned, there are a number of resources available. Do not make all suggestions blindly: some are of questionable efficacy and complexity.
ufw will allow precise tuning of iptables. Watch /var/log/ufw.log for entries indicating traffic being dropped, either appropriately or not. Once more services are added (and secured), introduce related rules into ufw one by one. If your system is exposed to the general Internet, be particularly careful with such services' configurations.
The above minimal ufw commands will prevent many commonly used network services on the local network, such as CIFS. Some packages install custom ufw application definitions which can be listed with the ufw app list command (e.g., Postfix, Apache). Such applications usually open the services to all, as opposed to the just the local network.
For a basic overview of Linux security: Red Hat Enterprise Linux 6 Security Guide
https://access.redhat.com/site/documentation/en-US/Red_Hat_E...
Here is a blog post by someone who is protecting his laptop, for each security measure he says what and why:
https://grepular.com/Protecting_a_Laptop_from_Simple_and_Sop...
HN Discussion:
https://news.ycombinator.com/item?id=4018426
When you're running an MS system, I guess the analogy would be you're driving in a demolition derby. It's not 'if' you'll get hit but when ...
- Turn services off you don't need or use.
- Delete services you will never use.
- Firewall with iptables.
- Setup SSH to disallow login for root. Or turn SSH off if you won't login into it from another host. You can always _start_ SSH again if you need it.
Unless you're hosting an SSH server or something I don't think there's much to do out of the box for desktop Ubuntu.
To start, you will just need to set up IPTables and Fail2Ban.
How many users have a laptop that they are connecting to one or another undefined (to them) form of "public" wifi? (And/or to someone else's internal network that may be compromised.)