{"id":288,"date":"2011-09-22T18:39:29","date_gmt":"2011-09-22T23:39:29","guid":{"rendered":"https:\/\/www.bodhost.com\/blog\/?p=288"},"modified":"2026-02-26T13:59:07","modified_gmt":"2026-02-26T13:59:07","slug":"secure-your-dedicated-server-with-iptables","status":"publish","type":"post","link":"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/","title":{"rendered":"Secure your dedicated server with Iptables"},"content":{"rendered":"<p>In this article, we&#8217;ll see how to secure your <a title=\"dedicated server\" href=\"http:\/\/www.bodhost.com\/dedicated-server-hosting.shtml\" target=\"_blank\" rel=\"noopener\">dedicated server<\/a> by configuring three essential programs:<\/p>\n<p>* Iptables: Firewall is the Linux systems, it is difficult to handle the first time but you can make very fine adjustments. In this tutorial I propose a set of standard rules for a web server.<br \/>\n* Fail2ban: it is a system that automatically ban all users who try to connect several times without success on our server. It helps prevent brute force attacks.<br \/>\n* Rkhunter: it is a software that warns of sensitive files that are changed. In other words, a good detector Backdoor and Rootkit.<\/p>\n<p>And as a bonus, I would give you a tips to be prevented by email when someone&#8217;s logs into SSH on your server. At the end of the article you will have a secure Web server already, but not enough for my taste, hence the second article will gives you little more tips about how secure php scripts with Apache 2 modules.<\/p>\n<p>I think this mini tutorial on iptables, with the arguments most commonly used and these basic principles will not hurt. I&#8217;ll do that in a list to make this easier, the goal is not to be exhaustive.<\/p>\n<p><strong>If you do a iptables-L, you will see the rules that define your firewall. Looking at the results more closely, we see three types of chains:<\/strong><\/p>\n<p>* INPUT: corresponds to the rules of the incoming traffic from the server<br \/>\n* OUTPUT: corresponds to the rules for outgoing traffic the server<br \/>\n* FORWARD: the rules to make redirects<\/p>\n<p>We also note that we have the firewall&#8217;s policy on &#8220;acceptable&#8221; for all channels and it is not very good at security. Our approach will be of any block (DROP) and then slowly release the ports for the services we use.<\/p>\n<p><strong>Here is a list of arguments that are used frequently:<\/strong><\/p>\n<p>*-T: specify on which table you are working, it&#8217;s default filter that contains the input, output and forward<br \/>\n*-A: adds a rule at the end of string<br \/>\n*-P: specifies the protocol of the rule (usually TCP, UDP or ICMP for ping)<br \/>\n*-Dport: specifies the destination port<br \/>\n*-D: specifies the policy to apply (or accept drop most of the time)<br \/>\n* F-: clear all rules (F = Flush)<br \/>\n*-X: erase chain<\/p>\n<p><strong>Configuration rules<\/strong><\/p>\n<p>To set up a firewall on Linux, most of the time you create a bash file with all the iptables commands that you want to. In my case, I put iptables to 0, then I block everything, then I slowly unlocked the services I use. Therefore, the order is important! Here is the file used for the video, remember to change the port number for ssh or otherwise you will be blocked (a hardware reboot will do you unlock).<\/p>\n<p>#!\/bin\/sh<br \/>\n### BEGIN INIT INFO<br \/>\n# Provides: Firewall maison<br \/>\n# Required-Start: $local_fs $remote_fs $network $syslog<br \/>\n# Required-Stop: $local_fs $remote_fs $network $syslog<br \/>\n# Default-Start:<br \/>\n# Default-Stop:<br \/>\n# X-Interactive: false<br \/>\n# Short-Description: Firewall maison<br \/>\n### END INIT INFO<\/p>\n<p># Mise \u00e0 0<br \/>\niptables -t filter -F<br \/>\niptables -t filter -X<br \/>\necho &#8220;Mise \u00e0 0&#8221;<\/p>\n<p># On bloque tout<br \/>\niptables -t filter -P INPUT DROP<br \/>\niptables -t filter -P FORWARD DROP<br \/>\niptables -t filter -P OUTPUT DROP<br \/>\necho &#8220;Interdiction&#8221;<\/p>\n<p># Ne pas casser les connexions \u00e9tablies<br \/>\niptables -A INPUT -m state &#8211;state RELATED,ESTABLISHED -j ACCEPT<br \/>\niptables -A OUTPUT -m state &#8211;state RELATED,ESTABLISHED -j ACCEPT<\/p>\n<p># Autorise le loopback (127.0.0.1)<br \/>\niptables -t filter -A INPUT -i lo -j ACCEPT<br \/>\niptables -t filter -A OUTPUT -o lo -j ACCEPT<br \/>\necho &#8220;Loopback&#8221;<\/p>\n<p># ICMP (le ping)<br \/>\niptables -t filter -A INPUT -p icmp -j ACCEPT<br \/>\niptables -t filter -A OUTPUT -p icmp -j ACCEPT<br \/>\necho &#8220;Ping ok&#8221;<\/p>\n<p># SSH IN\/OUT<br \/>\niptables -t filter -A INPUT -p tcp &#8211;dport 1337 -j ACCEPT<br \/>\niptables -t filter -A OUTPUT -p tcp &#8211;dport 1337 -j ACCEPT<br \/>\necho &#8220;SSH ok&#8221;<\/p>\n<p># DNS In\/Out<br \/>\niptables -t filter -A OUTPUT -p tcp &#8211;dport 53 -j ACCEPT<br \/>\niptables -t filter -A OUTPUT -p udp &#8211;dport 53 -j ACCEPT<br \/>\niptables -t filter -A INPUT -p tcp &#8211;dport 53 -j ACCEPT<br \/>\niptables -t filter -A INPUT -p udp &#8211;dport 53 -j ACCEPT<br \/>\necho &#8220;dns ok&#8221;<\/p>\n<p># NTP Out<br \/>\niptables -t filter -A OUTPUT -p udp &#8211;dport 123 -j ACCEPT<br \/>\necho &#8220;ntp ok&#8221;<\/p>\n<p># HTTP + HTTPS Out<br \/>\niptables -t filter -A OUTPUT -p tcp &#8211;dport 80 -j ACCEPT<br \/>\niptables -t filter -A OUTPUT -p tcp &#8211;dport 443 -j ACCEPT<\/p>\n<p># HTTP + HTTPS In<br \/>\niptables -t filter -A INPUT -p tcp &#8211;dport 80 -j ACCEPT<br \/>\niptables -t filter -A INPUT -p tcp &#8211;dport 443 -j ACCEPT<br \/>\niptables -t filter -A INPUT -p tcp &#8211;dport 8443 -j ACCEPT<br \/>\necho &#8220;http ok&#8221;<\/p>\n<p># FTP Out<br \/>\niptables -t filter -A OUTPUT -p tcp &#8211;dport 21 -j ACCEPT<br \/>\niptables -t filter -A OUTPUT -p tcp &#8211;dport 20 -j ACCEPT<\/p>\n<p># FTP In<br \/>\n# imodprobe ip_conntrack_ftp # ligne facultative avec les serveurs OVH<br \/>\niptables -t filter -A INPUT -p tcp &#8211;dport 20 -j ACCEPT<br \/>\niptables -t filter -A INPUT -p tcp &#8211;dport 21 -j ACCEPT<br \/>\niptables -t filter -A INPUT -m state &#8211;state ESTABLISHED,RELATED -j ACCEPT<br \/>\necho &#8220;ftp ok&#8221;<\/p>\n<p># Mail SMTP:25<br \/>\niptables -t filter -A INPUT -p tcp &#8211;dport 25 -j ACCEPT<br \/>\niptables -t filter -A OUTPUT -p tcp &#8211;dport 25 -j ACCEPT<\/p>\n<p># Mail POP3:110<br \/>\niptables -t filter -A INPUT -p tcp &#8211;dport 110 -j ACCEPT<br \/>\niptables -t filter -A OUTPUT -p tcp &#8211;dport 110 -j ACCEPT<\/p>\n<p># Mail IMAP:143<br \/>\niptables -t filter -A INPUT -p tcp &#8211;dport 143 -j ACCEPT<br \/>\niptables -t filter -A OUTPUT -p tcp &#8211;dport 143 -j ACCEPT<\/p>\n<p># Mail POP3S:995<br \/>\niptables -t filter -A INPUT -p tcp &#8211;dport 995 -j ACCEPT<br \/>\niptables -t filter -A OUTPUT -p tcp &#8211;dport 995 -j ACCEPT<br \/>\necho &#8220;mail ok&#8221;<\/p>\n<p># Monit<br \/>\niptables -t filter -A INPUT -p tcp &#8211;dport 4598 -j ACCEPT<\/p>\n<p># Webmin<br \/>\niptables -t filter -A INPUT -p tcp &#8211;dport 10000 -j ACCEPT<br \/>\necho &#8220;monitoring ok&#8221;<\/p>\n<p>The upper part is optional but it avoids warnings in log files. At the level of difficulty, once you understand a line to the rest comes by itself. Remember to give execute permissions to this file (chmod + x firewall) and place it in \/ etc \/ init.d \/ and activate it to start the server with update-rc.d firewall defaults (but make sure that the file is working properly before!)<\/p>\n<p>I take this opportunity to pass to give you my script to the proper iptables back to 0 in case of trouble:<\/p>\n<p>#!\/bin\/sh<br \/>\necho &#8220;Flushing iptables rules&#8230;&#8221;<br \/>\nsleep 1<br \/>\niptables -F<br \/>\niptables -X<br \/>\niptables -t nat -F<br \/>\niptables -t nat -X<br \/>\niptables -t mangle -F<br \/>\niptables -t mangle -X<br \/>\niptables -P INPUT ACCEPT<br \/>\niptables -P FORWARD ACCEPT<br \/>\niptables -P OUTPUT ACCEPT<\/p>\n<p>That&#8217;s all on the side of the Firewall. If one day you install additional services and that it does not work, remember to look to the Firewall, you tend to forget when the configuration is finished.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we&#8217;ll see how to secure your dedicated server by configuring three essential programs: * Iptables: Firewall is the Linux systems, it is difficult to handle the first&hellip;<\/p>\n<p><a href=\"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/\" class=\"more-link\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42],"tags":[14,88],"class_list":["post-288","post","type-post","status-publish","format-standard","hentry","category-dedicated-servers","tag-dedicated-server","tag-iptables"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"Protect your dedicated server using Iptables firewall rules. Learn how to block threats, control traffic, and secure Linux servers with simple steps.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"admin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"bodHOST | Web Hosting - Tips &amp; Tricks\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Dedicated Server Security with Iptables Firewall\" \/>\n\t\t<meta property=\"og:description\" content=\"Protect your dedicated server using Iptables firewall rules. Learn how to block threats, control traffic, and secure Linux servers with simple steps.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.bodhost.com\/blog\/wp-content\/uploads\/2026\/03\/cropped-Profile-Pic.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.bodhost.com\/blog\/wp-content\/uploads\/2026\/03\/cropped-Profile-Pic.png\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2011-09-22T23:39:29+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-02-26T13:59:07+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Dedicated Server Security with Iptables Firewall\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Protect your dedicated server using Iptables firewall rules. Learn how to block threats, control traffic, and secure Linux servers with simple steps.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.bodhost.com\/blog\/wp-content\/uploads\/2026\/03\/cropped-Profile-Pic.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/secure-your-dedicated-server-with-iptables\\\/#article\",\"name\":\"Dedicated Server Security with Iptables Firewall\",\"headline\":\"Secure your dedicated server with Iptables\",\"author\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/cropped-Profile-Pic.png\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/#articleImage\",\"width\":96,\"height\":96,\"caption\":\"bodHOST\"},\"datePublished\":\"2011-09-22T18:39:29+00:00\",\"dateModified\":\"2026-02-26T13:59:07+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/secure-your-dedicated-server-with-iptables\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/secure-your-dedicated-server-with-iptables\\\/#webpage\"},\"articleSection\":\"Dedicated Servers, dedicated server, Iptables\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/secure-your-dedicated-server-with-iptables\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.bodhost.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/category\\\/dedicated-servers\\\/#listItem\",\"name\":\"Dedicated Servers\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/category\\\/dedicated-servers\\\/#listItem\",\"position\":2,\"name\":\"Dedicated Servers\",\"item\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/category\\\/dedicated-servers\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/secure-your-dedicated-server-with-iptables\\\/#listItem\",\"name\":\"Secure your dedicated server with Iptables\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/secure-your-dedicated-server-with-iptables\\\/#listItem\",\"position\":3,\"name\":\"Secure your dedicated server with Iptables\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/category\\\/dedicated-servers\\\/#listItem\",\"name\":\"Dedicated Servers\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/#organization\",\"name\":\"bodHOST\",\"description\":\"Web Hosting - Tips & Tricks\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/cropped-Profile-Pic.png\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/secure-your-dedicated-server-with-iptables\\\/#organizationLogo\",\"width\":96,\"height\":96,\"caption\":\"bodHOST\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/secure-your-dedicated-server-with-iptables\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/author\\\/admin\\\/\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/secure-your-dedicated-server-with-iptables\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/62c629076fffafb51ab8d31ff4b947f645c1a0e72d22f02d42a3cce51c92c9a2?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"admin\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/secure-your-dedicated-server-with-iptables\\\/#webpage\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/secure-your-dedicated-server-with-iptables\\\/\",\"name\":\"Dedicated Server Security with Iptables Firewall\",\"description\":\"Protect your dedicated server using Iptables firewall rules. Learn how to block threats, control traffic, and secure Linux servers with simple steps.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/secure-your-dedicated-server-with-iptables\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2011-09-22T18:39:29+00:00\",\"dateModified\":\"2026-02-26T13:59:07+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/\",\"name\":\"bodHOST\",\"description\":\"Web Hosting - Tips & Tricks\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Dedicated Server Security with Iptables Firewall","description":"Protect your dedicated server using Iptables firewall rules. Learn how to block threats, control traffic, and secure Linux servers with simple steps.","canonical_url":"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/#article","name":"Dedicated Server Security with Iptables Firewall","headline":"Secure your dedicated server with Iptables","author":{"@id":"https:\/\/www.bodhost.com\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/www.bodhost.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.bodhost.com\/blog\/wp-content\/uploads\/2026\/03\/cropped-Profile-Pic.png","@id":"https:\/\/www.bodhost.com\/blog\/#articleImage","width":96,"height":96,"caption":"bodHOST"},"datePublished":"2011-09-22T18:39:29+00:00","dateModified":"2026-02-26T13:59:07+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/#webpage"},"isPartOf":{"@id":"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/#webpage"},"articleSection":"Dedicated Servers, dedicated server, Iptables"},{"@type":"BreadcrumbList","@id":"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.bodhost.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.bodhost.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.bodhost.com\/blog\/category\/dedicated-servers\/#listItem","name":"Dedicated Servers"}},{"@type":"ListItem","@id":"https:\/\/www.bodhost.com\/blog\/category\/dedicated-servers\/#listItem","position":2,"name":"Dedicated Servers","item":"https:\/\/www.bodhost.com\/blog\/category\/dedicated-servers\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/#listItem","name":"Secure your dedicated server with Iptables"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.bodhost.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/#listItem","position":3,"name":"Secure your dedicated server with Iptables","previousItem":{"@type":"ListItem","@id":"https:\/\/www.bodhost.com\/blog\/category\/dedicated-servers\/#listItem","name":"Dedicated Servers"}}]},{"@type":"Organization","@id":"https:\/\/www.bodhost.com\/blog\/#organization","name":"bodHOST","description":"Web Hosting - Tips & Tricks","url":"https:\/\/www.bodhost.com\/blog\/","logo":{"@type":"ImageObject","url":"https:\/\/www.bodhost.com\/blog\/wp-content\/uploads\/2026\/03\/cropped-Profile-Pic.png","@id":"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/#organizationLogo","width":96,"height":96,"caption":"bodHOST"},"image":{"@id":"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/www.bodhost.com\/blog\/author\/admin\/#author","url":"https:\/\/www.bodhost.com\/blog\/author\/admin\/","name":"admin","image":{"@type":"ImageObject","@id":"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/62c629076fffafb51ab8d31ff4b947f645c1a0e72d22f02d42a3cce51c92c9a2?s=96&d=mm&r=g","width":96,"height":96,"caption":"admin"}},{"@type":"WebPage","@id":"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/#webpage","url":"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/","name":"Dedicated Server Security with Iptables Firewall","description":"Protect your dedicated server using Iptables firewall rules. Learn how to block threats, control traffic, and secure Linux servers with simple steps.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.bodhost.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/#breadcrumblist"},"author":{"@id":"https:\/\/www.bodhost.com\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/www.bodhost.com\/blog\/author\/admin\/#author"},"datePublished":"2011-09-22T18:39:29+00:00","dateModified":"2026-02-26T13:59:07+00:00"},{"@type":"WebSite","@id":"https:\/\/www.bodhost.com\/blog\/#website","url":"https:\/\/www.bodhost.com\/blog\/","name":"bodHOST","description":"Web Hosting - Tips & Tricks","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.bodhost.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"bodHOST | Web Hosting - Tips &amp; Tricks","og:type":"article","og:title":"Dedicated Server Security with Iptables Firewall","og:description":"Protect your dedicated server using Iptables firewall rules. Learn how to block threats, control traffic, and secure Linux servers with simple steps.","og:url":"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/","og:image":"https:\/\/www.bodhost.com\/blog\/wp-content\/uploads\/2026\/03\/cropped-Profile-Pic.png","og:image:secure_url":"https:\/\/www.bodhost.com\/blog\/wp-content\/uploads\/2026\/03\/cropped-Profile-Pic.png","article:published_time":"2011-09-22T23:39:29+00:00","article:modified_time":"2026-02-26T13:59:07+00:00","twitter:card":"summary","twitter:title":"Dedicated Server Security with Iptables Firewall","twitter:description":"Protect your dedicated server using Iptables firewall rules. Learn how to block threats, control traffic, and secure Linux servers with simple steps.","twitter:image":"https:\/\/www.bodhost.com\/blog\/wp-content\/uploads\/2026\/03\/cropped-Profile-Pic.png"},"aioseo_meta_data":{"post_id":"288","title":"Dedicated Server Security with Iptables Firewall","description":"Protect your dedicated server using Iptables firewall rules. Learn how to block threats, control traffic, and secure Linux servers with simple steps.","keywords":null,"keyphrases":{"focus":{"keyphrase":"server ","score":82,"analysis":{"keyphraseInTitle":{"score":9,"maxScore":9,"error":0},"keyphraseInDescription":{"score":9,"maxScore":9,"error":0},"keyphraseLength":{"score":9,"maxScore":9,"error":0,"length":1},"keyphraseInURL":{"score":5,"maxScore":5,"error":0},"keyphraseInIntroduction":{"score":9,"maxScore":9,"error":0},"keyphraseInSubHeadings":[],"keyphraseInImageAlt":[],"keywordDensity":{"score":0,"type":"low","maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-05-18 14:25:14","updated":"2026-02-27 09:19:35","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.bodhost.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.bodhost.com\/blog\/category\/dedicated-servers\/\" title=\"Dedicated Servers\">Dedicated Servers<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tSecure your dedicated server with Iptables\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.bodhost.com\/blog"},{"label":"Dedicated Servers","link":"https:\/\/www.bodhost.com\/blog\/category\/dedicated-servers\/"},{"label":"Secure your dedicated server with Iptables","link":"https:\/\/www.bodhost.com\/blog\/secure-your-dedicated-server-with-iptables\/"}],"_links":{"self":[{"href":"https:\/\/www.bodhost.com\/blog\/wp-json\/wp\/v2\/posts\/288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bodhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bodhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/blog\/wp-json\/wp\/v2\/comments?post=288"}],"version-history":[{"count":5,"href":"https:\/\/www.bodhost.com\/blog\/wp-json\/wp\/v2\/posts\/288\/revisions"}],"predecessor-version":[{"id":7371,"href":"https:\/\/www.bodhost.com\/blog\/wp-json\/wp\/v2\/posts\/288\/revisions\/7371"}],"wp:attachment":[{"href":"https:\/\/www.bodhost.com\/blog\/wp-json\/wp\/v2\/media?parent=288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bodhost.com\/blog\/wp-json\/wp\/v2\/categories?post=288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bodhost.com\/blog\/wp-json\/wp\/v2\/tags?post=288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}