-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
chain_condition
attribute to simple_iptables_rule
Defining a `simple_iptables_rule` resource actually creates a new chain with the name of the resource and a jump to the chain from the chain specified in the `direction` attribute. By default, the jump is unconditional. Introduce a `chain_condition` attribute to be able to make the jump conditional. For example: simple_iptables_rule "management_interface" do direction "INPUT" chain_condition "-i eth1" rule [ "-p tcp --dport 80", "-p tcp --dport 443" ] jump "ACCEPT" end The rules specified under the `rule` attribute will only be evaluate for packets for which the rule in `chain_condition` holds.
- Loading branch information
1 parent
9362068
commit a2581e0
Showing
3 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters