openwrt21 sysctl.conf配置文件路径

汇总一下openwrt 21.02系统上sysctl 参数配置:

为保持兼容,依旧是存在 /etc/sysctl.conf文件,但是这个文件内做了提示去修改/etc/sysctl.d/目录下文件。

/etc/sysctl.d # cat /etc/sysctl.conf
# Defaults are configured in /etc/sysctl.d/* and can be customized in this file

接下来去看一下 /etc/sysctl.d/* 目录下的文件:

/etc/sysctl.d # ls
10-default.conf       11-br-netfilter.conf  11-nf-conntrack.conf

10-default.conf文件内是一些基本默认值。

/etc/sysctl.d # cat 10-default.conf
# Do not edit, changes to this file will be lost on upgrades
# /etc/sysctl.conf can be used to customize sysctl settings

kernel.panic=3
kernel.core_pattern=/tmp/%e.%t.%p.%s.core
fs.suid_dumpable=2

fs.protected_hardlinks=1
fs.protected_symlinks=1

net.core.bpf_jit_enable=1

net.ipv4.conf.default.arp_ignore=1
net.ipv4.conf.all.arp_ignore=1
net.ipv4.ip_forward=1
net.ipv4.icmp_echo_ignore_broadcasts=1
net.ipv4.icmp_ignore_bogus_error_responses=1
net.ipv4.igmp_max_memberships=100
net.ipv4.tcp_fin_timeout=30
net.ipv4.tcp_keepalive_time=120
net.ipv4.tcp_syncookies=1
net.ipv4.tcp_timestamps=1
net.ipv4.tcp_sack=1
net.ipv4.tcp_dsack=1

net.ipv6.conf.default.forwarding=1
net.ipv6.conf.all.forwarding=1

在代码中的位置为:
package/base-files/files/etc/sysctl.d/10-default.conf

另外两个11-br-netfilter.conf 11-nf-conntrack.conf是一些内核参数的设置。
在代码中的位置为:

book@book-vm ~/w/w/o/p/k/l/files (openwrt)> ls
hotplug-sched-teql.sh  sysctl-br-netfilter.conf  sysctl-nf-conntrack.conf  sysctl-tcp-bbr.conf

你可能感兴趣的:(Opwnert,openwrt)