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

Implement new firewall dom0->VM interface #1815

Closed
marmarek opened this Issue Mar 6, 2016 · 9 comments

Comments

@marmarek
Member

marmarek commented Mar 6, 2016

This is placeholder for the outcome of this discussion: https://groups.google.com/d/msgid/qubes-devel/20160114163808.GW4892%40mail-itl

@marmarek marmarek added this to the Release 4.0 milestone Mar 6, 2016

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Mar 7, 2016

vm: remove obsolete firewall handling code
There is no vm.write_iptables_xenstore_entry().

QubesOS/qubes-issues#1815

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Mar 7, 2016

WIP vm: stub for new firewall API
 - introduce 'firewall-changed' event
 - add reload_firewall_for_vm stub function

Should that function be private, called only from appropriate event
handlers?

QubesOS/qubes-issues#1815

woju added a commit to woju/qubes-core-admin that referenced this issue Mar 11, 2016

vm: remove obsolete firewall handling code
There is no vm.write_iptables_xenstore_entry().

QubesOS/qubes-issues#1815

woju added a commit to woju/qubes-core-admin that referenced this issue Mar 11, 2016

WIP vm: stub for new firewall API
 - introduce 'firewall-changed' event
 - add reload_firewall_for_vm stub function

Should that function be private, called only from appropriate event
handlers?

QubesOS/qubes-issues#1815
@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Mar 18, 2016

Member

