{"id":64911,"date":"2024-07-16T14:40:04","date_gmt":"2024-07-16T14:40:04","guid":{"rendered":"https:\/\/viktor.xyz\/?post_type=portfolio&#038;p=64911"},"modified":"2024-07-16T14:59:55","modified_gmt":"2024-07-16T14:59:55","slug":"dream-country-blocker","status":"publish","type":"portfolio","link":"https:\/\/viktor.xyz\/index.php\/portfolio\/dream-country-blocker\/","title":{"rendered":"Dream Country Blocker"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Introducing Dream Country Blocker: Secure de-koro.com from Unauthorized Access<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I recently faced a significant challenge: de-koro.com was inundated with attempts to break into the login page. To tackle this issue, I developed a custom WordPress plugin named Dream Country Blocker. This plugin is designed to block or allow traffic from specific countries based on a configurable whitelist or blacklist. Below, I\u2019ll walk you through the key features and functionality of this plugin.<br>Plugin Details<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Plugin Name: Dream Country Blocker\nDescription: Block or allow countries based on a whitelist or blacklist.\nVersion: 1.0\nAuthor: Viktor Gjorgjiev<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Key Features<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Country-based Blocking: Allows you to block or allow traffic from specific countries.\nAdmin Interface: Provides a user-friendly interface in the WordPress admin area for configuring the settings.\nConfigurable Modes: Choose between whitelist (allow only specific countries) or blacklist (block only specific countries).\nCustomizable Lists: Easily manage the list of countries in the whitelist or blacklist.\n.htaccess Management: Automatically updates the .htaccess file with the necessary rules to block or allow traffic based on the configured settings.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">How It Works<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Dream Country Blocker plugin integrates seamlessly with the WordPress admin area, allowing administrators to configure the plugin settings easily. Here is a brief overview of its components:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Admin Menu and Settings Initialization: The plugin adds a new options page under the WordPress settings menu where administrators can enable blocking, choose the block mode, and specify the countries in the whitelist or blacklist.\nUpdating .htaccess: When the settings are updated, the plugin automatically updates the .htaccess file to apply the new rules, ensuring that unauthorized traffic is effectively blocked.<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"520\" height=\"432\" src=\"https:\/\/viktor.xyz\/wp-content\/uploads\/2024\/07\/image.png\" alt=\"\" class=\"wp-image-64912\" srcset=\"https:\/\/viktor.xyz\/wp-content\/uploads\/2024\/07\/image.png 520w, https:\/\/viktor.xyz\/wp-content\/uploads\/2024\/07\/image-300x249.png 300w, https:\/\/viktor.xyz\/wp-content\/uploads\/2024\/07\/image-150x125.png 150w\" sizes=\"(max-width: 520px) 100vw, 520px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introducing Dream Country Blocker: Secure de-koro.com from Unauthorized Access I recently faced a significant challenge: de-koro.com was inundated with attempts to break into the login page. To tackle this issue, I developed a custom WordPress plugin named Dream Country Blocker. This plugin is designed to block or allow traffic from specific countries based on a&#8230; <\/p>\n<p class=\"more\"><a class=\"more-link\" href=\"https:\/\/viktor.xyz\/index.php\/portfolio\/dream-country-blocker\/\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":64912,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","portfolio-category":[20,22],"class_list":["post-64911","portfolio","type-portfolio","status-publish","format-standard","has-post-thumbnail","hentry","portfolio-category-webpage","portfolio-category-wodpress-plugin"],"_links":{"self":[{"href":"https:\/\/viktor.xyz\/index.php\/wp-json\/wp\/v2\/portfolio\/64911","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/viktor.xyz\/index.php\/wp-json\/wp\/v2\/portfolio"}],"about":[{"href":"https:\/\/viktor.xyz\/index.php\/wp-json\/wp\/v2\/types\/portfolio"}],"author":[{"embeddable":true,"href":"https:\/\/viktor.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/viktor.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=64911"}],"version-history":[{"count":0,"href":"https:\/\/viktor.xyz\/index.php\/wp-json\/wp\/v2\/portfolio\/64911\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/viktor.xyz\/index.php\/wp-json\/wp\/v2\/media\/64912"}],"wp:attachment":[{"href":"https:\/\/viktor.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=64911"}],"wp:term":[{"taxonomy":"portfolio-category","embeddable":true,"href":"https:\/\/viktor.xyz\/index.php\/wp-json\/wp\/v2\/portfolio-category?post=64911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}