nftables: add accept rule

Accept inbound TCP traffic on port 8080 in nftables

nft add rule inet filter input tcp dport 8080 accept

tool
iptables10 commands
tags
iptableslinuxnetworksecurity

More iptables commands

  • nft flush ruleset

    Delete all nftables rules (caution: drops all firewall rules)

  • iptables -L INPUT --line-numbers -n -v

    Show INPUT chain rules with packet/byte counters

  • iptables -A INPUT -p tcp --dport 443 -j ACCEPT

    Append a rule to accept inbound HTTPS traffic

  • iptables -I INPUT 1 -s 203.0.113.5 -j DROP

    Insert DROP rule at position 1 for a specific source IP

  • iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

    Enable IP masquerading for outbound traffic (router/NAT)

all 10 iptables commands