nft
Verified for current stable LTS
Nft Command: Add Rule Accept Tcp Ports
Use for add rule accept tcp ports with Nft. Exact CLI syntax to add rule accept tcp ports using Nft.
When to use this: Use for add rule accept tcp ports with Nft.
Command Syntax
sudo nft add rule <inet> <filter> <input> <tcp> {{dport \{ telnet, ssh, http, https \} accept}} sudo nft add rule <inet> <filter> <input> <tcp> {{dport /`{ telnet, ssh, http, https /`} accept}} Live Command Builder
Final Command
sudo nft add rule <inet> <filter> <input> <tcp> {{dport \{ telnet, ssh, http, https \} accept}} Command Breakdown
sudo is the base executable for this command.
FAQ
Purpose: Exact syntax to add rule accept tcp ports using Nft.
Test path: Replace placeholders and run destructive commands in a disposable workspace first.
Flag behavior: Tool version, platform, and shell can change behavior.
Improve This Command
Suggest a correction, safer default, or version-specific note for this entry.
Related Operations
Nft Command: Add Chain Accept Inbound Traffic
sudo nft add chain <inet> <filter> <input> \{ type <filter> hook <input> priority <0> \; policy <accept> \; \} Nft Command: Add Nat Rule Translate Subnet sudo nft add rule <nat> <postrouting> ip saddr <192.168.0.0/24> <masquerade> Nft Command: Add New Table Inet Filter sudo nft add table <inet> <filter> Nft Command: Delete Nft Rule sudo nft delete rule <inet> <filter> <input> handle <3> Nft Command: Save Current Nft Configuration sudo nft list ruleset > </etc/nftables.conf>