Iptables Command Switch

Each line of an iptables script not only has a jump, but they also have a number of command line options that are used to append rules to chains that match your defined packet characteristics, such the source IP address and TCP port.

-t ‘table.
If you don’t specify a table, then the filter table is assumed. The possible built-in tables include: filter, nat, mangle

-j ‘target’
Jump to the specified target chain when the packet matches the current rule.

-A
Append rule to end of a chain

-F
Flush. Deletes all the rules in the selected table

-p ‘protocol-type’
Match protocol. Types include, icmp, tcp, udp, and all

-s ‘ip-address’
Match source IP address

-d ‘ip-address’
Match destination IP address

-i ‘interface-name’
Match “input” interface on which the packet enters.

-o ‘interface-name’
Match “output” interface on which the packet exits

One Response to “Iptables Command Switch”

  1. 3dogmatismon 12 Jan 2022 at 10:33 pm

    2non-existent…

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.