Merge lp://staging/~freyes/charm-helpers/ufw into lp://staging/charm-helpers

Proposed by Felipe Reyes
Status: Merged
Merged at revision: 263
Proposed branch: lp://staging/~freyes/charm-helpers/ufw
Merge into: lp://staging/charm-helpers
Diff against target: 396 lines (+387/-0)
2 files modified
charmhelpers/contrib/network/ufw.py (+182/-0)
tests/contrib/network/test_ufw.py (+205/-0)
To merge this branch: bzr merge lp://staging/~freyes/charm-helpers/ufw
Reviewer Review Type Date Requested Status
Jorge Niedbalski (community) Approve
Review via email: mp+243714@code.staging.launchpad.net

This proposal supersedes a proposal from 2014-12-04.

Description of the change

Dear Charmers,

Here I'm proposing a module to manage access to services using ufw, this is a helpful module to secure services that don't provide built-in mechanisms to control accesses (for example memcached).

Here are some examples on how the API is used:

- open SSH port for subnet 10.0.3.0/24:

  >>> from charmhelpers.contrib.network import ufw
  >>> ufw.enable()
  >>> ufw.grant_access(src='10.0.3.0/24', dst='any', port='22', proto='tcp')

- open service by name as defined in /etc/services:

  >>> from charmhelpers.contrib.network import ufw
  >>> ufw.enable()
  >>> ufw.service('ssh', 'open')

- close service by port number:

  >>> from charmhelpers.contrib.network import ufw
  >>> ufw.enable()
  >>> ufw.service('4949', 'close') # munin

Thanks,

To post a comment you must log in.
Revision history for this message
Jorge Niedbalski (niedbalski) wrote : Posted in a previous version of this proposal

Felipe,

Thanks again for contributing, please review the inline comments.

Also please add some ipv6 cases to your tests.

Other than that. LGTM.

review: Needs Fixing
Revision history for this message
Felipe Reyes (freyes) : Posted in a previous version of this proposal
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

Thanks Felipe for this contribution.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches