{"id":75,"date":"2015-07-23T04:34:45","date_gmt":"2015-07-23T04:34:45","guid":{"rendered":"http:\/\/dewlance.com\/kb\/?p=75"},"modified":"2022-08-16T10:21:21","modified_gmt":"2022-08-16T10:21:21","slug":"how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables","status":"publish","type":"post","link":"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables","title":{"rendered":"How to prevent DDoS Attack on cPanel\/Apache by CSF\/IPtables? &#8211; in 2026"},"content":{"rendered":"<p><span style=\"font-size: 16px;\">You don&#8217;t need to slow down your server in order to protect your VPS\/Server from a DDoS attack targeting an Apache port when using our unique method for handling this.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3>Introduction:<\/h3>\n<p><span style=\"font-size: 16px;\">We will use a firewall or IPTables to prevent DoS\/DDoS attack but this does not require from you to reduce the speed of incoming requests. We employ a simple method to prevent a potential attack from targeting a port but your page is still served to visitors.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2>What is CSF?<\/h2>\n<p><span style=\"font-size: 16px;\">Full form of CSF is &#8220;ConfigServer Security &amp; Firewall&#8221;, This is used by most of hosting company to secure their server from DoS attackers, hacking,etc and this is also useful for newbies. CSF is completely free firewall software.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2>cPanel is required?<\/h2>\n<p><span style=\"font-size: 16px;\">It does not matter If you are using cPanel VPS or not, You can do this on any other control panel which support CSF firewall or also possible with other firewall or even IP tables can do this but I never try this so I will only tell you about how to do this on CSF\/cPanel or without cPanel.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2>Requirements:<\/h2>\n<ul>\n<li><span style=\"font-size: 16px;\">VPS\/Server with us or any other provider.<\/span><\/li>\n<li><span style=\"font-size: 16px;\">CSF Firewall or IPTables.<\/span><\/li>\n<li><span style=\"font-size: 16px;\">Root SSH Access on VPS\/Server or If you are using cPanel then WHM Access is sufficient but CSF must be installed on your cPanel&#8217;s WHM. <\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2>What I need to do If I have a cPanel\/WHM + CSF?<\/h2>\n<p><span style=\"font-size: 16px;\">If you are not expert in SSH commands then It will be better for you do this via cPanel.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 16px;\"><span style=\"color: #ff0000;\">Warning: <\/span>By doing this, Your apache server can be down for few minute until you complete this steps.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 16px;\"><strong>1.\u00a0<\/strong> Login to your WHM Account by visiting https:\/\/$site-address.com:2087<\/span><\/p>\n<p><span style=\"font-size: 16px;\"><strong>2.\u00a0<\/strong> In WHM Area, Scroll down to the &#8220;<strong>ConfigServer Security&amp;Firewall<\/strong>&#8221; and click on it.<\/span><\/p>\n<p><span style=\"font-size: 16px;\"><strong>3.\u00a0 <\/strong>Now click on the<strong> &#8220;Firewall Redirect&#8221; <\/strong>button. <\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-medium wp-image-78\" src=\"http:\/\/dewlance.com\/kb\/wp-content\/uploads\/2015\/07\/csf-dewlance-vps-300x21.gif\" alt=\"CSF-Firewall\" width=\"300\" height=\"21\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 16px;\"><strong>4.\u00a0 <\/strong>Paste this code in the text box, replace the IP and port with your custom IP\/Port and click on the &#8220;Change&#8221; button. Don&#8217;t forget your newly-added firewall port because you will need to add this to Apache and open this port in firewall so your website can work properly.<\/span><\/p>\n<blockquote><p><span style=\"font-size: 16px;\">123.xx.0.1|80|123.xx.0.1|2266|tcp<br \/>\n123.xx.0.1|80|123.xx.0.1|2266|udp<\/span><\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 16px;\">Take a look at this screenshot and it will be easy for you to understand how redirecting looks like.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-79\" src=\"http:\/\/dewlance.com\/kb\/wp-content\/uploads\/2015\/07\/csf-port-details-redirect.gif\" alt=\"csf-port-details-redirect\" width=\"430\" height=\"227\" \/><br \/>\n&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 16px;\">CSF will ask you to return or restart the firewall. To make changes in the firewall, click on the &#8220;<strong>Restart csf+lfd<\/strong>&#8221; button.<\/span><\/p>\n<p><span style=\"font-size: 16px;\">\u00a0<\/span><\/p>\n<p><span style=\"font-size: 16px;\"><strong>5.<\/strong> As you can see on our previous screenshot, we&#8217;ve added a port 2266 for redirecting so now \u00a0you should go back to the CSF firewall\u2019s main menu. Once there, click on the &#8220;<strong>Firewall Configuration&#8221; <\/strong>option and add our newly-added port to the <strong>TCP_IN <\/strong>and <strong>UDP_IN <\/strong>field. Then scroll down to the end of page and click on the &#8220;<strong>Change<\/strong>&#8221; button. Afterwards, click on the &#8220;<strong>Restart csf\/lfd<\/strong>&#8220;.<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-81\" src=\"http:\/\/dewlance.com\/kb\/wp-content\/uploads\/2015\/07\/apache-port-for-firewall-redirect.jpg\" alt=\"apache-port-for-firewall-redirect\" width=\"335\" height=\"177\" srcset=\"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2015\/07\/apache-port-for-firewall-redirect.jpg 335w, https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2015\/07\/apache-port-for-firewall-redirect-300x159.jpg 300w\" sizes=\"auto, (max-width: 335px) 100vw, 335px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 16px;\"><strong>6. <\/strong>Now we need to change the Apache listening port in cPanel, Go to <strong>Server Configuration<\/strong> &gt;&gt; Tweak Settings and click on the &#8220;<strong>System<\/strong>&#8221; tab.<\/span><\/p>\n<p><span style=\"font-size: 16px;\">In &#8220;<strong>Apache non-SSL IP\/port<\/strong>&#8221; field, change the setting from &#8220;default :80&#8221; to a custom setting and enter your new Apache listening port with 0.0.0.0 IP address like &#8220;0.0.0.0:<strong>2266<\/strong>&#8220;(without the quotes). Then click on the &#8220;<strong>Save<\/strong>&#8221; button.<\/span><\/p>\n<p><span style=\"font-size: 16px;\">\u00a0<\/span><\/p>\n<p><span style=\"font-size: 16px;\">Now it is time to check whether your website is working or not. Open your website and if does not work, restart the Apache services from WHM.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2>How to prevent DDoS attack using CSF only? (If you don&#8217;t use any control panel)<\/h2>\n<p><span style=\"font-size: 16px;\">Open the file<strong> \/etc\/csf\/csf.redirect <\/strong>in nano or vi editor, paste the following code, replace the IP with your IP address and redirect port <strong>2266<\/strong> to your new port:<\/span><\/p>\n<blockquote><p><span style=\"font-size: 16px;\">123.xx.0.1|80|123.xx.0.1|<strong>2266<\/strong>|tcp<br \/>\n123.xx.0.1|80|123.xx.0.1|<strong>2266<\/strong>|udp<\/span><\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 16px;\">Restart csf by running this command in your Dewlance SSH area: <\/span><\/p>\n<blockquote><p><span style=\"font-size: 16px;\">csf -r<\/span><\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 16px;\">Now we need to change the listening port in httpd.conf (Apache config) <\/span><\/p>\n<p><span style=\"font-size: 16px;\">Open this file:<\/span><\/p>\n<blockquote><p><span style=\"font-size: 16px;\">\/usr\/local\/apache\/conf\/httpd.conf<\/span><\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 16px;\">Change the line <\/span><\/p>\n<blockquote><p><span style=\"font-size: 16px;\">Listen 0.0.0.0:<strong>80<\/strong><\/span><\/p><\/blockquote>\n<p><span style=\"font-size: 16px;\">To<\/span><\/p>\n<blockquote><p><span style=\"font-size: 16px;\">Listen 0.0.0.0:<strong>2266<\/strong><\/span><\/p><\/blockquote>\n<p><span style=\"font-size: 16px;\">(Don&#8217;t forget to replace the old port number with the new one)<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 16px;\">Now restart the Apache services by running this command: (CentOS\/RHEL)<\/span><\/p>\n<blockquote><p><span style=\"font-size: 16px;\">service httpd restart<\/span><\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 16px;\">For Ubuntu users:<\/span><\/p>\n<blockquote>\n<pre class=\"contents \"><span style=\"font-size: 16px;\"><span class=\"cmd command\">sudo service apache2 restart<\/span><\/span><\/pre>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<h2>How to redirect Apache default port in Iptables?<\/h2>\n<p><span style=\"font-size: 16px;\">Before running this command, change the IP address to your server IP address and port <strong>2266<\/strong> with your choice of port.<\/span><\/p>\n<blockquote>\n<pre class=\"bash\" width=\"400px\"><span style=\"font-size: 16px;\">iptables -t nat -I PREROUTING --src <span style=\"color: #000000;\">0<\/span>\/<span style=\"color: #000000;\">0<\/span> --dst <strong><span style=\"color: #000000;\">123.0<\/span><span style=\"color: #000000;\">.0<\/span><span style=\"color: #000000;\">.1<\/span><\/strong> -p tcp --dport <span style=\"color: #000000;\">80<\/span> -j REDIRECT --to-ports <strong><span style=\"color: #000000;\">2266<\/span><\/strong><\/span><\/pre>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 16px;\">Now run this command to make changes to iptables (CentOS\/RHEL)<\/span><\/p>\n<blockquote>\n<pre class=\"bash\"><span style=\"font-size: 16px;\">service iptables save<\/span><\/pre>\n<p><span style=\"font-size: 16px;\">service iptables restart<\/span><\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: 16px;\">Now change the listening port from the default port 80 to your new redirecting port in the Apache config file \/usr\/local\/apache\/conf\/httpd.conf and restart Apache by running &#8220;service httpd restart&#8221; command (without the quotes).<\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You don&#8217;t need to slow down your server in order to protect your VPS\/Server from a DDoS attack targeting an Apache port when using our unique method for handling this. &nbsp; Introduction: We will use a firewall or IPTables to prevent DoS\/DDoS attack but this does not require from you to reduce the speed of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":109,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[707],"tags":[42,39,44,40,41,43],"class_list":["post-75","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-reseller-hosting","tag-cpanel","tag-csf","tag-ddos","tag-firewall","tag-iptables","tag-whm"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to prevent DDoS Attack on cPanel\/Apache by CSF\/IPtables? - in 2026 - Web Hosting Blog - Dewlance<\/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:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to prevent DDoS Attack on cPanel\/Apache by CSF\/IPtables? - in 2026 - Web Hosting Blog - Dewlance\" \/>\n<meta property=\"og:description\" content=\"You don&#8217;t need to slow down your server in order to protect your VPS\/Server from a DDoS attack targeting an Apache port when using our unique method for handling this. &nbsp; Introduction: We will use a firewall or IPTables to prevent DoS\/DDoS attack but this does not require from you to reduce the speed of [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting Blog - Dewlance\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dewlance.hosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2015-07-23T04:34:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-16T10:21:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2015\/07\/dewlance-ddos-prevention-apachecsf2-e1437630600435.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"200\" \/>\n\t<meta property=\"og:image:height\" content=\"200\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"K.S\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dewlance\" \/>\n<meta name=\"twitter:site\" content=\"@dewlance\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"K.S\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables\"},\"author\":{\"name\":\"K.S\",\"@id\":\"https:\/\/www.dewlance.com\/blog\/#\/schema\/person\/0fe2f240cf5589599b50b9385ee53694\"},\"headline\":\"How to prevent DDoS Attack on cPanel\/Apache by CSF\/IPtables? &#8211; in 2026\",\"datePublished\":\"2015-07-23T04:34:45+00:00\",\"dateModified\":\"2022-08-16T10:21:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables\"},\"wordCount\":811,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.dewlance.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2015\/07\/dewlance-ddos-prevention-apachecsf2-e1437630600435.jpg\",\"keywords\":[\"cpanel\",\"csf\",\"ddos\",\"firewall\",\"iptables\",\"whm\"],\"articleSection\":[\"Reseller Hosting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables\",\"url\":\"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables\",\"name\":\"How to prevent DDoS Attack on cPanel\/Apache by CSF\/IPtables? - in 2026 - Web Hosting Blog - Dewlance\",\"isPartOf\":{\"@id\":\"https:\/\/www.dewlance.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2015\/07\/dewlance-ddos-prevention-apachecsf2-e1437630600435.jpg\",\"datePublished\":\"2015-07-23T04:34:45+00:00\",\"dateModified\":\"2022-08-16T10:21:21+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables#primaryimage\",\"url\":\"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2015\/07\/dewlance-ddos-prevention-apachecsf2-e1437630600435.jpg\",\"contentUrl\":\"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2015\/07\/dewlance-ddos-prevention-apachecsf2-e1437630600435.jpg\",\"width\":200,\"height\":200},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.dewlance.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to prevent DDoS Attack on cPanel\/Apache by CSF\/IPtables? &#8211; in 2022\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dewlance.com\/blog\/#website\",\"url\":\"https:\/\/www.dewlance.com\/blog\/\",\"name\":\"Web Hosting Blog - Dewlance\",\"description\":\"Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.dewlance.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dewlance.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.dewlance.com\/blog\/#organization\",\"name\":\"Dewlance\",\"url\":\"https:\/\/www.dewlance.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dewlance.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2022\/08\/logo.png\",\"contentUrl\":\"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2022\/08\/logo.png\",\"width\":274,\"height\":89,\"caption\":\"Dewlance\"},\"image\":{\"@id\":\"https:\/\/www.dewlance.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/dewlance.hosting\/\",\"https:\/\/x.com\/dewlance\",\"https:\/\/www.youtube.com\/user\/dewlances\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dewlance.com\/blog\/#\/schema\/person\/0fe2f240cf5589599b50b9385ee53694\",\"name\":\"K.S\",\"url\":\"https:\/\/www.dewlance.com\/blog\/author\/dewlancevpsxen\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to prevent DDoS Attack on cPanel\/Apache by CSF\/IPtables? - in 2026 - Web Hosting Blog - Dewlance","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:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables","og_locale":"en_US","og_type":"article","og_title":"How to prevent DDoS Attack on cPanel\/Apache by CSF\/IPtables? - in 2026 - Web Hosting Blog - Dewlance","og_description":"You don&#8217;t need to slow down your server in order to protect your VPS\/Server from a DDoS attack targeting an Apache port when using our unique method for handling this. &nbsp; Introduction: We will use a firewall or IPTables to prevent DoS\/DDoS attack but this does not require from you to reduce the speed of [&hellip;]","og_url":"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables","og_site_name":"Web Hosting Blog - Dewlance","article_publisher":"https:\/\/www.facebook.com\/dewlance.hosting\/","article_published_time":"2015-07-23T04:34:45+00:00","article_modified_time":"2022-08-16T10:21:21+00:00","og_image":[{"width":200,"height":200,"url":"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2015\/07\/dewlance-ddos-prevention-apachecsf2-e1437630600435.jpg","type":"image\/jpeg"}],"author":"K.S","twitter_card":"summary_large_image","twitter_creator":"@dewlance","twitter_site":"@dewlance","twitter_misc":{"Written by":"K.S","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables#article","isPartOf":{"@id":"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables"},"author":{"name":"K.S","@id":"https:\/\/www.dewlance.com\/blog\/#\/schema\/person\/0fe2f240cf5589599b50b9385ee53694"},"headline":"How to prevent DDoS Attack on cPanel\/Apache by CSF\/IPtables? &#8211; in 2026","datePublished":"2015-07-23T04:34:45+00:00","dateModified":"2022-08-16T10:21:21+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables"},"wordCount":811,"commentCount":0,"publisher":{"@id":"https:\/\/www.dewlance.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables#primaryimage"},"thumbnailUrl":"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2015\/07\/dewlance-ddos-prevention-apachecsf2-e1437630600435.jpg","keywords":["cpanel","csf","ddos","firewall","iptables","whm"],"articleSection":["Reseller Hosting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables","url":"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables","name":"How to prevent DDoS Attack on cPanel\/Apache by CSF\/IPtables? - in 2026 - Web Hosting Blog - Dewlance","isPartOf":{"@id":"https:\/\/www.dewlance.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables#primaryimage"},"image":{"@id":"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables#primaryimage"},"thumbnailUrl":"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2015\/07\/dewlance-ddos-prevention-apachecsf2-e1437630600435.jpg","datePublished":"2015-07-23T04:34:45+00:00","dateModified":"2022-08-16T10:21:21+00:00","breadcrumb":{"@id":"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables#primaryimage","url":"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2015\/07\/dewlance-ddos-prevention-apachecsf2-e1437630600435.jpg","contentUrl":"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2015\/07\/dewlance-ddos-prevention-apachecsf2-e1437630600435.jpg","width":200,"height":200},{"@type":"BreadcrumbList","@id":"https:\/\/www.dewlance.com\/blog\/how-to-prevent-ddos-attack-on-cpanelapache-by-csfiptables#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dewlance.com\/blog"},{"@type":"ListItem","position":2,"name":"How to prevent DDoS Attack on cPanel\/Apache by CSF\/IPtables? &#8211; in 2022"}]},{"@type":"WebSite","@id":"https:\/\/www.dewlance.com\/blog\/#website","url":"https:\/\/www.dewlance.com\/blog\/","name":"Web Hosting Blog - Dewlance","description":"Tutorials","publisher":{"@id":"https:\/\/www.dewlance.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dewlance.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dewlance.com\/blog\/#organization","name":"Dewlance","url":"https:\/\/www.dewlance.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dewlance.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2022\/08\/logo.png","contentUrl":"https:\/\/www.dewlance.com\/blog\/wp-content\/uploads\/2022\/08\/logo.png","width":274,"height":89,"caption":"Dewlance"},"image":{"@id":"https:\/\/www.dewlance.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dewlance.hosting\/","https:\/\/x.com\/dewlance","https:\/\/www.youtube.com\/user\/dewlances\/"]},{"@type":"Person","@id":"https:\/\/www.dewlance.com\/blog\/#\/schema\/person\/0fe2f240cf5589599b50b9385ee53694","name":"K.S","url":"https:\/\/www.dewlance.com\/blog\/author\/dewlancevpsxen"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/posts\/75","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/comments?post=75"}],"version-history":[{"count":23,"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/posts\/75\/revisions"}],"predecessor-version":[{"id":741,"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/posts\/75\/revisions\/741"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/media\/109"}],"wp:attachment":[{"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/media?parent=75"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/categories?post=75"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dewlance.com\/blog\/wp-json\/wp\/v2\/tags?post=75"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}