1CDIST-TYPE__UFW_RULE(7)              cdist             CDIST-TYPE__UFW_RULE(7)
2
3
4

NAME

6       cdist-type__ufw_rule - A single UFW rule
7

DESCRIPTION

9       Adds or removes a single UFW rule. This type supports adding and delet‐
10       ing rules for port ranges or applications.
11
12       Understanding what is "to" and what is "from" can be confusing. If  the
13       rule  is  ingress (default), then "from" is the remote machine and "to"
14       is the local one. The opposite is true for egress traffic (--out).
15

OPTIONAL PARAMETERS

17       state  Either  "present"  or  "absent".  Defaults  to   "present".   If
18              "absent",  only  removes  rules  that  exactly  match  the  rule
19              expected.
20
21       rule   A firewall rule in UFW syntax. This is what  you  would  usually
22              write  after  ufw  on the command line. Defaults to "allow" fol‐
23              lowed by the object ID. You can  use  either  the  short  syntax
24              (just  allow|deny|reject|limit followed by a port or application
25              name) or the full syntax. Do not include delete in your command.
26              Set --state absent instead.
27

EXAMPLES

29          # open port 80 (ufw allow 80)
30          __ufw_rule 80
31          # Allow mosh application (if installed)
32          __ufw_rule mosh
33          # Allow all traffic from local network (ufw allow from 10.0.0.0/24)
34          __ufw_rule local --rule 'allow from 10.0.0.0/24'
35          # Block egress traffic from port 25 to 111.55.55.55 on interface eth0
36          __ufw_rule block_smtp --rule 'deny out on eth0 from any port 25 to 111.55.55.55'
37

SEE ALSO

39       ufw(8)
40

AUTHORS

42       Mark Polyakov <mark@markasoftware.com>
43

COPYING

45       Copyright (C) 2019 Mark Polyakov. You can redistribute it and/or modify
46       it under the terms of the GNU General Public License  as  published  by
47       the  Free  Software Foundation, either version 3 of the License, or (at
48       your option) any later version.
49
51       ungleich GmbH 2019
52
53
54
55
566.4.0                            Jan 04, 2020          CDIST-TYPE__UFW_RULE(7)
Impressum