mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
Set iptables rules for each IP, not just each interface
(imported from commit c24d2123489dc384bf50e379d245807af3488ebf)
This commit is contained in:
parent
9329109391
commit
104c2a06ae
@ -91,6 +91,9 @@ for device in macs.values():
|
||||
device = "eth%i:%i" % (device_number, count)
|
||||
log.info("Configuring %s with IP %s" % (device, ip))
|
||||
subprocess.check_call(['/sbin/ifconfig', device, ip])
|
||||
subprocess.check_call(
|
||||
['/sbin/iptables', '-t', 'mangle', '-A', 'OUTPUT', '-m', 'conntrack', '--ctorigdst',
|
||||
ip, '-j', 'MARK', '--set-mark', str(device_number)])
|
||||
|
||||
for throwaway in range(2):
|
||||
# Don't freak out if this doens't work.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user