= Awall = '''`awall`''' ('''A'''lpine '''Wall''') is the preferred firewall manager for [[Linux/Alpine|Alpine Linux]]. <> ---- == Installation == [[Linux/Alpine|Alpine]] offers the `awall` package. ---- == Setup == `awall` depends on the iptables API, so the corresponding kernel modules must be loaded. {{{ modprobe ip_tables modprobe iptable_nat }}} The latter is only necessary if NAT rules are used. To launch the firewall on startup, try: {{{ rc-update add iptables rc-update add ip6tables }}} ---- == Configuration == `awall` loads any files under `/etc/awall/optional/` that end in `.json` as '''policies'''. A simple policy would be: {{{ { "description": "Home firewall", "zone": { "inet": { "iface": "eth0" }, "loc": { "iface": "eth1" } }, "policy": [ { "in": "_fw", "action": "accept" }, { "in": "loc", "out": "inet", "action": "accept" } ], "snat": [ { "out": "inet" } ] } }}} To enable this policy, try: {{{ awall list awall enable my-policy-name awall activate }}} ---- == See also == [[https://wiki.alpinelinux.org/wiki/How-To_Alpine_Wall|How-to Alpine Wall]] ---- CategoryRicottone