freedomofpress / securedrop-docs

Documentation for the SecureDrop project
https://docs.securedrop.org/
Other
22 stars 26 forks source link

Redundant/incorrect entries in OPNSense Admin network firewall rules #519

Closed torinthiel closed 8 months ago

torinthiel commented 10 months ago

Expected behavior

Firewall rules are not redundant and as tight as possible.

Actual behavior

Current instructions for setting up OPNSense's LAN firewall rules specify two rules - first one to enable SSH to both app and mon machines, and second is a blanket allow from admin_machine to everywhere, labelled 'Tor from Tails'.

Given that the second rule applies to all traffic, it is a superset of the first rule, and the first rule is not needed. Also, it's too broad - tor traffic would only go to LAN port, not to all interfaces.

Therefore I'd suggest to either remove the unnecessary first rule, or to narrow down the second rule to only allow traffic to LAN port. The second option, while preferred, might require either adding port 443 to the first rule or adding second rule allowing 443 traffic to local_machines.

Additional information

The fact that firewall rules for OPT1 and OPT2 specifically disallow inter-zone traffic seems to support tightening downs the rules as suggested above.

cfm commented 8 months ago

Thanks for raising this, @torinthiel. I believe the OPNSense rules you've highlighted here are consistent with the following abstract rules we suggest for any firewall platform:

https://github.com/freedomofpress/securedrop-docs/blob/aac343c1ec6ea8ee99cf7a7c543771d67b6f2414/docs/admin/installation/network_firewall.rst?plain=1#L72-L73

You're right that the the first is a subset of the second, but that's deliberate, so that the different conceptual requirements of SecureDrop's firewall configuration are apparent to administrators.

If you think we can make this clearer, in either the abstract or the OPNSense-specific firewall, we'd of course welcome a pull request with those changes.