{"id":29,"date":"2025-03-11T22:09:08","date_gmt":"2025-03-11T19:09:08","guid":{"rendered":"https:\/\/iriri.ru\/?p=29"},"modified":"2025-03-11T22:12:27","modified_gmt":"2025-03-11T19:12:27","slug":"iptables","status":"publish","type":"post","link":"https:\/\/iriri.ru\/?p=29","title":{"rendered":"IPTABLES"},"content":{"rendered":"\n<p>iptables -h<\/p>\n\n\n\n<p>Usage: iptables -[ACD] chain rule-specification [options]<br>iptables -I chain [rulenum] rule-specification [options]<br>iptables -R chain rulenum rule-specification [options]<br>iptables -D chain rulenum [options]<br>iptables -[LS] [chain [rulenum]] [options]<br>iptables -[FZ] [chain] [options]<br>iptables -[NX] chain<br>iptables -E old-chain-name new-chain-name<br>iptables -P chain target [options]<br>iptables -h (print this help information)<\/p>\n\n\n\n<p>Commands:<br>Either long or short options are allowed.<br>&#8212;append -A chain Append to chain<br>&#8212;check -C chain Check for the existence of a rule<br>&#8212;delete -D chain Delete matching rule from chain<br>&#8212;delete -D chain rulenum<br>Delete rule rulenum (1 = first) from chain<br>&#8212;insert -I chain [rulenum]<br>Insert in chain as rulenum (default 1=first)<br>&#8212;replace -R chain rulenum<br>Replace rule rulenum (1 = first) in chain<br>&#8212;list -L [chain [rulenum]]<br>List the rules in a chain or all chains<br>&#8212;list-rules -S [chain [rulenum]]<br>Print the rules in a chain or all chains<br>&#8212;flush -F [chain] Delete all rules in chain or all chains<br>&#8212;zero -Z [chain [rulenum]]<br>Zero counters in chain or all chains<br>&#8212;new -N chain Create a new user-defined chain<br>&#8212;delete-chain<br>-X [chain] Delete a user-defined chain<br>&#8212;policy -P chain target<br>Change policy on chain to target<br>&#8212;rename-chain<br>-E old-chain new-chain<br>Change chain name, (moving any references)<br>Options:<br>&#8212;ipv4 -4 Nothing (line is ignored by ip6tables-restore)<br>&#8212;ipv6 -6 Error (line is ignored by iptables-restore)<br>[!] &#8212;proto -p proto protocol: by number or name, eg. <code>tcp' [!] --source -s address[\/mask][...] source specification [!] --destination -d address[\/mask][...] destination specification [!] --in-interface -i input name[+] network interface name ([+] for wildcard) --jump -j target target for rule (may load target extension) --goto -g chain jump to chain with no return --match -m match extended match (may load extension) --numeric -n numeric output of addresses and ports [!] --out-interface -o output name[+] network interface name ([+] for wildcard) --table -t table table to manipulate (default:<\/code>filter&#8217;)<br>&#8212;verbose -v verbose mode<br>&#8212;wait -w [seconds] maximum wait to acquire xtables lock before give up<br>&#8212;wait-interval -W [usecs] wait time to try to acquire xtables lock<br>default is 1 second<br>&#8212;line-numbers print line numbers when listing<br>&#8212;exact -x expand numbers (display exact values)<br>[!] &#8212;fragment -f match second or further fragments only<br>&#8212;modprobe= try to insert modules using this command<br>&#8212;set-counters PKTS BYTES set the counter during insert\/append<br>[!] <\/p>\n\n\n\n<details class=\"wp-block-details is-layout-flow wp-block-details-is-layout-flow\"><summary>&#8212;version -V print package version.<\/summary>\n<p>&#8212;version -V print package version. \u0412\u044b\u0432\u043e\u0434 \u0432\u0435\u0440\u0441\u0438\u0438 \u041f\u041e.<\/p>\n\n\n\n<p><\/p>\n<\/details>\n","protected":false},"excerpt":{"rendered":"<p>iptables -h Usage: iptables -[ACD] chain rule-specification [options]iptables -I chain [rulenum] rule-specification [options]iptables -R chain rulenum rule-specification [options]iptables -D chain rulenum [options]iptables -[LS] [chain [rulenum]] [options]iptables -[FZ] [chain] [options]iptables -[NX] chainiptables -E old-chain-name new-chain-nameiptables -P chain target [options]iptables -h (print this help information) Commands:Either long or short options are allowed.&#8212;append -A chain Append to chain&#8212;check [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-29","post","type-post","status-publish","format-standard","hentry","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/iriri.ru\/index.php?rest_route=\/wp\/v2\/posts\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iriri.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iriri.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iriri.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iriri.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=29"}],"version-history":[{"count":3,"href":"https:\/\/iriri.ru\/index.php?rest_route=\/wp\/v2\/posts\/29\/revisions"}],"predecessor-version":[{"id":32,"href":"https:\/\/iriri.ru\/index.php?rest_route=\/wp\/v2\/posts\/29\/revisions\/32"}],"wp:attachment":[{"href":"https:\/\/iriri.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iriri.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iriri.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}