Skip to content

How to Configure NAT with Windows Server RRAS Print

  • 0

Applies to: Windows Server 2019, Windows Server 2022 and Windows Server 2025, subject to the workload and edition requirements below.

Use RRAS NAT for a defined IPv4 boundary

Network Address Translation changes packet addressing as traffic crosses between networks. In a common RRAS design, internal IPv4 clients share the gateway’s external address for outbound connections. The gateway maintains mappings so replies can return to the correct client. This does not automatically publish internal services, provide DHCP or make the gateway a complete security appliance. Inbound mappings and filtering remain deliberate design decisions.

This walkthrough configures traditional RRAS NAT through the Routing and Remote Access console on a server with one internal and one external interface. It does not configure WinNAT using New-NetNat, Internet Connection Sharing or software-defined-network NAT. Those are separate mechanisms with different management and support considerations. Avoid layering them on the same traffic path simply because another tutorial uses a similarly named command.

Define addressing and the return path first

For illustration, the internal network is 10.40.0.0/24, the RRAS internal address is 10.40.0.1, and the external interface receives an approved address and upstream gateway. Replace the entire plan with your own non-overlapping networks. Do not use an internal subnet that overlaps a client VPN pool, remote site or upstream network; NAT will not make ambiguous routing predictable.

Place the appropriate default route toward the upstream network and keep internal routes explicit. Clients must send the intended external traffic to RRAS, directly through their default gateway or through a deliberate routed path. DNS service for clients must also be reachable. If internal clients can reach public IPs but cannot resolve names, changing NAT mappings is unlikely to fix the actual problem.

Confirm the platform allows forwarding and the external source-address behaviour. A virtual machine can have two visible adapters while the provider blocks transit traffic. Maintain console access and record the current address, route and DNS configuration before enabling a router function. If the server is already a VPN gateway, review the existing RRAS configuration and dependencies rather than reinitializing it.

Install and initialize routing without deploying a VPN

Install the Routing role service and management tools from elevated Windows PowerShell. Initialize RoutingOnly only on a server intended for a new routing-only configuration. If RRAS is already configured, inspect it and add the needed NAT configuration without overwriting the existing service mode.

Install-WindowsFeature -Name Routing -IncludeManagementTools
# For a new, approved routing-only deployment:
Install-RemoteAccess -VpnType RoutingOnly
Get-Service RemoteAccess
Get-NetAdapter | Select-Object Name,ifIndex,MacAddress,Status
Get-NetIPConfiguration
Get-NetRoute -AddressFamily IPv4

Review installation and startup results. Identify the exact external and internal adapter names from their addresses and physical or virtual connections. Rename interfaces descriptively if that is part of the approved baseline, but do not rely on a name alone as evidence. The next step assigns NAT roles to these interfaces; selecting the wrong one can expose or disconnect the network.

Add the NAT routing protocol and external interface

Open Routing and Remote Access, expand the server and expand IPv4. If NAT is not already present, right-click General, select New Routing Protocol and add NAT. On installations where the setup wizard configured NAT, inspect the existing object instead of creating duplicate configuration. The exact console wording can vary slightly by release and localization.

Under IPv4, right-click NAT and select New Interface. Choose the verified external adapter. In its NAT properties, select Public interface connected to the Internet and enable NAT on this interface. Here Public describes the NAT role; it does not mean you should change the Windows network profile or permit unrestricted inbound access. Confirm the selected adapter’s address and upstream route before accepting the change.

Do not configure an address pool unless the design actually owns and routes the additional public addresses. A single-address outbound deployment generally uses the external interface address. Likewise, leave service and port mappings empty until a specific internal service has a reviewed publication requirement. NAT configuration should not become an untracked list of convenience exceptions.

Add the internal interface and configure one client

Create another NAT interface entry for the verified internal adapter and select Private interface connected to private network. Review both entries so the public and private roles correspond to the network plan. The server should not be bridging the two networks as an accidental side effect of another networking feature.

On a test client in 10.40.0.0/24, configure an unused approved address and subnet mask, set the gateway to 10.40.0.1 when RRAS is its intended default router, and supply the actual DNS servers. Do not give clients the RRAS external address as their gateway. If another router sits between clients and RRAS, configure and verify the required routes there instead of changing every client by guesswork.

# On the test client:
Get-NetIPConfiguration
Get-NetRoute -AddressFamily IPv4
Test-NetConnection -ComputerName '10.40.0.1'
Resolve-DnsName 'www.microsoft.com'
Test-NetConnection -ComputerName 'www.microsoft.com' -Port 443

These tests separate local gateway reachability, name resolution and an actual outbound TCP connection. ICMP may be filtered, so a failed ping should be interpreted alongside the service test and network policy.

Verify translation and enforce the intended exposure

Inspect the RRAS NAT statistics and address mappings while the test client opens an approved external service. Confirm that the client connection produces the expected translation on the intended external interface. Test more than a connection originating from the RRAS server itself: locally originated traffic does not prove that forwarding and translation work for internal clients.

From an authorized external test location, confirm internal services are not reachable unless they have an explicitly approved mapping and firewall rule. A NAT table is not a substitute for inbound and outbound security policy. Windows Firewall, upstream filtering and any RRAS packet filters should be reviewed together so the desired traffic is permitted and unrelated access stays blocked.

If a service must be published, specify its protocol, external port, internal destination and allowed source scope through a separate change. A mapping to an administrative service can create a sensitive external entry point. Keep remote management on the approved management path rather than exposing it merely to demonstrate that port translation works.

Troubleshoot by observing the packet path

If the client cannot reach RRAS, check its address, subnet, VLAN, local firewall and layer-two path. If it reaches RRAS but no external TCP connection works, verify the upstream default route, external connectivity, NAT interface roles and provider forwarding restrictions. If IP connections work but names fail, inspect DNS routing and resolver policy rather than recreating NAT.

Asymmetric return routing can make a connection appear to start and then stall. Capture the relevant source, destination, protocol and time, and examine routes and translation statistics on both sides. MTU issues can affect larger transfers while small probes succeed. Check for another NAT, VPN or security product already handling the same interfaces. Do not enable Internet Connection Sharing or add New-NetNat objects as an improvised repair for a traditional RRAS configuration.

Rollback and retain a usable network record

For a new pilot, remove the NAT entries created for the test and restore the client’s recorded gateway configuration. Disable the newly introduced router function only after confirming no other network depends on it. A whole-server RRAS reset can disconnect VPN users and demand-dial sites as well as NAT clients, so it is broader than removing one mistaken interface entry.

Preserve existing address pools and port mappings before changing production NAT. If rollback restores a prior gateway, verify client routes, DNS and application access through that path. Document the public/private interface mapping, translated address, client subnets, upstream route, published services and security owners. Monitor gateway health and capacity, because a single RRAS server remains a shared availability dependency even when every client’s local network link is healthy.

Related guidance and official references

Install the RRAS components; Manage static routes; Diagnose network connectivity.


Was this answer helpful?

« Back