|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
From 59fccb9cb4eba406dbee93864638cc52f6ee7d4a Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
Date: Thu, 19 Jun 2014 20:43:56 -0400
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
Subject: [PATCH] man: document statically loading modules for sysctl settings
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
https://bugzilla.redhat.com/show_bug.cgi?id=1022977
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
https://bugzilla.novell.com/show_bug.cgi?id=725412
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
(cherry picked from commit 7284335adbb8cb2bc9c11f9e102906da1bf71145)
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
man/sysctl.d.xml | 79 +++++++++++++++++++++++++++++++++++++++-----------------
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
1 file changed, 56 insertions(+), 23 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
diff --git a/man/sysctl.d.xml b/man/sysctl.d.xml
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
index db53b495..78c4e80b 100644
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
--- a/man/sysctl.d.xml
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+++ b/man/sysctl.d.xml
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
@@ -71,24 +71,6 @@
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
is <literal>#</literal> or <literal>;</literal> are
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
ignored.</para>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- <para>Note that either <literal>/</literal> or
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- <literal>.</literal> may be used as separators within
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- sysctl variable names. If the first separator is a
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- slash, remaining slashes and dots are left intact. If
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- the first separator is a dot, dots and slashes are
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- interchanged. <literal>kernel.domainname=foo</literal>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- and <literal>kernel/domainname=foo</literal> are
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- equivalent and will cause <literal>foo</literal> to
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- be written to
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- <filename>/proc/sys/kernel/domainname</filename>.
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- Either
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- <literal>net.ipv4.conf.enp3s0/200.forwarding</literal>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- or
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- <literal>net/ipv4/conf/enp3s0.200/forwarding</literal>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- may be used to refer to
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- <filename>/proc/sys/net/ipv4/conf/enp3s0.200/forwarding</filename>.
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- </para>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
-
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
<para>Each configuration file shall be named in the
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
style of <filename><replaceable>program</replaceable>.conf</filename>.
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
Files in <filename>/etc/</filename> override files
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
@@ -110,6 +92,24 @@
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
number and a dash, to simplify the ordering of the
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
files.</para>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <para>Note that either <literal>/</literal> or
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <literal>.</literal> may be used as separators within
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ sysctl variable names. If the first separator is a
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ slash, remaining slashes and dots are left intact. If
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ the first separator is a dot, dots and slashes are
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ interchanged. <literal>kernel.domainname=foo</literal>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ and <literal>kernel/domainname=foo</literal> are
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ equivalent and will cause <literal>foo</literal> to
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ be written to
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <filename>/proc/sys/kernel/domainname</filename>.
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ Either
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <literal>net.ipv4.conf.enp3s0/200.forwarding</literal>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ or
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <literal>net/ipv4/conf/enp3s0.200/forwarding</literal>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ may be used to refer to
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <filename>/proc/sys/net/ipv4/conf/enp3s0.200/forwarding</filename>.
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ </para>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
<para>If the administrator wants to disable a
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
configuration file supplied by the vendor, the
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
recommended way is to place a symlink to
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
@@ -125,16 +125,48 @@
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
specifically,
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
<filename>net.ipv4.conf.*</filename>,
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
<filename>net.ipv6.conf.*</filename>,
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- <filename>net.ipv4.neigh.*</filename> and <filename>net.ipv6.neigh.*</filename>)</para>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <filename>net.ipv4.neigh.*</filename> and <filename>net.ipv6.neigh.*</filename>).</para>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <para>Many sysctl parameters only become available
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ when certain kernel modules are loaded. Modules are
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ usually loaded on demand, e.g. when certain hardware
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ is plugged in or network brought up. This means that
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <citerefentry><refentrytitle>systemd-sysctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> which runs
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ during early boot will not configure such parameters
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ if they become available after it has run. To
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ set such parameters, it is recommended to add
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ an <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry> rule to set those parameters when they become
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ available. Alternatively, a slightly simpler and
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ less efficient option is to add the module to
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <citerefentry><refentrytitle>modules-load.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, causing it to be loaded statically
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ before sysctl settings are applied (see
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ example below).</para>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
</refsect1>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
<refsect1>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- <title>Example</title>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <title>Examples</title>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <example>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <title>Set kernel YP domain name</title>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <para><filename>/etc/sysctl.d/domain-name.conf</filename>:
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ </para>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <programlisting>kernel.domainname=example.com</programlisting>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ </example>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
<example>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- <title>/etc/sysctl.d/domain-name.conf example:</title>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <title>Disable packet filter on the bridge</title>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <para><filename>/etc/modules-load.d/bridge.conf</filename>:
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ </para>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <programlisting>bridge</programlisting>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <para><filename>/etc/sysctl.d/bridge.conf</filename>:
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ </para>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- <programlisting># Set kernel YP domain name
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
-kernel.domainname=example.com</programlisting>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <programlisting>net.bridge.bridge-nf-call-ip6tables = 0
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+net.bridge.bridge-nf-call-iptables = 0
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+net.bridge.bridge-nf-call-arptables = 0
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+</programlisting>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
</example>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
</refsect1>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
@@ -146,6 +178,7 @@ kernel.domainname=example.com</programlisting>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
<citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
<citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
<citerefentry><refentrytitle>sysctl.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ <citerefentry><refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
</para>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
</refsect1>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
|