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

Ensure /etc/iptables exists before writing to it #7417

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

legoktm
Copy link
Member

@legoktm legoktm commented Jan 17, 2025

Status

Ready for review

Description of Changes

In the specific case of installing a fresh mon server when the app server is already configured AND you're using ssh over the local network, we'll try to write to /etc/iptables before the iptables-persistent package is installed.

This is because we end up running the restrict-direct-access role before the common role, which installs the base packages.

The easy fix is to install iptables-persistent ahead of time if we see that it's necessary.

Fixes #7119.

Testing

How should the reviewer test this PR?

  • setup a 2.11.1 prod install that uses ssh over localhost
  • on the admin workstation, cherry-pick this patch
  • reinstall ubuntu fresh on just the mon server, and then run ./securedrop-admin install (i.e. with the cherry-pick)
  • the install should complete successfully with no errors about /etc/iptables being missing.

Deployment

Any special considerations for deployment? n/a, bug only affects fresh installs

Checklist

@legoktm legoktm requested a review from a team as a code owner January 17, 2025 21:19
@legoktm
Copy link
Member Author

legoktm commented Jan 17, 2025

(This is submitted untested)

In the specific case of installing a fresh mon server when the app
server is already configured AND you're using ssh over the local
network, we'll try to write to /etc/iptables before the
iptables-persistent package is installed.

This is because we end up running the restrict-direct-access role before
the common role, which installs the base packages.

The easy fix is to install iptables-persistent ahead of time if we see
that it's necessary.

Fixes #7119.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready For Review
Development

Successfully merging this pull request may close these issues.

Reinstalling mon with existing app server triggers missing iptables-persistent dependency
1 participant