Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to set base chains #95

Closed
AlexSamad opened this issue May 22, 2021 · 8 comments · Fixed by #96
Closed

Ability to set base chains #95

AlexSamad opened this issue May 22, 2021 · 8 comments · Fixed by #96
Assignees
Labels
enhancement New feature or request

Comments

@AlexSamad
Copy link

Rhel8

I would like to remove the drop invalid.
From previous experience - restarting (iptables) via services also cleared connection tracking which made every packet invalid

But I would still like more control of those base chains (INPUT/OUTPUT/FORWARD). Not sure how to do that with the current config

@nbarrientos
Copy link
Collaborator

Hi @AlexSamad

You can always set nftables::in_out_conntrack and nftables::fwd_conntrack to false and create the conntrack-related rules that you consider more appropriate for your use case using nftables::rule.

@AlexSamad
Copy link
Author

AlexSamad commented May 24, 2021 via email

@nbarrientos
Copy link
Collaborator

If I understand correctly what you'd like to achieve, the module would have to be patched to put the statement that includes inet_filter behind a parameter. That should give you a clear canvas allowing you to define your own tables, chains and rules using the types provided by the module.

The default skeleton we're currently shipping is skinny enough to cover many use cases so we should probably continue with the same default. That said, I personally don't see any problem in allowing to optionally have an even more lightweight set of defaults.

I'll let the other devs comment though, perhaps I'm not understanding you correctly.

@AlexSamad
Copy link
Author

AlexSamad commented May 26, 2021 via email

@AlexSamad
Copy link
Author

Hi
Another example I have a vendor app - just moved from rhel7 to rhel8 and it wants the tables/chains setup in a certain way - mimicking iptables - INPUT/FORWARD/OUTPUT etc.

Can't really do it with your module. I would really like to use your code for managing files and testing before implementing.
it would just be nice to not have any chains/tables setup.

Thanks

@nbarrientos
Copy link
Collaborator

Ok. Putting include inet_filter behind a parameter (default true) should cover your use case. Comments? @duritong @traylenator @keachi

@duritong
Copy link
Collaborator

As long as the default doesn't change, ok for me.

@AlexSamad
Copy link
Author

AlexSamad commented May 30, 2021 via email

nbarrientos added a commit to nbarrientos/puppet-nftables that referenced this issue May 31, 2021
By setting `nftables::inet_filter` and `nftables::nat` to `false`
users can now start off from a totally empty firewall and add the
tables, chains and rules they'd like.

The default skeleton for inet-filter, ip-nat and ip6-nat is kept
enabled by default.

Fixes voxpupuli#95.
nbarrientos added a commit to nbarrientos/puppet-nftables that referenced this issue May 31, 2021
By setting `nftables::inet_filter` and `nftables::nat` to `false`
users can now start off from a totally empty firewall and add the
tables, chains and rules they'd like.

The default skeleton for inet-filter, ip-nat and ip6-nat is kept
enabled by default.

Fixes voxpupuli#95.
nbarrientos added a commit to nbarrientos/puppet-nftables that referenced this issue May 31, 2021
By setting `nftables::inet_filter` and `nftables::nat` to `false`
users can now start off from a totally empty firewall and add the
tables, chains and rules they'd like.

The default skeleton for inet-filter, ip-nat and ip6-nat is kept
enabled by default.

Fixes voxpupuli#95.
nbarrientos added a commit to nbarrientos/puppet-nftables that referenced this issue May 31, 2021
By setting `nftables::inet_filter` and `nftables::nat` to `false`
users can now start off from a totally empty firewall and add the
tables, chains and rules they'd like.

The default skeleton for inet-filter, ip-nat and ip6-nat is kept
enabled by default.

Fixes voxpupuli#95.
nbarrientos added a commit to nbarrientos/puppet-nftables that referenced this issue May 31, 2021
By setting `nftables::inet_filter` and `nftables::nat` to `false`
users can now start off from a totally empty firewall and add the
tables, chains and rules they'd like.

The default skeleton for inet-filter, ip-nat and ip6-nat is kept
enabled by default.

Fixes voxpupuli#95.
nbarrientos added a commit to nbarrientos/puppet-nftables that referenced this issue May 31, 2021
By setting `nftables::inet_filter` and `nftables::nat` to `false`
users can now start off from a totally empty firewall and add the
tables, chains and rules they'd like.

The default skeleton for inet-filter, ip-nat and ip6-nat is kept
enabled by default.

Fixes voxpupuli#95.
nbarrientos added a commit to nbarrientos/puppet-nftables that referenced this issue May 31, 2021
By setting `nftables::inet_filter` and `nftables::nat` to `false`
users can now start off from a totally empty firewall and add the
tables, chains and rules they'd like.

The default skeleton for inet-filter, ip-nat and ip6-nat is kept
enabled by default.

Fixes voxpupuli#95.
@traylenator traylenator added the enhancement New feature or request label Jun 1, 2021
@nbarrientos nbarrientos self-assigned this Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants