Created on 10-26-2023 10:23 PM Edited on 11-15-2024 06:29 AM By Jean-Philippe_P
Description |
This article describes how to block unauthorized connections to IPsec VPN.
In some cases, there are unauthorized IPsec VPN connection attempts. By default, they are all blocked by the firewall, but it might be an eyesore to see multiple phase1 negotiation errors on the VPN events, as some of the errors might be negotiation errors for a legitimate VPN connection.
In this example the unauthorized remote IP is 192.168.88.152:
|
Scope | FortiGate. |
Solution |
If there is only a list of specific IPs to connect to the IPsec VPN, which in this case is an IPsec site-to-site VPN with a static remote gateway, it is possible to allow only the remote gateway IP and deny all IKE packets with the use of a local-in policy.
The output after creating the local policy to allow only authorized remote gateways. Unauthorized IP is no longer able to negotiate and is no longer present on the VPN event logs.
Note: This is not applicable for dial-up IPsec VPN peers, as their IP might change and be blocked by the local-in policy.
Allowing specific IPs to still have access but block all the other IPs. Local-in policy, by default, does not have an implicit deny rule like an IPv4 policy. To allow certain IPs to still access the IKE port 500. Either use option, 'addr-negate enable' (NOT condition is applied here), and then by default action would be 'deny'. Or create an implicit deny rule and have action as 'allow' above the implicit deny to achieve limited accessibility.
|
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.