File tree Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Expand file tree Collapse file tree 3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -497,6 +497,10 @@ def random_fully(self):
497
497
version = self ._get_version ()
498
498
self .__class__ ._random_fully = utils .is_version_greater_equal (
499
499
version , n_const .IPTABLES_RANDOM_FULLY_VERSION )
500
+
501
+ self ._random_fully = self ._random_fully and \
502
+ cfg .CONF .AGENT .use_random_fully
503
+
500
504
return self ._random_fully
501
505
502
506
@property
Original file line number Diff line number Diff line change 135
135
"of iptables-save. This option should not be turned "
136
136
"on for production systems because it imposes a "
137
137
"performance penalty." )),
138
+ cfg .BoolOpt ('use_random_fully' ,
139
+ default = True ,
140
+ help = _ ("Use random-fully in SNAT masquerade rules." )),
138
141
]
139
142
140
143
PROCESS_MONITOR_OPTS = [
Original file line number Diff line number Diff line change
1
+ ---
2
+ features :
3
+ - |
4
+ Add ``use_random_fully`` setting to allow an operator to disable
5
+ the iptables random-fully property on an iptable rules.
6
+ issues :
7
+ - |
8
+ If the ``use_random_fully`` setting is disabled, it will prevent
9
+ random fully from being used and if there're 2 guests in different
10
+ networks using the same source_ip and source_port and they try to
11
+ reach the same dest_ip and dest_port, packets might be dropped in
12
+ the kernel do to the racy tuple generation . Disabling this
13
+ setting should only be done if source_port is really important such
14
+ as in network firewall ACLs and that the source_ip are never repeating
15
+ within the platform.
You can’t perform that action at this time.
0 commit comments