I migrated a user over from a Sonicwall, and for sake of uniformity with other fortigates and policy management, I created Zones for the WAN interfaces. They have 3 ISP connections. There are 2 SMTP relay servers that go outbound (outbound only) using IP Pools. I need to NAT them to an appropriate IP per ISP. When I create the policy, I can choose multiple IP pools, but it appears to use them top down with no association to the appropriate ISP/interface. For instance if ISP-A was on 1.1.1.1 and ISP-B was on 2.2.2.1, it will always use the 1.1.1.1 IP because its the first IP Pool.
What I really need is to associate an IP Pool to an interface, the same way you would a VIP. This way IP Pool 1.1.1.2 will only ever be used on the ISP-A interface, and same for the other IP Pools. Anyone know if this is possible, or a way of solving this problem?
Solved! Go to Solution.
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.
If you're creating inbound rules with a deny that reference VIP IP's, make sure you set match-vip to enable for that rule, otherwise it might not properly match.
It's been a little while since I set up my own dual ISP failover, and I don't have quite your situation, but here are some of the key points.
[ol]
@emnoc, feel free to correct me here! It's been a while.
References:
[ul]
Hi,
In 5.6.2 it's possible to use associated-interface for an IPPool. I use it in combination with SD-WAN, since then the NAT was always correctly. Before it could happen that the Source-IP was natted to an IP of ISP_1 instead of ISP_2 on WAN-Link of the ISP_2.
This very useful feature is not documented.
Marcus
[NSE4-8]
Not sure what your doing but the main reason is because you have "zones" and the collective interfaces in the single zone.
PCNSE
NSE
StrongSwan
@dwear, we need more details to understand the question. Description of the interfaces, sources, routing, ip pools, etc. as well as details like should the SMTP relays be the only ones using those IPs , for which protocols, etc.
My guess is, as I think emnoc was implying, that you have multiple physical interfaces as members of a single wan zone? And your difficulty is that you can't force them to use a specific interface within that zone? Or use the appropriate NAT IP from the IP Pool you refer to in the security policy?
One way (though probably not the best) to do this would be to use policy routes to route your SMTP relay servers out the appropriate physical ports. You can policy route or static route to specific ports even if they're in a zone. You would need your static routes to have multiple routes out the different ports with equal distance but different priorities for this to work with policy routes (see other forum discussions of how to work with multiple ISPs). To get the specific IPs you can just create different IP Pools and specify whichever you wish in your security policies. But I'm just guessing here, because we don't really know your issue without more details.
With some help from a Fortinet SE, I figured out a solution to this problem. In 5.6, they introduced a CLI command "set associated-interface" under the "config firewall ippool". There you can assign an interface to an IP pool so the IP pool can only be used on that specific interface.
Being able to set associated-interface for an ippool sounds very useful for those of us working with zones.
I hope it gets ported back to the 5.4.x branch.
Otherwise, your VIP solution seems to be one of the only ways to make this work for 5.4.x,
A cleaner solution, IMO, would be (as emnoc mentioned) if the FortiGates allowed firewall security polices that use a specific interface even when that interface is part of a zone. I've done that on other platforms and really miss it with Fortinet. If you want this sort of feature, make sure to make a feature request with Fortinet!
Does anybody ever seen away to set fwpolices that uses "specific interfaces" when the interface is also part of a zone? Juniper SRX allows for this type of fwpolicy.
PCNSE
NSE
StrongSwan
If you're creating inbound rules with a deny that reference VIP IP's, make sure you set match-vip to enable for that rule, otherwise it might not properly match.
It's been a little while since I set up my own dual ISP failover, and I don't have quite your situation, but here are some of the key points.
[ol]
@emnoc, feel free to correct me here! It's been a while.
References:
[ul]
No, I think you did a 5tars good ;)
PCNSE
NSE
StrongSwan
Hi,
In 5.6.2 it's possible to use associated-interface for an IPPool. I use it in combination with SD-WAN, since then the NAT was always correctly. Before it could happen that the Source-IP was natted to an IP of ISP_1 instead of ISP_2 on WAN-Link of the ISP_2.
This very useful feature is not documented.
Marcus
[NSE4-8]
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.