Setup firewall on Alpine with nftables

# Install nftables
doas apk add nftables
# List tables (default table is `inet filter`)
doas nft list tables
# Add to the default inet filter (allow ssh server port 22)
doas vi /etc/nftables.d/ssh.nft
cat /etc/nftables.d/ssh.nft
table inet filter {


This content originally appeared on DEV Community and was authored by mutterings in the dark

# Install nftables
doas apk add nftables
# List tables (default table is `inet filter`)
doas nft list tables
# Add to the default inet filter (allow ssh server port 22)
doas vi /etc/nftables.d/ssh.nft
cat /etc/nftables.d/ssh.nft 
table inet filter {
        chain input {
                tcp dport 22 accept
        }
}
# Load nftables config
doas rc-service nftables restart
# List rules
doas nft -a list table inet filter
# Load rules at boot
doas rc-update add nftables boot


This content originally appeared on DEV Community and was authored by mutterings in the dark


Print Share Comment Cite Upload Translate Updates
APA

mutterings in the dark | Sciencx (2024-09-20T20:51:36+00:00) Setup firewall on Alpine with nftables. Retrieved from https://www.scien.cx/2024/09/20/setup-firewall-on-alpine-with-nftables/

MLA
" » Setup firewall on Alpine with nftables." mutterings in the dark | Sciencx - Friday September 20, 2024, https://www.scien.cx/2024/09/20/setup-firewall-on-alpine-with-nftables/
HARVARD
mutterings in the dark | Sciencx Friday September 20, 2024 » Setup firewall on Alpine with nftables., viewed ,<https://www.scien.cx/2024/09/20/setup-firewall-on-alpine-with-nftables/>
VANCOUVER
mutterings in the dark | Sciencx - » Setup firewall on Alpine with nftables. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/09/20/setup-firewall-on-alpine-with-nftables/
CHICAGO
" » Setup firewall on Alpine with nftables." mutterings in the dark | Sciencx - Accessed . https://www.scien.cx/2024/09/20/setup-firewall-on-alpine-with-nftables/
IEEE
" » Setup firewall on Alpine with nftables." mutterings in the dark | Sciencx [Online]. Available: https://www.scien.cx/2024/09/20/setup-firewall-on-alpine-with-nftables/. [Accessed: ]
rf:citation
» Setup firewall on Alpine with nftables | mutterings in the dark | Sciencx | https://www.scien.cx/2024/09/20/setup-firewall-on-alpine-with-nftables/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.