词条 | Iptables |
释义 |
| name = iptables | logo = | screenshot = | caption = | author = Rusty Russell | developer = Netfilter Core Team | released = 1998 | programming language = C | genre = Packet filtering | license = GPL | website = {{URL|http://www.netfilter.org/}} | latest_release_version = 1.8.2 | latest_release_date = {{release date and age|2018|11|13}}[1] | operating_system = Linux }} iptables is a user-space utility program that allows a system administrator to configure the tables[2] provided by the Linux kernel firewall (implemented as different Netfilter modules) and the chains and rules it stores. Different kernel modules and programs are currently used for different protocols; iptables applies to IPv4, ip6tables to IPv6, arptables to ARP, and ebtables to Ethernet frames. iptables requires elevated privileges to operate and must be executed by user root, otherwise it fails to function. On most Linux systems, iptables is installed as /usr/sbin/iptables and documented in its man pages, which can be opened using The term iptables is also commonly used to inclusively refer to the kernel-level components. x_tables is the name of the kernel module carrying the shared code portion used by all four modules that also provides the API used for extensions; subsequently, Xtables is more or less used to refer to the entire firewall (v4, v6, arp, and eb) architecture. The successor of iptables is nftables, which was merged into the Linux kernel mainline in kernel version 3.13, was released on 19 January 2014.[3] OverviewXtables allows the system administrator to define tables containing chains of rules for the treatment of packets. Each table is associated with a different kind of packet processing. Packets are processed by sequentially traversing the rules in chains. A rule in a chain can cause a goto or jump to another chain, and this can be repeated to whatever level of nesting is desired. (A jump is like a “call”, i.e. the point that was jumped from is remembered.) Every network packet arriving at or leaving from the computer traverses at least one chain. The origin of the packet determines which chain it traverses initially. There are five predefined chains (mapping to the five available Netfilter hooks), though a table may not have all chains. Predefined chains have a policy, for example DROP, which is applied to the packet if it reaches the end of the chain. The system administrator can create as many other chains as desired. These chains have no policy; if a packet reaches the end of the chain it is returned to the chain which called it. A chain may be empty.
A chain does not exist by itself. A chain belongs to a table. There are three tables named: nat, filter, mangle. Unless precised by the option -t an iptables command concerns the filter table by default. For example the command iptables -L -v -n which shows some chains and their rules is equivalent to iptables -t filter -L -v -n. In order to show chains of table nat use the command: iptables -t nat -L -v -n Each rule in a chain contains the specification of which packets it matches. It may also contain a target (used for extensions) or verdict (one of the built-in decisions). As a packet traverses a chain, each rule in turn is examined. If a rule does not match the packet, the packet is passed to the next rule. If a rule does match the packet, the rule takes the action indicated by the target/verdict, which may result in the packet being allowed to continue along the chain or it may not. Matches make up the large part of rulesets, as they contain the conditions packets are tested for. These can happen for about any layer in the OSI model, as with e.g. the The packet continues to traverse the chain until either
Targets also return a verdict like Userspace utilitiesFront-endsThere are numerous third-party software applications for iptables that try to facilitate setting up rules. Front-ends in textual or graphical fashion allow users to click-generate simple rulesets; scripts usually refer to shell scripts (but other scripting languages are possible too) that call iptables or (the faster) Such front-ends, generators and scripts are often limited by their built-in template systems and where the templates offer substitution spots for user-defined rules. Also, the generated rules are generally not optimized for the particular firewalling effect the user wishes, as doing so will likely increase the maintenance cost for the developer. Users who reasonably understand iptables and want their ruleset optimized are advised to construct their own ruleset. Other notable tools
See also{{Portal|Free and open-source software}}
References1. ^{{Cite web | url = https://git.netfilter.org/iptables/tag/?h=v1.8.2 | title = iptables - iptables tree | date = 2018-11-13 | accessdate = 2018-11-17 | website = netfilter.org | first = Florian | last = Westphal}} 2. ^{{cite web|last1=Ayuso|first1=Pablo Neira|title=The netfilter.org "iptables" project|url=https://www.netfilter.org/projects/iptables/index.html|website=netfilter.org|accessdate=11 January 2017|deadurl=yes|archiveurl=https://web.archive.org/web/20170129062919/http://www.netfilter.org/projects/iptables/index.html|archivedate=29 January 2017|df=}} 3. ^{{cite web | title = Linux 3.13, Section 1.2. nftables, the successor of iptables | url = http://kernelnewbies.org/Linux_3.13#head-f628a9c41d7ec091f7a62db6a49b8da50659ec88 | date = 2014-01-19 | accessdate = 2014-01-20 | website = kernelnewbies.org}} Literature
External links{{Sister project links |commons=no |b=Communication Networks/IP Tables |wikt=no |v=no |q=no |s=no}}
5 : Command-line software|Firewall software|Linux security software|Linux kernel features|Linux-only software |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。