• Contact
  • About Me
  • Privacy Policy
DefenceDev
  • Home
  • Blog
  • Linux Tutorials
    • Bash Scripting Lessons
    • Commands
    • Networking
  • Solutions
    • Docker
  • Network Tutorials
    • FortiGate
    • MikroTik
  • Projects
    • AdGuard
    • Immich
    • Nextcloud
    • WordPress
  • Cloud
  • Video Tutorials
    • YouTube Channel
    • MikroTik Videos
No Result
View All Result
  • Home
  • Blog
  • Linux Tutorials
    • Bash Scripting Lessons
    • Commands
    • Networking
  • Solutions
    • Docker
  • Network Tutorials
    • FortiGate
    • MikroTik
  • Projects
    • AdGuard
    • Immich
    • Nextcloud
    • WordPress
  • Cloud
  • Video Tutorials
    • YouTube Channel
    • MikroTik Videos
No Result
View All Result
DefenceDev
No Result
View All Result
ADVERTISEMENT
Home Network Tutorials FortiGate

Fortinet FortiGate: Restrict Access to the Open Ports for Specific Country

neo by neo
May 27, 2025
in FortiGate
0
Fortinet FortiGate: Restrict Access to the Open Ports for Specific Country

Fortinet FortiGate: Restrict Access to the Open Ports for Specific Country

0
SHARES
48
VIEWS
Share on FacebookShare on Twitter
ADVERTISEMENT

Restrict Access to the Open Ports on Firewall

Securing your network from unwanted traffic is a critical step in maintaining a robust firewall setup. One effective way to enhance security is by restricting access to open ports based on geographical location. In FortiGate, you can leverage advanced features to restrict access to specific ports for users from certain countries, adding an extra layer of protection to your network.

Introduction

In network security, controlling access to open ports is essential for protecting against unauthorized access and reducing attack vectors. FortiGate firewalls offer the flexibility to implement country-based restrictions, a powerful feature that allows administrators to permit or block access from specific geographical locations. This article will guide you through the process of configuring FortiGate to restrict access to open ports based on country, thereby adding another layer of security to your network.

Why Restrict Access by Country?

Restricting access by country can help minimize exposure to threats originating from regions with higher attack rates or to limit access solely to regions where authorized users are based. This configuration can be particularly useful for securing sensitive applications or systems that don’t require global access.

Steps to Configure Country-Based Port Restriction in FortiGate

Step 1: Log into the FortiGate GUI

  1. Open your web browser and navigate to your FortiGate’s IP address.
  2. Log in using an account with administrative privileges.
FortiGate
Log in to your FortiGate Device

Step 2: Create an Address Object for the Country

  1. Navigate to Policy & Objects > Addresses.
  2. Click Create New and select Address.
  3. Name the address object (e.g., “Allow-US-Only” for allowing access from the U.S.).
  4. Set the Type to Geography.
  5. In the Country drop-down menu, select the country you want to allow or block.
  6. Click OK to save.
Allow US Only
Allow acccess just from the USA

Step 3: Create a Policy to Allow/Restrict Country Access

  1. Go to Policy & Objects > IPv4 Policy (or IPv6 Policy, depending on your configuration).
  2. Click Create New to create a new policy rule.
  3. Set the Incoming Interface to the interface where incoming traffic for the specific port arrives.
  4. Set the Outgoing Interface to the interface that forwards traffic to your internal network.
  5. In the Source field, select the address object created in Step 3 (e.g., “Allow-US-Only”).
  6. For Destination, select the server or IP address hosting the open port.
  7. Under Service, choose the specific service (port) you want to restrict (e.g., HTTP, HTTPS, SSH).
  8. Set Action to Accept if allowing only from the selected country, or Deny to block it.
  9. Configure Logging as needed.
  10. Click OK to apply the policy.
Allow access only from USA
Allow access only from USA

Step 4: Adjust Policy Order

ADVERTISEMENT

FortiGate processes policies from top to bottom, so make sure your new policy is positioned appropriately to apply the restriction before any general “allow all” rules.

ADVERTISEMENT
ADVERTISEMENT

