<% content_for :title, "Block Countries" %>

🌍 Block Countries

Create country-based firewall policies to block or redirect traffic from specific countries

<%= link_to "← Back to Policies", waf_policies_path, class: "inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50" %>
<%= form_with(url: create_country_waf_policies_path, method: :post, local: true, class: "space-y-6") do |form| %>

🚨 Popular Countries for Blocking

<% CountryHelper.popular_for_blocking.each do |country| %> <% end %>

πŸ—ΊοΈ Select by Region

<% CountryHelper.by_region.each do |region_name, country_codes| %>

<%= region_name %>

<% CountryHelper.countries_for_region(region_name).each do |country| %> <% end %>
<% end %>

βš™οΈ Policy Settings

<%= form.label :action, "What should happen to traffic from selected countries?", class: "block text-sm font-medium text-gray-700" %>
<%= form.label :description, "Description (optional)", class: "block text-sm font-medium text-gray-700" %> <%= text_area_tag "description", nil, rows: 3, placeholder: "e.g., Block countries with high scanner activity", class: "block w-full border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500 sm:text-sm" %>

πŸ“‹ Policy Preview

Select countries above to see policy preview...
<%= link_to "Cancel", waf_policies_path, class: "inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50" %> <%= submit_tag "Create Country Policy", class: "inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500" %>
<% end %>