Hi @ Mushtaq Ahmad,
It sounds like you're facing some challenges trying to set up your Azure VPN Gateway connection with custom IPsec policies and NAT rules. Let's break down your questions and address your concerns.
Custom Traffic Selectors and NAT Rules
- Can you use custom traffic selectors and NAT rules together? Unfortunately, Azure VPN Gateway does not support using custom traffic selectors in conjunction with NAT rules. You are specifically encountering that error because the gateway can't handle both configurations at the same time.
Recommended Approaches
To meet your requirements for both custom IPsec parameters and static IP visibility for outbound traffic, you'll need to take a different approach since you can't combine the two directly. Here's how you can achieve each one:
- Custom IPsec parameters (e.g., DH Group 14, PFS):
- You can configure the custom IPsec/IKE policy by leveraging PowerShell or the Azure CLI to set the parameters you need. Check out this documentation on configuring IPsec/IKE policies for specific commands and options.
- Static IP visibility for outbound traffic:
- For outbound traffic to have a static IP, you might need to use a different method, like associating a Public IP address directly with your Azure resources or configuring Azure Load Balancer in front of your service. This way, your outbound traffic can have a stable, known IP address that you can control.
Ref:
Kindly let us know if the above helps or you need further assistance on this issue.
Please "upvote" if the information helped you. This will help us and others in the community as well.