{"id":780,"date":"2009-11-27T07:11:45","date_gmt":"2009-11-27T12:11:45","guid":{"rendered":"http:\/\/g33kinfo.com\/info\/?p=780"},"modified":"2009-11-27T07:11:45","modified_gmt":"2009-11-27T12:11:45","slug":"etcsysconfigiptables-config-in-rhelcentos","status":"publish","type":"post","link":"https:\/\/g33kinfo.com\/info\/etcsysconfigiptables-config-in-rhelcentos\/","title":{"rendered":"\/etc\/sysconfig\/iptables-config in RHEL\/CentOS"},"content":{"rendered":"<p>Most of you know that you need to save your iptables changes using service iptables save before rebooting on Redhat, or else you\u2019lllose all your rules.   I brought up the setting IPTABLES_SAVE_ON_STOP to \u201cyes\u201d in \/etc\/sysconfig\/iptables-config. There\u2019s some pretty cool settings in there .  Read on for details.<\/p>\n<p>The file \/etc\/sysconfig\/iptables-config provides a place to configure the behavior of the iptables initscript in \/etc\/init.d\/iptables.  The file is documented very well, so give it a quick read.  Here\u2019s some of the more interesting settings:<\/p>\n<p>    * IPTABLES_SAVE_ON_STOP \u2013 this defaults to \u201cno\u201d.  When set to \u201cyes\u201d, every time the initscript is called with the argument of \u201cstop\u201d (whether via command line or via system shutdown), the initscript will take the current iptables ruleset and dump it into \/etc\/sysconfig\/iptables.  Essentially, this is doing a service iptables save behind the scenes when you do a service iptables stop.  This is great for sysadmins who get distracted often and forget to commit their iptables commands to persistent storage often.<br \/>\n    * IPTABLES_SAVE_ON_RESTART \u2013 defaults to \u201cno\u201d.  When set to \u201cyes\u201d, it does the exact same thing as IPTABLES_SAVE_ON_START except this does a save operation when the initscript is called with the \u201crestart\u201d option.<br \/>\n    * IPTABLES_SAVE_COUNTER \u2013 defaults to \u201cno\u201d.  Everytime service iptables save is called (including in the two cases above), the rule and chain counters are saved to the file, and restored on startup.  This prevents your counters from being reset every time you restart the service.<br \/>\n    * IPTABLES_STATUS_NUMERIC \u2013 defaults to \u201cyes\u201d.  When you do a service iptables status, this will print IP\u2019s instead of hostnames when set to \u201cyes\u201d.  When set to \u201cno\u201d, it will do reverse DNS lookups on all the IP\u2019s and \/etc\/services lookups on all ports.<br \/>\n    * IPTABLES_STATUS_VERBOSE \u2013 prints packet and byte counters in the output of service iptables status.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Most of you know that you need to save your iptables changes using service iptables save before rebooting on Redhat, or else you\u2019lllose all your rules. I brought up the setting IPTABLES_SAVE_ON_STOP to \u201cyes\u201d in \/etc\/sysconfig\/iptables-config. There\u2019s some pretty cool settings in there . Read on for details. The file \/etc\/sysconfig\/iptables-config provides a place to&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/g33kinfo.com\/info\/etcsysconfigiptables-config-in-rhelcentos\/\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-780","post","type-post","status-publish","format-standard","hentry","category-info"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\/etc\/sysconfig\/iptables-config in RHEL\/CentOS - Linux Shtuff<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/g33kinfo.com\/info\/etcsysconfigiptables-config-in-rhelcentos\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\/etc\/sysconfig\/iptables-config in RHEL\/CentOS - Linux Shtuff\" \/>\n<meta property=\"og:description\" content=\"Most of you know that you need to save your iptables changes using service iptables save before rebooting on Redhat, or else you\u2019lllose all your rules. I brought up the setting IPTABLES_SAVE_ON_STOP to \u201cyes\u201d in \/etc\/sysconfig\/iptables-config. There\u2019s some pretty cool settings in there . Read on for details. The file \/etc\/sysconfig\/iptables-config provides a place to... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/g33kinfo.com\/info\/etcsysconfigiptables-config-in-rhelcentos\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux Shtuff\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:author\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:published_time\" content=\"2009-11-27T12:11:45+00:00\" \/>\n<meta name=\"author\" content=\"g33kadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/drsinger1111\" \/>\n<meta name=\"twitter:site\" content=\"@drsinger1111\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/etcsysconfigiptables-config-in-rhelcentos\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/etcsysconfigiptables-config-in-rhelcentos\\\/\"},\"author\":{\"name\":\"g33kadmin\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"headline\":\"\\\/etc\\\/sysconfig\\\/iptables-config in RHEL\\\/CentOS\",\"datePublished\":\"2009-11-27T12:11:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/etcsysconfigiptables-config-in-rhelcentos\\\/\"},\"wordCount\":329,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"articleSection\":[\"General Info\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/etcsysconfigiptables-config-in-rhelcentos\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/etcsysconfigiptables-config-in-rhelcentos\\\/\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/etcsysconfigiptables-config-in-rhelcentos\\\/\",\"name\":\"\\\/etc\\\/sysconfig\\\/iptables-config in RHEL\\\/CentOS - Linux Shtuff\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\"},\"datePublished\":\"2009-11-27T12:11:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/etcsysconfigiptables-config-in-rhelcentos\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/etcsysconfigiptables-config-in-rhelcentos\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/etcsysconfigiptables-config-in-rhelcentos\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\\\/etc\\\/sysconfig\\\/iptables-config in RHEL\\\/CentOS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\",\"name\":\"Linux Shtuff\",\"description\":\"Because I have CRS Syndrome...\",\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\",\"name\":\"g33kadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"contentUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"width\":512,\"height\":512,\"caption\":\"g33kadmin\"},\"logo\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\"},\"description\":\"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\\\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....\",\"sameAs\":[\"https:\\\/\\\/thelinuxreport.com\",\"https:\\\/\\\/fb.me\\\/g33kinf0\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/drsinger1111\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\/etc\/sysconfig\/iptables-config in RHEL\/CentOS - Linux Shtuff","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/g33kinfo.com\/info\/etcsysconfigiptables-config-in-rhelcentos\/","og_locale":"en_US","og_type":"article","og_title":"\/etc\/sysconfig\/iptables-config in RHEL\/CentOS - Linux Shtuff","og_description":"Most of you know that you need to save your iptables changes using service iptables save before rebooting on Redhat, or else you\u2019lllose all your rules. I brought up the setting IPTABLES_SAVE_ON_STOP to \u201cyes\u201d in \/etc\/sysconfig\/iptables-config. There\u2019s some pretty cool settings in there . Read on for details. The file \/etc\/sysconfig\/iptables-config provides a place to... Read More","og_url":"https:\/\/g33kinfo.com\/info\/etcsysconfigiptables-config-in-rhelcentos\/","og_site_name":"Linux Shtuff","article_publisher":"https:\/\/fb.me\/g33kinf0","article_author":"https:\/\/fb.me\/g33kinf0","article_published_time":"2009-11-27T12:11:45+00:00","author":"g33kadmin","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/drsinger1111","twitter_site":"@drsinger1111","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/g33kinfo.com\/info\/etcsysconfigiptables-config-in-rhelcentos\/#article","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/etcsysconfigiptables-config-in-rhelcentos\/"},"author":{"name":"g33kadmin","@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"headline":"\/etc\/sysconfig\/iptables-config in RHEL\/CentOS","datePublished":"2009-11-27T12:11:45+00:00","mainEntityOfPage":{"@id":"https:\/\/g33kinfo.com\/info\/etcsysconfigiptables-config-in-rhelcentos\/"},"wordCount":329,"commentCount":0,"publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"articleSection":["General Info"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/g33kinfo.com\/info\/etcsysconfigiptables-config-in-rhelcentos\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/g33kinfo.com\/info\/etcsysconfigiptables-config-in-rhelcentos\/","url":"https:\/\/g33kinfo.com\/info\/etcsysconfigiptables-config-in-rhelcentos\/","name":"\/etc\/sysconfig\/iptables-config in RHEL\/CentOS - Linux Shtuff","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/#website"},"datePublished":"2009-11-27T12:11:45+00:00","breadcrumb":{"@id":"https:\/\/g33kinfo.com\/info\/etcsysconfigiptables-config-in-rhelcentos\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/g33kinfo.com\/info\/etcsysconfigiptables-config-in-rhelcentos\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/g33kinfo.com\/info\/etcsysconfigiptables-config-in-rhelcentos\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/g33kinfo.com\/info\/"},{"@type":"ListItem","position":2,"name":"\/etc\/sysconfig\/iptables-config in RHEL\/CentOS"}]},{"@type":"WebSite","@id":"https:\/\/g33kinfo.com\/info\/#website","url":"https:\/\/g33kinfo.com\/info\/","name":"Linux Shtuff","description":"Because I have CRS Syndrome...","publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/g33kinfo.com\/info\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547","name":"g33kadmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","url":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","contentUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","width":512,"height":512,"caption":"g33kadmin"},"logo":{"@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif"},"description":"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....","sameAs":["https:\/\/thelinuxreport.com","https:\/\/fb.me\/g33kinf0","https:\/\/x.com\/https:\/\/twitter.com\/drsinger1111"]}]}},"_links":{"self":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/780","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/comments?post=780"}],"version-history":[{"count":0,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/780\/revisions"}],"wp:attachment":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/media?parent=780"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/categories?post=780"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/tags?post=780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}