Step 5: Test the Configuration

After configuring the policy, test the access from the designated country to ensure it works as expected. If you’re restricting access, use tools to simulate connections from different countries to verify the block is functioning correctly.

Additional Tips

  • Monitoring Traffic: Use the FortiGate logs under Log & Report > Forward Traffic to monitor attempted connections from different regions.
  • Use VPNs for Remote Access: For users who need access from restricted countries, consider setting up a VPN, allowing them secure access while keeping direct access limited.

About The Author

neo

See author's posts

Tags: fortigate
ADVERTISEMENT
Previous Post

Fortinet FortiGate: Reverse Path Forwarding (RPF)

Next Post

Fortinet FortiGate: Routing Design Best Practices

neo

neo

Next Post
Fortinet FortiGate: Routing Design Best Practices

Fortinet FortiGate: Routing Design Best Practices

Follow Us

  • Trending
  • Comments
  • Latest
MikroTik: Export Configuration in Text File

MikroTik: Export Configuration in Text File

Fortinet FortiGate: Static Route Configuration via GUI and CLI

Fortinet FortiGate: Static Route Configuration via GUI and CLI

Immich: Installation on Ubuntu 22.04

Immich: Installation on Ubuntu 22.04

Fortinet FortiGate Upgrade Path Tool

Fortinet FortiGate Upgrade Path Tool

NextCloud: Port Forwarding - Essential Ports for Smooth Functionality

NextCloud: Port Forwarding – Essential Ports for Smooth Functionality and Remote Access

Organizing and Managing Photos with Immich: Features I Use

Organizing and Managing Photos with Immich: Features I Use

Install Ubuntu 22.04 on Oracle VM Virtual Box

Install Ubuntu 22.04 on Oracle VM Virtual Box

Linux Directories: cd (Change Directory), pwd (Print Working Directory), mkdir (Make Directory)

Linux Directories: cd (Change Directory), pwd (Print Working Directory), mkdir (Make Directory)

Install WordPress on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install WordPress on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nextcloud on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nextcloud on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nginx Proxy Manager on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nginx Proxy Manager on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Docker on Raspberry Pi 4 with Ubuntu 22.04

Install Docker on Raspberry Pi 4 with Ubuntu 22.04

Recent News

Install WordPress on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install WordPress on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nextcloud on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nextcloud on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nginx Proxy Manager on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nginx Proxy Manager on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Docker on Raspberry Pi 4 with Ubuntu 22.04

Install Docker on Raspberry Pi 4 with Ubuntu 22.04

MikroTik: Check Your Wireless Password

MikroTik: Check Your Wireless Password

ADVERTISEMENT

DefenceDev Tutorials

defencedev Logo

Whether you’re just starting or looking to expand your skills, I hope you find useful information and engaging discussions here. Let me take you through my journey and the goals behind this space!

Follow Us

Browse by Category

  • Blog
  • Cloud
    • Private
  • Linux Tutorials
    • Bash Scripting Tutorials
    • Commands
    • Networking
  • Network Tutorials
    • FortiGate
    • MikroTik
  • Projects
    • AdGuard
    • Immich
    • Nextcloud
    • WordPress
  • Solutions
    • Docker
  • Video Tutorials
    • MikroTik Videos

Recent News

Install WordPress on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install WordPress on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nextcloud on Raspberry Pi 4 with Docker (Ubuntu 22.04)

Install Nextcloud on Raspberry Pi 4 with Docker (Ubuntu 22.04)

  • Site Map
  • Privacy Policy
  • Facebook Page
  • Disclaimer
  • Contact
  • About Me

© 2025 defencedev.com - All rights reserved.

No Result
View All Result
  • Home
  • Blog
  • Linux Tutorials
    • Bash Scripting Lessons
    • Commands
    • Networking
  • Solutions
    • Docker
  • Network Tutorials
    • FortiGate
    • MikroTik
  • Projects
    • AdGuard
    • Immich
    • Nextcloud
    • WordPress
  • Cloud
  • Video Tutorials
    • YouTube Channel
    • MikroTik Videos

© 2025 defencedev.com - All rights reserved.