mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-9617: Fixed enabling remote access after PF or LB configured on vpn tcp ports
This commit is contained in:
parent
7da95172a4
commit
d2ca30a133
@ -429,7 +429,13 @@ public class FirewallManagerImpl extends ManagerBase implements FirewallService,
|
||||
boolean allowStaticNat =
|
||||
(rule.getPurpose() == Purpose.StaticNat && newRule.getPurpose() == Purpose.StaticNat && !newRule.getProtocol().equalsIgnoreCase(rule.getProtocol()));
|
||||
|
||||
if (!(allowPf || allowStaticNat || oneOfRulesIsFirewall)) {
|
||||
boolean allowVpnPf =
|
||||
(rule.getPurpose() == Purpose.PortForwarding && newRule.getPurpose() == Purpose.Vpn && !newRule.getProtocol().equalsIgnoreCase(rule.getProtocol()));
|
||||
|
||||
boolean allowVpnLb =
|
||||
(rule.getPurpose() == Purpose.LoadBalancing && newRule.getPurpose() == Purpose.Vpn && !newRule.getProtocol().equalsIgnoreCase(rule.getProtocol()));
|
||||
|
||||
if (!(allowPf || allowStaticNat || oneOfRulesIsFirewall || allowVpnPf || allowVpnLb)) {
|
||||
throw new NetworkRuleConflictException("The range specified, " + newRule.getSourcePortStart() + "-" + newRule.getSourcePortEnd() +
|
||||
", conflicts with rule " + rule.getId() + " which has " + rule.getSourcePortStart() + "-" + rule.getSourcePortEnd());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user