项目作者: trombik

项目描述 :
Configure pf
高级语言: Ruby
项目地址: git://github.com/trombik/ansible-role-pf.git
创建时间: 2017-12-01T04:47:53Z
项目社区:https://github.com/trombik/ansible-role-pf

开源协议:ISC License

下载


ansible-role-pf

Configure pf firewall

Requirements

None

Role Variables

Variable Description Default
pf_conf path to pf.conf(5) /etc/pf.conf
pf_conf_dir directory where additional pf.conf(5) fragments can be placed. the role does not do anything with it but create the directory. /etc/pf.conf.d
pf_rule see below

pf_rule

By default, the following pf(4) rules are created.

  • skip on lo
  • block everything by default
  • pass all icmp and ssh to the host
  • pass all from the host to any

The default value of pf_rule is:

  1. set skip on { lo }
  2. block log all
  3. pass in proto icmp from any to any
  4. pass in proto tcp from any to any port 22
  5. pass out on egress from (egress) to any

Dependencies

None

Example Playbook

  1. - hosts: localhost
  2. roles:
  3. - ansible-role-pf
  4. vars:
  5. pf_rule: |
  6. set skip on lo
  7. block return # block stateless traffic
  8. pass # establish keep-state
  9. # By default, do not permit remote connections to X11
  10. block return in on ! lo0 proto tcp to port 6000:6010

License

  1. Copyright (c) 2016 Tomoyuki Sakurai <tomoyukis@reallyenglish.com>
  2. Permission to use, copy, modify, and distribute this software for any
  3. purpose with or without fee is hereby granted, provided that the above
  4. copyright notice and this permission notice appear in all copies.
  5. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  6. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  7. MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  8. ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  9. WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  10. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  11. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Author Information

Tomoyuki Sakurai tomoyukis@reallyenglish.com

This README was created by ansible-role-init