如何更改systemd中所有接口的参数?
例如:
sysctl -w "net.ipv4.conf.eth0.rp_filter=0"
sysctl -w "net.ipv4.conf.eth1.rp_filter=0"如何对所有接口进行更改?
发布于 2014-04-28 13:13:14
试试all和default:
# sysctl -w "net.ipv4.conf.all.rp_filter=0"
# sysctl -w "net.ipv4.conf.default.rp_filter=0"在内核文档中解释了这一点:
conf/default/*: Change the interface-specific default settings.
conf/all/*: Change all the interface-specific settings.但是,请注意,在all中添加一个新值并不会改变从接口读取的值,而只会在内部计算和使用。有关更多细节,请参见此电子邮件。
https://unix.stackexchange.com/questions/126903
复制相似问题