17 lines
311 B
Bash
17 lines
311 B
Bash
#!/bin/sh
|
|
echo "Setting up firewall..."
|
|
|
|
apk add nftables
|
|
rc-update add nftables boot
|
|
|
|
cat << EOF > /etc/nftables.nft
|
|
#!/usr/sbin/nft -f
|
|
|
|
# The state of stateful objects saved on the nftables service stop.
|
|
include "/var/lib/nftables/*.nft"
|
|
|
|
# Rules
|
|
include "/etc/nftables.d/*.nft"
|
|
EOF
|
|
|
|
rc-service nftables start |