services: Set 'default' sysctl interface settings in addition to 'all'.
This commit is contained in:
parent
c54e8928d3
commit
adbbafcc11
1 changed files with 9 additions and 6 deletions
|
@ -52,12 +52,15 @@ class IPForwardService(UtilService):
|
|||
cfg = """\
|
||||
#!/bin/sh
|
||||
# auto-generated by IPForward service (utility.py)
|
||||
%s -w net.ipv4.conf.all.forwarding=1
|
||||
%s -w net.ipv6.conf.all.forwarding=1
|
||||
%s -w net.ipv4.conf.all.send_redirects=0
|
||||
%s -w net.ipv4.conf.all.rp_filter=0
|
||||
%s -w net.ipv4.conf.default.rp_filter=0
|
||||
""" % (SYSCTL_BIN, SYSCTL_BIN, SYSCTL_BIN, SYSCTL_BIN, SYSCTL_BIN)
|
||||
%(sysctl)s -w net.ipv4.conf.all.forwarding=1
|
||||
%(sysctl)s -w net.ipv4.conf.default.forwarding=1
|
||||
%(sysctl)s -w net.ipv6.conf.all.forwarding=1
|
||||
%(sysctl)s -w net.ipv6.conf.default.forwarding=1
|
||||
%(sysctl)s -w net.ipv4.conf.all.send_redirects=0
|
||||
%(sysctl)s -w net.ipv4.conf.default.send_redirects=0
|
||||
%(sysctl)s -w net.ipv4.conf.all.rp_filter=0
|
||||
%(sysctl)s -w net.ipv4.conf.default.rp_filter=0
|
||||
""" % {'sysctl': SYSCTL_BIN}
|
||||
for ifc in node.netifs():
|
||||
name = sysctldevname(ifc.name)
|
||||
cfg += "%s -w net.ipv4.conf.%s.forwarding=1\n" % (SYSCTL_BIN, name)
|
||||
|
|
Loading…
Reference in a new issue