Fortinet Firewall D-NAT configuration
From Notes_Wiki
Home > Enterprise security devices or applications > Fortigate firewall > Fortinet Firewall D-NAT configuration
D-NAT Policy Configuration in Fortinet Firewall
This article provides step-by-step instructions to configure **Destination NAT (D-NAT)** on a Fortinet Firewall. D-NAT allows mapping of a public IP address to an internal server, making it accessible from the internet.
Prerequisites
- FortiGate Firewall with administrative access.
- Public IP address from ISP.
- Internal server IP address (LAN/DMZ).
- List of required services/ports (e.g., HTTP, HTTPS, RDP).
Configure Virtual IP (VIP)
- Navigate to: Policy & Objects → Virtual IPs.
- Click on Create New → Virtual IP.
- Fill in the following details:
- Name: A descriptive name (e.g., VIP-DMZ-Server).
- Interface: Select WAN interface (e.g., wan1).
- External IP Address: Enter the Public IP.
- Mapped Internal IP: Enter the private IP of the server.
- Port Forwarding (Optional):
- Enable if only specific services are required (e.g., HTTP/HTTPS).
- Configure external port, internal port, and protocol (TCP/UDP).
Note: The VIP object maps the external Public IP to the internal server in the DMZ zone.
Configure Firewall Policy
- Navigate to: Policy & Objects → Firewall Policy.
- Click on Create New.
- Configure the following:
- Name: (e.g., Allow-DMZ-Server).
- Incoming Interface: WAN (outside network).
- Outgoing Interface: LAN/DMZ (where server resides).
- Source: All (or specify external IP/subnet if required).
- Destination: The configured Virtual IP (e.g., `VIP-DMZ-Server`).
- Service: Select required services (HTTP, HTTPS, RDP, etc.).
- Action: Accept.
- NAT: Enable → Select Use Outgoing Interface Address.
Important: NAT must remain enabled for proper traffic translation.
Verification
- From an external network, access the Public IP.
- Confirm redirection to the internal server.
- Check traffic logs: Log & Report → Forward Traffic.
Antivirus Issue
- Sometimes, server-side antivirus blocks connections via Public IP.
- Fortinet TAC recommends enabling NAT for the source in the D-NAT policy.
- Using **Use Outgoing Interface Address** usually resolves the issue.
Summary
- Configure Virtual IP to map Public IP → Internal IP.
- Create Firewall Policy with NAT enabled.
- Verify via logs and external testing.
- Enable Source NAT if antivirus blocks traffic.
Home > Enterprise security devices or applications > Fortigate firewall > Fortinet Firewall D-NAT configuration