ufw-rule-parser 0.1.0

parser for a ufw-like firewall rule, including internal/external address keywords.
Documentation
# service rules
allow ssh
allow http
deny ftp
limit smtp

# address rules with all fields
allow in on eth0 from internal to external port 443 proto tcp
deny out on wlan0 from any to 192.168.1.100 port 22 proto tcp
reject in from 10.0.0.0/24 to external port 80 proto any

# minimal address rules
allow in from internal to any port 8080 proto udp
deny out to 8.8.8.8 port 53 proto udp

# rules without direction
allow from any to 10.0.0.1 port 3306 proto tcp
limit to 172.16.0.0/16 port 5432 proto tcp