Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Add to_destination parameter to iptables #1971

Merged
merged 1 commit into from
Apr 10, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions system/iptables.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,13 @@
sctp."
required: false
default: null
to_destination:
version_added: "2.1"
description:
- "This specifies a destination address to use with DNAT: without
this, the destination address is never altered."
required: false
default: null
set_dscp_mark:
version_added: "2.1"
description:
Expand Down Expand Up @@ -313,6 +320,7 @@ def construct_rule(params):
append_param(rule, params['destination'], '-d', False)
append_param(rule, params['match'], '-m', True)
append_param(rule, params['jump'], '-j', False)
append_param(rule, params['to_destination'], '--to-destination', False)
append_param(rule, params['goto'], '-g', False)
append_param(rule, params['in_interface'], '-i', False)
append_param(rule, params['out_interface'], '-o', False)
Expand Down Expand Up @@ -372,6 +380,7 @@ def main():
protocol=dict(required=False, default=None, type='str'),
source=dict(required=False, default=None, type='str'),
destination=dict(required=False, default=None, type='str'),
to_destination=dict(required=False, default=None, type='str'),
match=dict(required=False, default=[], type='list'),
jump=dict(required=False, default=None, type='str'),
goto=dict(required=False, default=None, type='str'),
Expand Down