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

Proposed by Felipe Reyes
Status: Superseded
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) Needs Fixing
Review via email: mp+243690@code.staging.launchpad.net

This proposal has been superseded by 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 :

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
263. By Felipe Reyes

Add IPv6 test

264. By Felipe Reyes

Check if uwf is enabled before enabling it, if it's disabled before disable it.

Revision history for this message
Felipe Reyes (freyes) :

Unmerged revisions

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