Enter a command. For example: spi, dumpe2fs, chrt, ntpq, create_ap.


Program that allows configuration of tables, chains and rules provided by the Linux kernel firewall. More information:
  • View chains, rules, and packet/byte counters for the filter table:
    sudo iptables -vnL
  • Set chain policy rule:
    sudo iptables -P {{chain}} {{rule}}
  • Append rule to chain policy for IP:
    sudo iptables -A {{chain}} -s {{ip}} -j {{rule}}
  • Append rule to chain policy for IP considering protocol and port:
    sudo iptables -A {{chain}} -s {{ip}} -p {{protocol}} --dport {{port}} -j {{rule}}
  • Add a NAT rule to translate all traffic from the subnet to the host's public IP:
    sudo iptables -t {{nat}} -A {{POSTROUTING}} -s {{}} -j {{MASQUERADE}}
  • Delete chain rule:
    sudo iptables -D {{chain}} {{rule_line_number}}
  • Save iptables configuration of a given table to a file:
    sudo iptables-save -t {{tablename}} > {{path/to/iptables_file}}
  • Restore iptables configuration from a file:
    sudo iptables-restore < {{path/to/iptables_file}}

This is a tldr pages (source, CC BY 4.0) web wrapper for All commands, popular commands, most used linux commands. Referrals. Progressive Web Application (PWA) version to install on your device.