![]() Tables are made up of built-in chains and may also contain user-defined chains. The rule will only be applied to the second and subsequent fragments of fragmented packets.Įnables the admin to initialize the packet and byte counters of a rule. Name of the interface by which a packet is being sent. Names the interface from where packets are received. Specifies that the processing will continue in a user-specified chain. It specifies the target of the rule and what action will be performed if the packet is a match.Ĭan be an address, network name, hostname, etc. Finally, the -j parameter stands for jump.The -s parameter, along with the IP address (198.51.100.0), indicates the source.To indicate a specific placement in the chain, you may also use a number with the -I option. Using a rule with the insertion option will add it to the beginning of a chain and will be applied first. Basic iptables Parameters and Syntaxīefore we begin creating rules, let’s review the syntax of an iptables rule.įor example, the following command adds a rule to the beginning of the chain that will drop all packets from the address 198.51.100.0: iptables -I INPUT -s 198.51.100.0 -j DROP The table contains a variety of built-in chains, but you can add your own. You can define different tables to handle these rules through chains, lists of rules that match a subset of packets. As stated above, iptables sets the rules that control network traffic. Many options can be used with the iptables command. Use Linux iptables to Manage IPv4 Traffic The iptables Command In order to use iptables, you will need root ( sudo) privileges. By default, the iptables tool is included with your Linode-supplied distribution.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |