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

Docs sg3100 firewall #3620

Merged
merged 3 commits into from
Jul 10, 2018
Merged

Conversation

b-meson
Copy link
Contributor

@b-meson b-meson commented Jul 3, 2018

Status

Ready for review

Description of Changes

Fixes #3520.

Testing

A reviewer should factory reset a SG-3100 and follow the 3NIC configuration steps. After setting the firewall rules, they should be able to run through an end-to-end SecureDrop installation and be able to reach the Source interface, the Journalist Interface, and receive OSSEC alerts.

If you made changes to documentation:

  • Doc linting (make docs-lint) passed locally

Notes

I noticed at the very bottom of the Disable DHCP server on Firewall screenshot, there is an Admin Gateway IP which we could probably crop out since it may be confusing. Additionally, this PR does not touch the .xml files which I think we should add as its own issue / commit.

@codecov-io
Copy link

codecov-io commented Jul 3, 2018

Codecov Report

Merging #3620 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #3620   +/-   ##
========================================
  Coverage    85.04%   85.04%           
========================================
  Files           37       37           
  Lines         2367     2367           
  Branches       260      260           
========================================
  Hits          2013     2013           
  Misses         290      290           
  Partials        64       64

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f823deb...2f988cf. Read the comment docs.

Copy link
Contributor

@emkll emkll left a comment

Choose a reason for hiding this comment

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

Thanks @b-meson for the very detailed update to the docs ! I've followed this guide and set up a sg-3100 as you've described and the SecureDrop instance and workstation work well.

The one concern I have with the rules as described is that the anti-lockout rule is such that any host on the LAN network can communicate with the firewall over 80 and 443. In this case, the app server which is configured on the LAN network can communicate with the firewall's web interface, which, I think, should be avoided. I see 2 options:

  1. Disable the anti-lockout rule (system -> advanced -> admin access -> disable webConfigurator anti-lockout rule), ensuring that a rule to allow communication from workstationto the router's web interface is in place.
  1. Put the app server on the OPT1 interface and (optionally) disable the anti lockout rule for the LAN interface (which will now have mon server and workstation).

Other minor comments inline.

:ref:`Hardware Guide <hardware_guide>`.

We currently recommend the `pfSense SG-3100
<https://store.netgate.com/SG-3100.aspx>`__, which has 6 interfaces: WAN,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: It actually has 3 interfaces/NICs (WAN, OPT, and LAN) but it does indeed have 6 ports (WAN, OPT and LAN1 through LAN4)

@@ -99,6 +99,38 @@ chosen:
- Monitor Gateway: ``10.20.3.1``
- Monitor Server (OPT2) : ``10.20.3.2``

3 NIC Example (SG-3100)
Copy link
Contributor

Choose a reason for hiding this comment

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

It it possible to make the numbering 5. b. for 3 NIC Example and 5. a. for the 4 NIC Example? Admins might think they must complete both.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I attempted to do here but it actually looks much worse and is less clear. I did make that change in the other suggested section.

As described earlier, the SG-3100 has an internal switch on the LAN interface
which means we can place the *Application Server* and *Admin Workstation* on
the same subnet and gateway. This example assumes you place the
*Admin Workstation* on LAN1 and the *Application Server* on LAN2.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it matters which LAN ports the admin workstation and application server are connected to (as long as it's one of the four LAN ports) since it's a simple switch.

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 does not. I was slightly confused about which port to put the App and Admin servers so I figured I would be more verbose just to help future admins.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just removed the line This example assumes you place the *Admin Workstation* on LAN1 and the *Application Server* on LAN2. As you said, it shouldn't matter but i think having too much language could be confusing.


- Application Subnet: ``10.20.2.0/24``
- Application Gateway: ``10.20.2.1``
- Application Server (OPT1): ``10.20.2.2``
Copy link
Contributor

Choose a reason for hiding this comment

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

Application server is now on LAN, not OPT1


- Monitor Subnet: ``10.20.3.0/24``
- Monitor Gateway: ``10.20.3.1``
- Monitor Server (OPT2) : ``10.20.3.2``
Copy link
Contributor

Choose a reason for hiding this comment

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

Monitor server in this case in on OPT1, not OPT2


|Configure LAN Interface|

#. **3 NIC Example (SG-3100):**
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above, would it be possible to make them 5.a. and 5.b.?

4 NIC Example
~~~~~~~~~~~~~

If you are using a firewall that has a dedicated port for each component of
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: dedicated NIC or dedicated interface


**LAN interface:**

|3 NIC Firewall LAN Rules|
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: you can move the admin workstation TCP / rule under the deny from LAN to OPT1 which should prevent the workstation from reaching the server over any port that 22.

@@ -371,8 +439,28 @@ In order to use the firewall to isolate the *Application Server* and the *Monito
Server* from each other, we need to connect them to separate interfaces, and then set
up firewall rules that allow them to communicate.

Setup the Firewall Rules
Copy link
Member

Choose a reason for hiding this comment

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

Nit: setup->set up (only one word when used as a noun)

Set Up LAN
''''''''''

Although we setup the LAN interface during the Setup Wizard we need to make
Copy link
Member

Choose a reason for hiding this comment

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

setup->set up

@b-meson
Copy link
Contributor Author

b-meson commented Jul 5, 2018

@emkll instead of this:

Disable the anti-lockout rule (system -> advanced -> admin access -> disable webConfigurator anti-lockout rule), ensuring that a rule to allow communication from workstationto the router's web interface is in place.

Can we instead modify the anti-lockout rule to only allow routing from the admin workstation?

@b-meson b-meson force-pushed the docs-sg3100-firewall branch from c8fef87 to da24532 Compare July 5, 2018 21:46
@b-meson
Copy link
Contributor Author

b-meson commented Jul 5, 2018

I pushed an update and rebased on top of develop. We are still missing the revisions to the "anti lockout rule" issue that @emkll raised. I am also waiting to hear back on my question:

I noticed at the very bottom of the "Disable DHCP Server on Firewall" screenshot, there is an Admin Gateway IP which we could probably crop out since it may be confusing.

@emkll
Copy link
Contributor

emkll commented Jul 6, 2018

I noticed at the very bottom of the "Disable DHCP Server on Firewall" screenshot, there is an Admin Gateway IP which we could probably crop out since it may be confusing.

Good catch ! Since it's fairly straightforward to crop out, I suggest we do so.

Can we instead modify the anti-lockout rule to only allow routing from the admin workstation?

The anti-lockout rule automatically created by pfsense and cannot be modified. I suggest we caution the admin that the rules will need to be applied with care and in order as to not get locked out from the admin UI (as it would require a console reset to regain access to the interface).

@b-meson
Copy link
Contributor Author

b-meson commented Jul 6, 2018

I added another commit 2f988cf and rebased it on top of develop. @emkll ready for another round of reviews.


|3 NIC LAN Interface|

Disable Anti-Lockout Rule
Copy link
Contributor

@emkll emkll Jul 9, 2018

Choose a reason for hiding this comment

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

nit: At line 668, we refer to the (old) anti-lockout rule. Can we either move this anti-lockout related section down there or move the warning here to avoid confusion?`

EDIT: I take this comment back. While it does help streamline the guide, upon re-review, I think it's important to state these warning at both stages of the configuration.

Copy link
Contributor

@emkll emkll left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the review items @b-meson. With those additions, the docs are good to merge from my perspective. Thanks for your attention to detail on these.

One last note, is that it might be a good idea to move the newly created anti-lockout rules to the top in order to minimize the chances of adding a rule that will negate them, but I don't think it should block merge.

@emkll emkll merged commit ebf3d30 into freedomofpress:develop Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants