Skip to content

Commit

Permalink
add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
FlatKey committed Jun 29, 2020
1 parent 47797ad commit a0a9123
Showing 1 changed file with 46 additions and 16 deletions.
62 changes: 46 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,28 @@ The following variable is used to define the default zone of firewalld:

---

The following variables are used to define which interfaces assigned to zones:

```
firewalld_zone_interfaces:
- name: (required, e.g. public)
interfaces: (required, list of interfaces, one or multiple possible)
```

Example:
```
firewalld_zone_interfaces:
- name: trusted
interfaces:
- eth1
- eth2
- name: public
interfaces:
- eth0
```

---

The following variables are used to define the source of a zone:

```
Expand All @@ -48,13 +70,36 @@ The following variables are used to define a service rule:

```
firewalld_service_rules:
service:
name:
service: (optional, default: use name if service is not defined)
state: (optional, only values: enabled|disabled, default: enabled)
zone: (optional, default: public)
permanent: (optional, only values: true|false, default: true)
immediate: (optional, only values: true|false, default: true)
```

Examples:
```
firewalld_service_rules:
ssh:
state: enabled
zone: public
permanent: true
immediate: true
```
or
```
firewalld_service_rules:
ssh_trusted:
service: ssh
state: enabled
zone: trusted
ssh_public:
service: ssh
state: enabled
zone: public
```

---

The following variables are used to purge undefined active service rules:
Expand All @@ -80,21 +125,6 @@ The following variables are used to define a port rule:

---

The following variables are used to define which interfaces assigned to zones:

```
firewalld_zone_interfaces:
- name: trusted
interfaces:
- eth1
- eth2
- name: public
interfaces:
- eth0
```

---

The following variables are used to define a rich rule:

```
Expand Down

0 comments on commit a0a9123

Please sign in to comment.