Skip to main content

Python library for generating FireHOL config

Project description

[![Build Status](https://travis-ci.org/uber/pyrehol.svg)](https://travis-ci.org/uber/pyrehol)

**pyrehol** is a python library for generating [FireHOL](http://firehol.org) config files. It's perfect if you want to combine the human-readable, reproductable, and reliable nature of FireHOL with some kind of automated cluster management system (for example, [clusto](http://clusto.org)) without having to write super-complicated Bash.

### Usage
```python
from pyrehol import Pyrehol
from somewhere_else import clusto


my_clusto_object = clusto.get_by_name(socket.gethostname())

p = Pyrehol()
with p.add_interface("public", "eth0") as i:
i.set_protection('strong')
for service in my_clusto_object.attr_values(key='firehol', subkey='allowed-services'):
i.add_server(service, 'accept')

with p.add_interface("private", "eth1") as i:
i.add_server('ssh', 'accept')

with open('/etc/firehol/firehol.conf', 'w') as f:
p.emit(f)
```


### License
This software is Copyright © 2014 Uber Technologies, Inc.

This software is licensed under the Expat (MIT) license. More information can be found in [LICENSE.txt]().


### FAQ

#### When is FireHOL 2.0 support coming?
Real soon now

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyrehol-0.3.tar.gz (6.1 kB view details)

Uploaded Source

File details

Details for the file pyrehol-0.3.tar.gz.

File metadata

  • Download URL: pyrehol-0.3.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyrehol-0.3.tar.gz
Algorithm Hash digest
SHA256 2cc5905f7d7e16c60188f604316bb15245f72784bf8fa16ac094c21a68043331
MD5 3391166a3cd36eae5a9a284a50cba5b7
BLAKE2b-256 c5e82dfcf427c7587ef56df5de90ca6f1528b927297dd59ce6b298fabd2f8402

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page