Skip to content

u/Cdn_Nick

In this archive from Mar 2016 to Jul 2025

2
posts
35
comments
0
media
375
score

Top posts

Just another day of -Syu..

Thinks: 'time to run pacman on the laptop again' sudo pacman -Syu error: installing python (3.9.1-1) breaks dependency 'python<3.9' required by pkgbrowser Aww crap.. checks Internet sudo pacman -Syyu sudo pacman -R pkgbrowser sudo pacman -Syu error: cdrtools: signature from "jerome leclanche <jerome...

0 points9 comments
Open on Reddit

Top comments

install etckeeper - This package will setup a git repository in the /etc folder and keep track of every change that is made to the configuration. It has hooks that will keep keep track of what packages are added, and new configurations and so on.

Install and run Uncomplicated Fire Wall (ufw) & Gufw (gui interface):

Disable root login over ssh

Additionally, edit the /etc/security/access.conf file. Add line: "-:root:ALL except LOCAL" Above prevents all remote root(su) logins, but allows local (console) root logins.

For Paranoia level security: https://github.com/lfit/itpol/blob/master/linux-workstation-security.md

USB Guard - https://dkopecek.github.io/usbguard/ Failtoban - https://wiki.archlinux.org/index.php/fail2ban (blocks the incoming ipaddress, if multiple failed attempts to access)

Install Rootkit checkers: chkrootkit & rkhunter
Install Anti-Virus: clamav clamtk

estrict the damage from fork bombs, add this to /etc/security/limits.conf: - nproc 384

28 points

Use nproc to limit the effects of forkbombs (set in /etc/security/limits.conf)

So, fork bombs are fairly non-malignant, and not all that common. It's basically where you get a script or program that calls itself multiple times. However, if you do come across this, it may fill your available ram and choke your pc.

So, the intent here is to limit the amount of processes that can be spawned in Linux, and enforcing a predetermined limit by editing /etc/security/limits.conf

​

If you run: nproc --all

The returned number represents - 'Threads per core' X 'cores per socket' X 'sockets'

​

On the system that i'm running now, I see the output of lscpu as:

CPU(s): 4

On-line CPU(s) list: 0-3

Thread(s) per core: 2

Core(s) per socket: 2

Socket(s): 1

​

The nproc number for preventing forkbombs is not fixed, and should be based on your possible max system usage.

You can calculate 'A' number for nproc for your system by running:

ps aux -L | cut --delimiter=" " --fields=1 | sort | uniq --count | sort --numeric-sort | tail --lines=1

(credit to m.ceppi)

Hint - open as many apps as you can to give max numbers. The nproc number will change depending on your load. Then double that number, to ensure that you don't choke your own system.

​

See also THE ARCHWIKI: https://wiki.archlinux.org/index.php/Limits.conf

23 points

Subreddits

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.