Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
Hello philv,
I do not understand exactly what you want to do. Do you want to block a specific IP that accesses your environment or prevent access to firewall management over the internet?
I'm simply trying to block China, Russia, external IP's, etc. from pinging, accessing our website, accessing any ports. Or getting through our firewall.
Thanks for the quick reply...
We create an Address Group called Block_Countries_In (we also have one for outbound).
We add GEO Addresses to that Group. It is always good to keep your groups of the same type. Don't mix, FQDNs, GEOs, etc. I think that might be your issue. Create two unique groups, maybe even two polices. One for GEO and one for Subnets. Make them your first policies or near the top of your rule set.
Here is our show full policy (we are on 6.0.3) for our GEO block rule:
config firewall policy edit 27 set name "In WAN1 - Deny GEO" set uuid d0b57172-a271-51e4-867d-3eaf7fdb3219 set srcintf "port9" <----- This is WAN set dstintf "port1" <------This is LAN set srcaddr "Block_Countries_In" set dstaddr "all" set internet-service disable set rtp-nat disable set learning-mode disable set action deny set status enable set schedule "always" set schedule-timeout disable set service "ALL" set dscp-match disable set logtraffic all set logtraffic-start disable set np-accelation enable set session-ttl 0 set vlan-cos-fwd 255 set vlan-cos-rev 255 set wccp disable set natip 0.0.0.0 0.0.0.0 set diffserv-forward disable set diffserv-reverse disable set tcp-mss-sender 0 set tcp-mss-receiver 0 set comments '' set block-notification disable set replacemsg-override-group '' set srcaddr-negate disable set dstaddr-negate disable set service-negate disable set captive-portal-exempt disable set ssl-mirror disable set scan-botnet-connections disable set dsri disable set radius-mac-auth-bypass disable set delay-tcp-npu-session disable set send-deny-packet disable set match-vip enable next end
We do the opposite for traffic outbound to hostile nations. You need both to be secure. Of course IPs can be spoofed, but like you said, this cuts out a lot of the chaff and scan bots that are always knocking.
The reason it isn't working, and this is not intuitive, is that for NAT WAN to LAN policies the destination has to be a VIP even for Deny rules (destination = any won't work) unless you use the "set match-vip enable" setting as shown in SeaDave's config.
So, you can either change your Destination from "any" to the VIPs you want to block from receiving this traffic, or you can add "set match-vip enable" to your policy.
Russ
In addition to Russ:
also keep an eye on the order of your WAN to LAN Policies because policies are checkt in this order and the first one that matches the packet wins it meanig any policy coming behind that policy will not be hit!
--
"It is a mistake to think you can solve any major problems just with potatoes." - Douglas Adams
and lastly:
to protect the FGT itself, create Local-In policies with these address groups. Will control access to all open service ports like HTTPS, SSH, SSLVPN, IPsec.
Thanks, I'll try this... I'll let you know how it goes.
That is available in the GUI as well, if you make it visible:
System > Feature Vis. > (right column) Local In policies
Ping to the FGT belongs to the services a FGT offers, so you can block it via Local In policy. As well as IPsec, SSLVPN, CAPWAP, telnet, ssh, HTTPS...
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1660 | |
1077 | |
752 | |
443 | |
220 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.