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

Qubes Firewall - Add rules to QBS-prefixed chain #974

Closed
cfcs opened this Issue Apr 27, 2015 · 5 comments

Comments

Projects
None yet
2 participants
@cfcs

cfcs commented Apr 27, 2015

It is a general nuisance that the Qubes firewall (with random intervals / triggered by random UI actions?) decides to add rules to INPUT, OUTPUT, FORWARD and the like.
This behavior makes a complete mess of any custom rules for that domain.

Having specific chains for the Qubes firewall rules would allow us to have -j RETURN targets instead of -j ACCEPT for the automatically generated rules.
The -j ACCEPT forces custom rule writers to end policies that don't permit random packets through to end the list of custom rules with -j DROP, effectively disabling the UI-set policies.

Thoughts?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Feb 2, 2016

Member

Those chains could be created per-VM, making customization even easier.
Additionally -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT rule could be put in such per-VM chain - to be able to cut existing connections when setting firewall to "deny" (see #1717)

Member

marmarek commented Feb 2, 2016

Those chains could be created per-VM, making customization even easier.
Additionally -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT rule could be put in such per-VM chain - to be able to cut existing connections when setting firewall to "deny" (see #1717)

@cfcs

This comment has been minimized.

Show comment
Hide comment
@cfcs

cfcs Feb 3, 2016

@marmarek: that sounds good!
Although I'm a bit wary of the RELATED selector, as it has port/protocol-specific side-effects - is that really needed?

cfcs commented Feb 3, 2016

@marmarek: that sounds good!
Although I'm a bit wary of the RELATED selector, as it has port/protocol-specific side-effects - is that really needed?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Feb 4, 2016

Member

It is useful for example for FTP. If you want to allow only FTP output,
you need this, otherwise you'll transfer any file.

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Member

marmarek commented Feb 4, 2016

It is useful for example for FTP. If you want to allow only FTP output,
you need this, otherwise you'll transfer any file.

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

@cfcs

This comment has been minimized.

Show comment
Hide comment
@cfcs

cfcs Feb 4, 2016

Yes, if you want the kernel to parse, for example, FTP.
Coming from an FTP client, the browser, or anything else that manages to trick the ring 0 parser into believing it's speaking FTP or one of the 10-20 other protocols that the kernel contains parsers for.
I'm not so sure I'd like that.

cfcs commented Feb 4, 2016

Yes, if you want the kernel to parse, for example, FTP.
Coming from an FTP client, the browser, or anything else that manages to trick the ring 0 parser into believing it's speaking FTP or one of the 10-20 other protocols that the kernel contains parsers for.
I'm not so sure I'd like that.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Oct 5, 2016

Member

As part of #1815, this has been superseded by using nftables - which is not limited to predefined chains. New approach uses qubes-firewall table, with appropriate chains and do not modify default tables (managed by compatibility iptables tool).

Member

marmarek commented Oct 5, 2016

As part of #1815, this has been superseded by using nftables - which is not limited to predefined chains. New approach uses qubes-firewall table, with appropriate chains and do not modify default tables (managed by compatibility iptables tool).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment