{
    "content": [
        {
            "type": "text",
            "text": "# sysctl.d (info)\n\n## NAME\n\nsysctl.d - Configure kernel parameters at boot\n\n## SYNOPSIS\n\n/etc/sysctl.d/*.conf\n/run/sysctl.d/*.conf\n/usr/lib/sysctl.d/*.conf\nkey.name.under.proc.sys = some value\nkey/name/under/proc/sys = some value\nkey/middle.part.with.dots/foo = 123\nkey.middle/part/with/dots.foo = 123\n-key.that.will.not.fail = value\nkey.pattern.*.with.glob = whatever\n-key.pattern.excluded.with.glob\nkey.pattern.overridden.with.glob = custom\n\n## DESCRIPTION\n\nAt boot, systemd-sysctl.service(8) reads configuration files from the\nabove directories to configure sysctl(8) kernel parameters.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **CONFIGURATION FORMAT**\n- **CONFIGURATION DIRECTORIES AND PRECEDENCE**\n- **EXAMPLES**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "sysctl.d",
        "section": "",
        "mode": "info",
        "summary": "sysctl.d - Configure kernel parameters at boot",
        "synopsis": "/etc/sysctl.d/*.conf\n/run/sysctl.d/*.conf\n/usr/lib/sysctl.d/*.conf\nkey.name.under.proc.sys = some value\nkey/name/under/proc/sys = some value\nkey/middle.part.with.dots/foo = 123\nkey.middle/part/with/dots.foo = 123\n-key.that.will.not.fail = value\nkey.pattern.*.with.glob = whatever\n-key.pattern.excluded.with.glob\nkey.pattern.overridden.with.glob = custom",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "Example 1. Set kernel YP domain name",
            "/etc/sysctl.d/domain-name.conf:",
            "kernel.domainname=example.com",
            "Example 2. Apply settings available only when a certain module is",
            "loaded (method one)",
            "/etc/udev/rules.d/99-bridge.rules:",
            "ACTION==\"add\", SUBSYSTEM==\"module\", KERNEL==\"brnetfilter\", \\",
            "RUN+=\"/lib/systemd/systemd-sysctl --prefix=/net/bridge\"",
            "/etc/sysctl.d/bridge.conf:",
            "net.bridge.bridge-nf-call-ip6tables = 0",
            "net.bridge.bridge-nf-call-iptables = 0",
            "net.bridge.bridge-nf-call-arptables = 0",
            "This method applies settings when the module is loaded. Please note",
            "that, unless the brnetfilter module is loaded, bridged packets will",
            "not be filtered by Netfilter (starting with kernel 3.18), so simply not",
            "loading the module is sufficient to avoid filtering.",
            "Example 3. Apply settings available only when a certain module is",
            "loaded (method two)",
            "/etc/modules-load.d/bridge.conf:",
            "brnetfilter",
            "/etc/sysctl.d/bridge.conf:",
            "net.bridge.bridge-nf-call-ip6tables = 0",
            "net.bridge.bridge-nf-call-iptables = 0",
            "net.bridge.bridge-nf-call-arptables = 0",
            "This method forces the module to be always loaded. Please note that,",
            "unless the brnetfilter module is loaded, bridged packets will not be",
            "filtered with Netfilter (starting with kernel 3.18), so simply not",
            "loading the module is sufficient to avoid filtering.",
            "Example 4. Set network routing properties for all interfaces",
            "/etc/sysctl.d/20-rpfilter.conf:",
            "net.ipv4.conf.default.rpfilter = 2",
            "net.ipv4.conf.*.rpfilter = 2",
            "-net.ipv4.conf.all.rpfilter",
            "net.ipv4.conf.hub0.rpfilter = 1",
            "The rpfilter key will be set to \"2\" for all interfaces, except \"hub0\".",
            "We set net.ipv4.conf.default.rpfilter first, so any interfaces which",
            "are added later will get this value (this also covers any interfaces",
            "detected while we're running). The glob matches any interfaces which",
            "were detected earlier. The glob will also match",
            "net.ipv4.conf.all.rpfilter, which we don't want to set at all, so it",
            "is explicitly excluded. And \"hub0\" is excluded from the glob because it",
            "has an explicit setting."
        ],
        "see_also": [
            {
                "name": "systemd",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
            },
            {
                "name": "systemd-sysctl.service",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/systemd-sysctl.service/8/json"
            },
            {
                "name": "systemd-delta",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemd-delta/1/json"
            },
            {
                "name": "sysctl",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/sysctl/8/json"
            },
            {
                "name": "sysctl.conf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/sysctl.conf/5/json"
            },
            {
                "name": "modprobe",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/modprobe/8/json"
            },
            {
                "name": "SYSCTL.D",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/SYSCTL.D/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "CONFIGURATION FORMAT",
                "lines": 45,
                "subsections": []
            },
            {
                "name": "CONFIGURATION DIRECTORIES AND PRECEDENCE",
                "lines": 28,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 61,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "sysctl.d - Configure kernel parameters at boot\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "/etc/sysctl.d/*.conf\n\n/run/sysctl.d/*.conf\n\n/usr/lib/sysctl.d/*.conf\n\nkey.name.under.proc.sys = some value\nkey/name/under/proc/sys = some value\nkey/middle.part.with.dots/foo = 123\nkey.middle/part/with/dots.foo = 123\n-key.that.will.not.fail = value\nkey.pattern.*.with.glob = whatever\n-key.pattern.excluded.with.glob\nkey.pattern.overridden.with.glob = custom\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "At boot, systemd-sysctl.service(8) reads configuration files from the\nabove directories to configure sysctl(8) kernel parameters.\n",
                "subsections": []
            },
            "CONFIGURATION FORMAT": {
                "content": "The configuration files contain a list of variable assignments,\nseparated by newlines. Empty lines and lines whose first non-whitespace\ncharacter is \"#\" or \";\" are ignored.\n\nNote that either \"/\" or \".\"  may be used as separators within sysctl\nvariable names. If the first separator is a slash, remaining slashes\nand dots are left intact. If the first separator is a dot, dots and\nslashes are interchanged.  \"kernel.domainname=foo\" and\n\"kernel/domainname=foo\" are equivalent and will cause \"foo\" to be\nwritten to /proc/sys/kernel/domainname. Either\n\"net.ipv4.conf.enp3s0/200.forwarding\" or\n\"net/ipv4/conf/enp3s0.200/forwarding\" may be used to refer to\n/proc/sys/net/ipv4/conf/enp3s0.200/forwarding. A glob glob(7) pattern\nmay be used to write the same value to all matching keys. Keys for\nwhich an explicit pattern exists will be excluded from any glob\nmatching. In addition, a key may be explicitly excluded from being set\nby any matching glob patterns by specifying the key name prefixed with\na \"-\" character and not followed by \"=\", see SYNOPSIS.\n\nAny access permission errors and attempts to write variables not\npresent on the local system are logged at debug level and do not cause\nthe service to fail. Other types of errors when setting variables are\nlogged with higher priority and cause the service to return failure at\nthe end (after processing other variables). As an exception, if a\nvariable assignment is prefixed with a single \"-\" character, failure to\nset the variable for any reason will be logged at debug level and will\nnot cause the service to fail.\n\nThe settings configured with sysctl.d files will be applied early on\nboot. The network interface-specific options will also be applied\nindividually for each network interface as it shows up in the system.\n(More specifically, net.ipv4.conf.*, net.ipv6.conf.*, net.ipv4.neigh.*\nand net.ipv6.neigh.*).\n\nMany sysctl parameters only become available when certain kernel\nmodules are loaded. Modules are usually loaded on demand, e.g. when\ncertain hardware is plugged in or network brought up. This means that\nsystemd-sysctl.service(8) which runs during early boot will not\nconfigure such parameters if they become available after it has run. To\nset such parameters, it is recommended to add an udev(7) rule to set\nthose parameters when they become available. Alternatively, a slightly\nsimpler and less efficient option is to add the module to modules-\nload.d(5), causing it to be loaded statically before sysctl settings\nare applied (see example below).\n",
                "subsections": []
            },
            "CONFIGURATION DIRECTORIES AND PRECEDENCE": {
                "content": "Configuration files are read from directories in /etc/, /run/,\n/usr/local/lib/, and /lib/, in order of precedence, as listed in the\nSYNOPSIS section above. Files must have the \".conf\" extension. Files in\n/etc/ override files with the same name in /run/, /usr/local/lib/, and\n/lib/. Files in /run/ override files with the same name under /usr/.\n\nAll configuration files are sorted by their filename in lexicographic\norder, regardless of which of the directories they reside in. If\nmultiple files specify the same option, the entry in the file with the\nlexicographically latest name will take precedence. Thus, the\nconfiguration in a certain file may either be replaced completely (by\nplacing a file with the same name in a directory with higher priority),\nor individual settings might be changed (by specifying additional\nsettings in a file with a different name that is ordered later).\n\nPackages should install their configuration files in /usr/lib/\n(distribution packages) or /usr/local/lib/ (local installs). Files in\n/etc/ are reserved for the local administrator, who may use this logic\nto override the configuration files installed by vendor packages. It is\nrecommended to prefix all filenames with a two-digit number and a dash,\nto simplify the ordering of the files.\n\nIf the administrator wants to disable a configuration file supplied by\nthe vendor, the recommended way is to place a symlink to /dev/null in\nthe configuration directory in /etc/, with the same filename as the\nvendor configuration file. If the vendor configuration file is included\nin the initrd image, the image has to be regenerated.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "Example 1. Set kernel YP domain name\n\n/etc/sysctl.d/domain-name.conf:\n\nkernel.domainname=example.com\n\nExample 2. Apply settings available only when a certain module is\nloaded (method one)\n\n/etc/udev/rules.d/99-bridge.rules:\n\nACTION==\"add\", SUBSYSTEM==\"module\", KERNEL==\"brnetfilter\", \\\nRUN+=\"/lib/systemd/systemd-sysctl --prefix=/net/bridge\"\n\n/etc/sysctl.d/bridge.conf:\n\nnet.bridge.bridge-nf-call-ip6tables = 0\nnet.bridge.bridge-nf-call-iptables = 0\nnet.bridge.bridge-nf-call-arptables = 0\n\nThis method applies settings when the module is loaded. Please note\nthat, unless the brnetfilter module is loaded, bridged packets will\nnot be filtered by Netfilter (starting with kernel 3.18), so simply not\nloading the module is sufficient to avoid filtering.\n\nExample 3. Apply settings available only when a certain module is\nloaded (method two)\n\n/etc/modules-load.d/bridge.conf:\n\nbrnetfilter\n\n/etc/sysctl.d/bridge.conf:\n\nnet.bridge.bridge-nf-call-ip6tables = 0\nnet.bridge.bridge-nf-call-iptables = 0\nnet.bridge.bridge-nf-call-arptables = 0\n\nThis method forces the module to be always loaded. Please note that,\nunless the brnetfilter module is loaded, bridged packets will not be\nfiltered with Netfilter (starting with kernel 3.18), so simply not\nloading the module is sufficient to avoid filtering.\n\nExample 4. Set network routing properties for all interfaces\n\n/etc/sysctl.d/20-rpfilter.conf:\n\nnet.ipv4.conf.default.rpfilter = 2\nnet.ipv4.conf.*.rpfilter = 2\n-net.ipv4.conf.all.rpfilter\nnet.ipv4.conf.hub0.rpfilter = 1\n\nThe rpfilter key will be set to \"2\" for all interfaces, except \"hub0\".\nWe set net.ipv4.conf.default.rpfilter first, so any interfaces which\nare added later will get this value (this also covers any interfaces\ndetected while we're running). The glob matches any interfaces which\nwere detected earlier. The glob will also match\nnet.ipv4.conf.all.rpfilter, which we don't want to set at all, so it\nis explicitly excluded. And \"hub0\" is excluded from the glob because it\nhas an explicit setting.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "systemd(1), systemd-sysctl.service(8), systemd-delta(1), sysctl(8),\nsysctl.conf(5), modprobe(8)\n\nsystemd 249                                                        SYSCTL.D(5)",
                "subsections": []
            }
        }
    }
}