Forrest logo
back to context overview

iptables

List of commands for iptables:

  • iptables:ai:5090c How to limit traffic to zoom
    $ iptables -A OUTPUT -p udp --dport 3478:3479 -j DROP
    try on your machine
    explain this command
  • iptables:tldr:4adb5 iptables: Save iptables configuration of a given table to a file.
    $ sudo iptables-save -t ${tablename} > ${path-to-iptables_file}
    try on your machine
    explain this command
  • iptables:tldr:5588b iptables: Restore iptables configuration from a file.
    $ sudo iptables-restore < ${path-to-iptables_file}
    try on your machine
    explain this command
  • iptables:tldr:b1732 iptables: Append rule to chain policy for IP.
    $ sudo iptables -A ${chain} -s ${ip} -j ${rule}
    try on your machine
    explain this command
  • iptables:tldr:d00ca iptables: Append rule to chain policy for IP considering protocol and port.
    $ sudo iptables -A ${chain} -s ${ip} -p ${protocol} --dport ${port} -j ${rule}
    try on your machine
    explain this command
  • iptables:tldr:d9875 iptables: Add a NAT rule to translate all traffic from the `192.168.0.0/24` subnet to the host's public IP.
    $ sudo iptables -t ${nat} -A ${POSTROUTING} -s ${192-168-0-0-24} -j ${MASQUERADE}
    try on your machine
    explain this command
  • iptables:tldr:e74eb iptables: Delete chain rule.
    $ sudo iptables -D ${chain} ${rule_line_number}
    try on your machine
    explain this command
  • iptables:tldr:f71f6 iptables: Set chain policy rule.
    $ sudo iptables -P ${chain} ${rule}
    try on your machine
    explain this command
back to context overview