You are not logged in.

#1 2013-07-16 06:34:46

antiuser
Member
Registered: 2012-04-09
Posts: 15

systemd-sysctl doesnt work

Hello! I want to use my own parameters in sysctl.conf.d

But when i enable it i receive following errors:

# systemctl enable systemd-sysctl

The unit files have no [Install] section. They are not meant to be enabled
using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).

Help!

Offline

#2 2013-07-16 10:18:35

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: systemd-sysctl doesnt work

I guess this is static. So you don't have to enable it, ie: it is always enabled (and executed) until you mask it.

Offline

#3 2013-07-16 13:11:00

antiuser
Member
Registered: 2012-04-09
Posts: 15

Re: systemd-sysctl doesnt work

nierro wrote:

I guess this is static. So you don't have to enable it, ie: it is always enabled (and executed) until you mask it.

No. When i change parameter in /etc/sysctl.conf or add param to /etc/sysctl.conf.d/my.conf after reboot no effect

Offline

#4 2013-07-16 13:19:47

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: systemd-sysctl doesnt work

Well, i have no sysctl.conf as of now.
I have a /etc/sysctl.d/mine.conf, with

# protection from the SYN flood attack
net.ipv4.tcp_syncookies = 1

# Disable packet forwarding
net.ipv4.ip_forward = 0

vm.vfs_cache_pressure = 50
#vm.swappiness = 20

net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1

And, for example:

cat /proc/sys/vm/vfs_cache_pressure 
50

So it works...

Offline

#5 2013-07-16 14:04:17

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: systemd-sysctl doesnt work

Moving from Arch Discussion to Newbie Corner.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#6 2013-07-16 14:15:44

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: systemd-sysctl doesnt work

antiuser wrote:
nierro wrote:

I guess this is static. So you don't have to enable it, ie: it is always enabled (and executed) until you mask it.

No. When i change parameter in /etc/sysctl.conf or add param to /etc/sysctl.conf.d/my.conf after reboot no effect

And what parameter is this? If it's something in an existing file, you need to override it in a file of that name, or else it's a duplicate key and systemd-sysctl ignores it.

Posting vague descriptions of what you're doing and saying "it doesn't work" gets you nowhere.

Offline

#7 2013-07-17 02:31:59

antiuser
Member
Registered: 2012-04-09
Posts: 15

Re: systemd-sysctl doesnt work

falconindy wrote:
antiuser wrote:
nierro wrote:

I guess this is static. So you don't have to enable it, ie: it is always enabled (and executed) until you mask it.

No. When i change parameter in /etc/sysctl.conf or add param to /etc/sysctl.conf.d/my.conf after reboot no effect

And what parameter is this? If it's something in an existing file, you need to override it in a file of that name, or else it's a duplicate key and systemd-sysctl ignores it.

Posting vague descriptions of what you're doing and saying "it doesn't work" gets you nowhere.

Okay, im adding to systemd-sysctl.service Install section with WantedBy=multiuser.target and then i could enabled this service. But when my machine restart sysctl doesnt boot my params, so when i restart systemd-sysctl.service params apply normally. But in systemctl status systemd-sysctl.service i see that service is active, but params not apply at boot sad

Last edited by antiuser (2013-07-17 02:33:38)

Offline

#8 2013-07-17 03:00:13

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: systemd-sysctl doesnt work

falconindy wrote:

And what parameter is this? If it's something in an existing file, you need to override it in a file of that name, or else it's a duplicate key and systemd-sysctl ignores it.

Posting vague descriptions of what you're doing and saying "it doesn't work" gets you nowhere.

Offline

#9 2013-07-17 08:36:51

antiuser
Member
Registered: 2012-04-09
Posts: 15

Re: systemd-sysctl doesnt work

WonderWoofy wrote:
falconindy wrote:

And what parameter is this? If it's something in an existing file, you need to override it in a file of that name, or else it's a duplicate key and systemd-sysctl ignores it.

Posting vague descriptions of what you're doing and saying "it doesn't work" gets you nowhere.

net.nf_conntrack_max = 2097152

Offline

#10 2013-07-17 12:49:41

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: systemd-sysctl doesnt work

Probably a race condition with the sysctl setting being applied before the nf_conntrack module is loaded. So, load the module earlier.

Offline

#11 2013-07-17 13:22:26

antiuser
Member
Registered: 2012-04-09
Posts: 15

Re: systemd-sysctl doesnt work

falconindy wrote:

Probably a race condition with the sysctl setting being applied before the nf_conntrack module is loaded. So, load the module earlier.

of course, nf_conntrack loading when starting iptables, maybe sysctl starting before iptables

Last edited by antiuser (2013-07-17 13:23:00)

Offline

Board footer

Powered by FluxBB