You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Execution-ModuleP3Priority 3PlatformRelates to OS, containers, platform-based utilities like FS, system based appsbugbroken, incorrect, or confusing behaviorseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
i can be wrong in understanding of functionality of --set option. As i understand it can work only with source address. And in my formula i need to specify match-set for source and destination ipsets in one rule.
Why exactly is the latter example you posted better? I haven't used ipset much myself, but from reading the manpages the format of the argument is --match-set setname flag[,flag], to which I think your first example maps cleaner, and is easier to reason about and implement.
About last example.
I think it's better for visual understanding. Cause we can specify several ipset lists per one of directions (src and dst).
I saw your reply to pull request. I agree that my "patch" is not so good and I didn't checked variant with negotiations. I can try to fix this and create new pull request.
I updated iptables module. It now includes check for negotiation.
While I was working on my iptables formula for linux firewall I got that we should manually specify next thing:
- match:
-iprange
- dst-range: 10.0.0.2-10.0.0.5
But i saw a ticket there with proposal totally rewrite this module. Hope this also would be fiixed in future.
Execution-ModuleP3Priority 3PlatformRelates to OS, containers, platform-based utilities like FS, system based appsbugbroken, incorrect, or confusing behaviorseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Activity
l13t commentedon Dec 4, 2015
Update:
I thought about appending string with variables.
For such configuration:
I got such string generated:
For some reason it doesn't proceed inserted twice option and gets only last one.
l13t commentedon Dec 4, 2015
One variant:
In /usr/lib/python2.7/dist-packages/salt/modules/iptables.py insert into build_rule funnction after proceeding match with if next code:
jfindlay commentedon Dec 4, 2015
@l13t, thanks for working on this. You are welcome to submit a pull request for this against 2015.8. @thusoy, please also review.
thusoy commentedon Dec 4, 2015
Some thoughts:
-m setonly needs to be added to the rule once (right?), thus can be pulled out of the loopruleis a list, thus appending needs to be done usingrule.append.Put it next to and integrate with the deprecated set handling in
build_ruleand I'm happy.l13t commentedon Dec 4, 2015
My current formula in result has next code:
But it would be better if match-set in result would have next structure:
And then result of proceeding such configuration would be:
If I clearly understand iptables man pages it should work.
thusoy commentedon Dec 7, 2015
Cool, learned something new today about
-m set.Why exactly is the latter example you posted better? I haven't used ipset much myself, but from reading the manpages the format of the argument is
--match-set setname flag[,flag], to which I think your first example maps cleaner, and is easier to reason about and implement.l13t commentedon Dec 7, 2015
About last example.
I think it's better for visual understanding. Cause we can specify several ipset lists per one of directions (src and dst).
I saw your reply to pull request. I agree that my "patch" is not so good and I didn't checked variant with negotiations. I can try to fix this and create new pull request.
l13t commentedon Dec 7, 2015
@thusoy
I thought about your proposal one more time. I think it would be really better to have next structure for match-set option:
It would prevent issue with negotiation of all list. Anyway it works if we're specifying set's one-by-one.
And it should be documented as well ((:
l13t commentedon Dec 9, 2015
I updated iptables module. It now includes check for negotiation.
While I was working on my iptables formula for linux firewall I got that we should manually specify next thing:
But i saw a ticket there with proposal totally rewrite this module. Hope this also would be fiixed in future.
Support match-sets in iptables module
Support match-sets in iptables module