The outcome is... Quote @marmarek:

  1. have updates proxy running over qrexec instead of TCP/IP, so template will not have its own netvm at all [comment by me: --> #1854]
  2. ease integration of "qubes firewall rules" with other firewalls (like Whonix one) [comment by me: this ticket]
Member

adrelanos commented Mar 18, 2016

The outcome is... Quote @marmarek:

  1. have updates proxy running over qrexec instead of TCP/IP, so template will not have its own netvm at all [comment by me: --> #1854]
  2. ease integration of "qubes firewall rules" with other firewalls (like Whonix one) [comment by me: this ticket]

woju added a commit to woju/qubes-core-admin that referenced this issue Mar 21, 2016

vm: remove obsolete firewall handling code
There is no vm.write_iptables_xenstore_entry().

QubesOS/qubes-issues#1815

woju added a commit to woju/qubes-core-admin that referenced this issue Mar 21, 2016

vm: stub for new firewall API
 - introduce 'firewall-changed' event
 - add reload_firewall_for_vm stub function

Should that function be private, called only from appropriate event
handlers?

QubesOS/qubes-issues#1815
@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong May 19, 2016

Member

Questions pertaining to using Whonix with firewall rules keep coming up, so I'm providing a response here so that I can direct people to this issue:

Whonix-Gateway does not currently support firewall rules. This is a known issue, which I brought up here and here, which branched off here and is being tracked in #1815 (this issue) and here.

Short answer: For now, there's no way to enforce firewall rules for a VM using a whonix-gw as its NetVM, but a solution is in the works.

Member

andrewdavidwong commented May 19, 2016

Questions pertaining to using Whonix with firewall rules keep coming up, so I'm providing a response here so that I can direct people to this issue:

Whonix-Gateway does not currently support firewall rules. This is a known issue, which I brought up here and here, which branched off here and is being tracked in #1815 (this issue) and here.

Short answer: For now, there's no way to enforce firewall rules for a VM using a whonix-gw as its NetVM, but a solution is in the works.

andrewdavidwong added a commit that referenced this issue May 31, 2016

marmarek added a commit to QubesOS/qubes-doc that referenced this issue Sep 6, 2016

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Sep 6, 2016

Member

I've documented new (yet to be implemented) interface for firewall rules:
https://www.qubes-os.org/doc/vm-interface/

As for implementation (in the VM), I plan to replace current iptables-based qubes-firewall script, with nftables one. Thanks to independent tables it will allow to avoid interference between different firewall tools. For example it will allow to respect those rules by Whonix Gateway, without breaking Whonix firewall.
This is somehow extended idea of #974
/cc @adrelanos

Member

marmarek commented Sep 6, 2016

I've documented new (yet to be implemented) interface for firewall rules:
https://www.qubes-os.org/doc/vm-interface/

As for implementation (in the VM), I plan to replace current iptables-based qubes-firewall script, with nftables one. Thanks to independent tables it will allow to avoid interference between different firewall tools. For example it will allow to respect those rules by Whonix Gateway, without breaking Whonix firewall.
This is somehow extended idea of #974
/cc @adrelanos

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 8, 2016

qubes/firewall: new firewall interface
First part - handling firewall.xml and rules formatting.
Specification on https://qubes-os.org/doc/vm-interface/

TODO (for dom0):
 - plug into QubesVM object
 - expose rules in QubesDB (including reloading)
 - drop old functions (vm.get_firewall_conf etc)

QubesOS/qubes-issues#1815

marmarek added a commit to marmarek/old-qubes-core-agent-linux that referenced this issue Sep 12, 2016

network: rewrite qubes-firewall daemon
This rewrite is mainly to adopt new interface for Qubes 4.x.
Main changes:
 - change language from bash to python, introduce qubesagent python package
 - support both nftables (preferred) and iptables
 - new interface (https://qubes-os.org/doc/vm-interface/)
 - IPv6 support
 - unit tests included
 - nftables version support running along with other firewall loaded

Fixes QubesOS/qubes-issues#1815
QubesOS/qubes-issues#718

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 12, 2016

qubes/firewall: new firewall interface
First part - handling firewall.xml and rules formatting.
Specification on https://qubes-os.org/doc/vm-interface/

TODO (for dom0):
 - plug into QubesVM object
 - expose rules in QubesDB (including reloading)
 - drop old functions (vm.get_firewall_conf etc)

QubesOS/qubes-issues#1815

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 12, 2016

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 12, 2016

qubes/firewall: allow listing only IPv4/IPv6 rules
This will allow setting only IPv4-related rules to IPv4 address, and the
same for IPv6

QubesOS/qubes-issues#1815

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 12, 2016

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 12, 2016

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 12, 2016

qubes/firewall: apply only IPv4 rules
Currently dom0 do not assign IPv6 addresses for VMs, so there is no
sense in IPv6 firewall yet.

QubesOS/qubes-issues#1815

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 19, 2016

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 19, 2016

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 19, 2016

qubes/firewall: new firewall interface
First part - handling firewall.xml and rules formatting.
Specification on https://qubes-os.org/doc/vm-interface/

TODO (for dom0):
 - plug into QubesVM object
 - expose rules in QubesDB (including reloading)
 - drop old functions (vm.get_firewall_conf etc)

QubesOS/qubes-issues#1815

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 19, 2016

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 19, 2016

qubes/firewall: allow listing only IPv4/IPv6 rules
This will allow setting only IPv4-related rules to IPv4 address, and the
same for IPv6

QubesOS/qubes-issues#1815

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 19, 2016

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 19, 2016

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 19, 2016

qubes/firewall: apply only IPv4 rules
Currently dom0 do not assign IPv6 addresses for VMs, so there is no
sense in IPv6 firewall yet.

QubesOS/qubes-issues#1815

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 19, 2016

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 19, 2016

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 21, 2016

qubes/firewall: new firewall interface
First part - handling firewall.xml and rules formatting.
Specification on https://qubes-os.org/doc/vm-interface/

TODO (for dom0):
 - plug into QubesVM object
 - expose rules in QubesDB (including reloading)
 - drop old functions (vm.get_firewall_conf etc)

QubesOS/qubes-issues#1815

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 21, 2016

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 21, 2016

qubes/firewall: allow listing only IPv4/IPv6 rules
This will allow setting only IPv4-related rules to IPv4 address, and the
same for IPv6

QubesOS/qubes-issues#1815

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 21, 2016

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 21, 2016

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 21, 2016

qubes/firewall: apply only IPv4 rules
Currently dom0 do not assign IPv6 addresses for VMs, so there is no
sense in IPv6 firewall yet.

QubesOS/qubes-issues#1815

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Sep 21, 2016

@ubestemt

This comment has been minimized.

Show comment
Hide comment
@ubestemt

ubestemt Apr 27, 2017

Shouldn't a warning be displayed when using sys-whonix as NetVM and opening the Firewall tab in VM Preferences, just like it is when sys-net is used as NetVM? Otherwise, how will the average user know?

Shouldn't a warning be displayed when using sys-whonix as NetVM and opening the Firewall tab in VM Preferences, just like it is when sys-net is used as NetVM? Otherwise, how will the average user know?

@andrewdavidwong

This comment has been minimized.

Show comment
Hide comment
@andrewdavidwong

andrewdavidwong Apr 27, 2017

Member

Shouldn't a warning be displayed when using sys-whonix as NetVM and opening the Firewall tab in VM Preferences, just like it is when sys-net is used as NetVM? Otherwise, how will the average user know?

Sounds like this is covered by #2003.

Member

andrewdavidwong commented Apr 27, 2017

Shouldn't a warning be displayed when using sys-whonix as NetVM and opening the Firewall tab in VM Preferences, just like it is when sys-net is used as NetVM? Otherwise, how will the average user know?

Sounds like this is covered by #2003.

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Jun 9, 2017

Automated announcement from builder-github

The package python2-dnf-plugins-qubes-hooks-4.0.0-1.fc24 has been pushed to the r4.0 testing repository for the Fedora fc24 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

Automated announcement from builder-github

The package python2-dnf-plugins-qubes-hooks-4.0.0-1.fc24 has been pushed to the r4.0 testing repository for the Fedora fc24 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

@qubesos-bot qubesos-bot referenced this issue in QubesOS/updates-status Jun 9, 2017

Closed

core-agent-linux v4.0.0 (r4.0) #68

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Jun 9, 2017

Automated announcement from builder-github

The package python2-dnf-plugins-qubes-hooks-4.0.0-1.fc25 has been pushed to the r4.0 testing repository for the Fedora fc25 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

Automated announcement from builder-github

The package python2-dnf-plugins-qubes-hooks-4.0.0-1.fc25 has been pushed to the r4.0 testing repository for the Fedora fc25 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Jun 9, 2017

Automated announcement from builder-github

The package qubes-core-agent_4.0.0-1+deb8u1 has been pushed to the r4.0 testing repository for the Debian jessie template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing jessie-testing, then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

Automated announcement from builder-github

The package qubes-core-agent_4.0.0-1+deb8u1 has been pushed to the r4.0 testing repository for the Debian jessie template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing jessie-testing, then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Jun 9, 2017

Automated announcement from builder-github

The package qubes-core-agent_4.0.0-1+deb9u1 has been pushed to the r4.0 testing repository for the Debian stretch template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing stretch-testing, then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

Automated announcement from builder-github

The package qubes-core-agent_4.0.0-1+deb9u1 has been pushed to the r4.0 testing repository for the Debian stretch template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing stretch-testing, then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

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