Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Account for changes in Qubes 4 firewall #14

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tasket
Copy link
Contributor

@tasket tasket commented Mar 27, 2018

Adapt to changes in Qubes 4.0 firewall service (one fix and one enhancement) that affect the bitmask code.

As a result, qubes-ip-change-hook should no longer be used here, and qubes-firewall-user-script avoided in favor of a role-based entry 90_tunnel-restrict in qubes-firewall.d.

Note that Qubes 4.0 is now at release candidate 5 stage, and project leader has indicated this is probably the final rc before release.

@tasket
Copy link
Contributor Author

tasket commented Mar 31, 2018

Fixed the extra '/' in path.

@meskio
Copy link
Collaborator

meskio commented Apr 5, 2018

I'm testing it both in qubes 3.2 and 4.0 and I'm failing to make it work. To be fair, it's not new, I see the same problem with the current version of bitmask-root. In proxyVMs all the connections get blocked when I turn on the VPN, I can't reach any host. I works fine if is not a proxyVM. I starting experiencing this problem few weeks ago, but I haven't found the time yet to debug it.

@tasket does it work fine for you?

not os.path.isdir(os.path.dirname(QUBES_FW_SCRIPT)):
os.makedirs(os.path.dirname(QUBES_FW_SCRIPT))
if QUBES_VER == 3 and os.path.exists(QUBES_FW_SCRIPT):
os.rename(QUBES_FW_SCRIPT, QUBES_FW_SCRIPT + ".bak")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the second run of bitmask going to rewrite the .bak file with the bitmask modified one? Maybe you could check if there is no .bak file and only do the rename if so? Does this make sense? Or am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will overwrite only in the case that the current QUBES_FW_SCRIPT is not bitmask-generated (outer if block). But checking here as you suggest is also a good idea.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants