Setup Windows Server 2016 as a NAT Router


In this article I’ll be setting up Windows Server 2016 as a NAT router to route traffic between my virtual lab LAN and the internet. Please note that this article was written in context with the configuration used in my virtual lab. You’ll have to adapt it to your network setup. Also, you will need to have a DHCP server to provide IP addresses to your client computers and a DNS server so that your client computers are able to resolve names. As a quick-ref, my LAB environment is as below:

Hyper-V Virtual Lab

If you’d like to add another subnet to your router and have NAT working for both of them, please read LAN Routing and NAT with Windows Server 2016

If you’d like to read how to setup IPFire, a very simple to install Linux router and firewall, with a more generic configuration that will achieve the same goal, read Installing Ipfire – A Linux router and firewall.

If you’d like to continue following this article, you can read on how to install Windows Server 2016 and, after installing, read how to rename the server so that you can identify its primary role by its name. I called mine SRVGW01 (GW=Gateway).

The server must have two NICs, one configured for the internal network (LAN) and another one configured to access the internet. I’ll call it WAN.

The first thing I’ll do is to rename the network interfaces to better identify them.


Configuring the NICs

Open “Settings”


Choose “Network & Internet”

Setup Windows Server 2016 as a NAT Router


And choose “Change adapter options”

Setup Windows Server 2016 as a NAT Router


From the “Network Connections” window, it is pretty easy to spot what is the LAN connection (Unidentified network) and the WAN connection (bellow identified as Network). Let’s rename them. Select the connection to rename and press the “Rename this connection” button. Rename them accordingly.

Setup Windows Server 2016 as a NAT Router

It should look like this:

Setup Windows Server 2016 as a NAT Router


The LAN adapter needs to be configured with a static address, while the WAN adapter should be set to DHCP. The address configured on the LAN adapter is the address the client computers will use as their gateway. Right-click on the LAN adapter and select “Properties”.

Setup Windows Server 2016 as a NAT Router


Highlight “Internet Protocol Version 4 (TCP/IPv4)” and select “Properties”.

Setup Windows Server 2016 as a NAT Router


Setup the IP address settings to match your network configuration and press OK. Note that you need to have a DNS server setup on the network. It can the same server where this role is being installed.

Setup Windows Server 2016 as a NAT Router


Adding the “Remote Access” server role

Now it’s time to install the “Remote Access” server role. Open Server Manager and select “Add roles and features”.

Setup Windows Server 2016 as a NAT Router


Press “Next” until you reach the screen below. Select the “Remote Access” role and press “Next”.

Setup Windows Server 2016 as a NAT Router


Press “Next” at the following screen.

Setup Windows Server 2016 as a NAT Router


Press “Next” and then select “Routing”, as shown below:

Setup Windows Server 2016 as a NAT Router


Click on “Add Features”.

Setup Windows Server 2016 as a NAT Router


Go till the end of the wizard by pressing “Next”. Press “Install” at the confirmation screen.

Setup Windows Server 2016 as a NAT Router


Configuring the “NAT router”

Wait for the installation to finish and open the “Routing and Remote Access” console. Press “Start” and under “Windows Administrative Tools” find “Routing and Remote Access”.

Setup Windows Server 2016 as a NAT Router


Right-click on the server name and select “Configure and Enable Routing and Remote Access”.

Setup Windows Server 2016 as a NAT Router


Press “Next” at the wizard welcome screen. Choose “Network address translation (NAT)” and press “Next”.

Setup Windows Server 2016 as a NAT Router


Select the WAN adapter and press “Next”.

Setup Windows Server 2016 as a NAT Router


Press “Finish”, wait for the configuration to finish and verify that the NAT router is working properly. Expand the IPv4 node, select “NAT” and you should see that packets have been translated.

Setup Windows Server 2016 as a NAT Router


As always, if you found this article useful, share it with your friends.

If you have any question or suggestion, leave your comment.

Thank you for reading!


18 thoughts on “Setup Windows Server 2016 as a NAT Router

  • October 3, 2017 at 13:50

    Hi! And thanks for a great How-To!

    But … there is always a but, in your 2nd to last image, where I should pick the adapter, I cant find any interfaces at all, but I do have them bot working propperly, the WAN have internet access, and the WAN have a connection to my LAN router.

    Have any suggestions?

    • October 31, 2017 at 15:38

      Thank you for your comment and sorry for the late reply!
      Yes, have you tried to remove and re-add the “Remote Service” role?
      I’ve seen something similar happen when you add a new NIC after the role has been enabled.
      Let me know.

  • February 16, 2018 at 10:33

    Thanks. I get the following error after I click Finish on the add roles wizard:
    “Routing and Remote Access – Remote Access Service is unable to enable Routing and Remote Access for the probable reason like: unable to open ports for Routing and Remote Access in Windows Firewall service. In this case RAS may not accept vpn connections.
    User Action: Manually open the port of Routing and Remote Access in the windows firewall.”
    I also get an extra page of features after Add Features and before Install.
    I have tried manually opening the port using the rules already in the firewall but this didn’t work. I have tested by disabling the firewall completely as this is a lab I’m setting up for training and it still doesn’t work. I have completely rebuilt the server from a new VM and still have the same issue. Any ideas?

  • Pingback:You need to configure Server1 as a network address translation (NAT) server. - Exam 70-743 at ExamsDB

  • May 12, 2018 at 08:07

    Dear Pedro Pina,
    I followed your guide. I installed Windows Server 2016 on a Hyper-V second generation virtual machine with 2048 MB RAM and two network cards named ext and int, and updated it. Then I set up Windows Server 2016 as a NAT router. Then I installed Windows 8.1 on a Hyper-V first generation virtual machine with 1024 MB RAM and one network card named int. During the installation there was not any Internet connection for the Windows 8.1 virtual machine. There is not any Internet connection after the installation for the Windows 8.1 virtual machine.

    Truly yours, Adam Holes

    • May 12, 2018 at 18:06

      Hi Adam,
      First of all thank you for your comment and for reading.
      Could you please be a bit more specific regarding your setup? How do you have the Hyper-V virtual switches configured?
      Do you have a DHCP server in place in your LAN so that the client gets an IP address? Or have you set it up manually?
      Thank you.
      Best regards,

  • May 13, 2018 at 14:21

    Hi Pedro,
    thank you for your quick reply to my comment.
    the `int’ virtual switch is “Internal only”.
    The `ext’ virtual switch is “Intel(R) Dual Band Wireless-AC 8265”.
    I checked the “Allow _m_anagement operating system to share this network adapter” check box.
    I named the virtual machines after the planets of the Solar System.
    The Windows Server 2016 virtual machine is `Mercury’.
    I renamed the Windows Server 2016 computer to `mercury’.
    `Mercury’ connects to the Internet through the `ext’ virtual switch.
    `mercury’ checked for updates, downloaded updates and installed updates successfully.
    This is the equivalent of the update/upgrade terminology in Ubuntu/Debian.
    I even managed to browse the Internet with Internet Explorer in `Mercury’.
    The Windows 8.1 virtual machine is `Venus’.
    The Windows 8.1 computer name is `venus’.

    I configured `mercury”s LAN.
    The “Internet Protocol Version 4 (TCP/IPv4) Properties” were as shown in your figure:

    The “Use the following IP address:” radio button was selected.
    “IP address:”,
    “Subnet mask:”,
    “Default gateway:” left empty.

    The “Use the following DNS server addresses:” radio button were selected.
    “Preferred DNS server:”,
    “Alternate DNS Server:” left empty.

    After reading your reply to my comment,
    I tried the following:

    In the “Internet Protocol Version 4 (TCP/IPv4) Properties” configuration window,
    I selected the “Obtain an IP address automatically” radio button.
    I also selected the “Obtain DNS server address automatically” radio button.
    Then I restarted `mercury’.
    This is the equivalent of the reboot terminology in Ubuntu/Debian.
    Then I logged in to `mercury’ and waited for the “Server Manager” to load entirely.
    Then I started the `Venus’ virtual machine.
    There was not Internet in `venus’.

    Or was the problem the following: I should have configured fix IPv4 address in `venus’?

    Truly yours, Adam

  • May 14, 2018 at 17:18

    Hi Adam,
    First of all, do you have communication between both machines, i.e., can you ping Mercury from Venus and Venus from Mercury?

    WAN – should be left as DHCP if it is connected to your internet access.
    LAN – The IP address configuration shown in the tutorial reflects the IP address configuration I was using in my lab at the time of writing. You have to use a static IP configuration for the LAN. You should also have a DNS server in place in your LAN. In my case my DNS server was my Domain Controller which had an IP address of

    Should be connected to your “int” virtual switch. It should be configured to use DHCP, if you have a properly configured DHCP server in place in your LAN. If not, you should configure a static IP address, with the gateway pointing to Mercury’s LAN IP address and the DNS pointing to whatever server you configured as a DNS server. Mercury?

    Best regards,

  • May 23, 2018 at 11:49

    so i did this but still not getting a connection on internal network help???

    • May 23, 2018 at 22:20

      so we have google wifi so we are on my server external ip is 192.1168.1.239 but when i try ping or i get the reply error “reply from192.168.86.31 error host destination unreachable.

      • May 24, 2018 at 11:09

        Hi Logan,
        Thank you for your comment.
        This means that you have the IP address set as a gateway and this gateway doesn’t know where to redirect your ping request.
        What is your setup/environment?

  • Pingback:Exam 70-743 – Upgrading Your Skills to MCSA: Windows Server 2016 | Alex Ø. T. Hansen

  • February 25, 2019 at 17:32

    hello there,

    I have configured NAT properly but my server 2012R2 is very slow while restarting and i couldn’t get shared files in the server.

    • March 5, 2019 at 09:57

      Hi Bet, thank you for commenting and reading.
      Could you please explain further the issue you are experiencing?
      Thank you.

  • Pingback:Anleitungen Server als Router – IT-Wiki

  • Pingback:how to enable nat on router – Savlo

  • October 13, 2019 at 21:08

    ok I set this up in vmware workstation. i have LAN at 172 and WAN to 192. can i remote in to the 172 from my pc? if so, how can i set it up? firewall inbound?

    • October 14, 2019 at 05:12

      Hi Luisa,
      thank you for your comment.
      You should be able to inbound from your WAN to your LAN, like with any other router, but for that, yes, you need to configure inbound firewall rules.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Holler Box