ufw-incoming-allowed

Example:

# Allow access to udp port 514 from host 1.2.3.4 and include a comment
- ufw-incoming-allowed:
    protocol: udp
    from_ip: 1.2.3.4
    to_port: 514
    comment: allow syslog

Description

Configure ufw to allow incoming traffic that fits certain criteria.

This frecklet will also install 'ufw' if it is not already present, but it won't enable it if it is not already. Make sure you have a rule to let you back in if you do that!

Resources

Variables

Name Type Default Description

comment

string --

A comment to the rule.

from_ip

string any

The source of the traffic to allow.

from_port

integer --

The source port of the traffic to allow.

interface

string --

The name of the interface.

protocol

string any

The protocol.

to_ip

string any

Destination IP address.

to_port

integer --

The destination port of the traffic to allow.

Examples

Example 1

Allow access to udp port 514 from host 1.2.3.4 and include a comment

Code
- ufw-incoming-allowed:
    protocol: udp
    from_ip: 1.2.3.4
    to_port: 514
    comment: allow syslog

Command-line

frecklecute ufw-incoming-allowed --help

Usage: frecklecute ufw-incoming-allowed [OPTIONS]

  Configure ufw to allow incoming traffic that fits certain criteria.

  This frecklet will also install 'ufw' if it is not already present, but it
  won't enable it if it is not already. Make sure you have a rule to let you
  back in if you do that!

Options:
  --comment COMMENT      A comment to the rule.
  --from-ip FROM_IP      The source of the traffic to allow.
  --from-port FROM_PORT  The source port of the traffic to allow.
  --interface INTERFACE  The name of the interface.
  --protocol PROTOCOL    The protocol.
  --to-ip TO_IP          Destination IP address.
  --to-port TO_PORT      The destination port of the traffic to allow.
  --help                 Show this message and exit.