If you’ve ever attended one of our “DirectAccess: Best Practices” webinars, or read anything that I have written regarding the DirectAccess transition technologies, you know I am an absolute advocate of keeping Teredo enabled whenever possible. The premise for this recommendation is simple: improved performance. There are a number of different possible client/server combinations in a DirectAccess connection, and depending on what combination is used, you may or may not be running as efficiently as possible. I come across many DirectAccess implementations in the wild that were configured in a way where Teredo is disabled, and so all client connections are being made via the IP-HTTPS transition tunnel. Technically this is fine, as all clients are able to make IP-HTTPS connections, but depending on what operating systems you are running, you may be double-encrypting every packet that flows in or out of every DirectAccess client computer. This makes for slower connections on the client side, and heavier resource utilization on the server side, resulting in slower speeds and fewer users that you can squeeze onto that DA server.

To give a little background, the reason your traffic might be doubly encrypted is because all DirectAccess traffic is encrypted with IPsec all the time. In addition to that encryption, when certain operating system combinations are in effect in a DA connection, your IP-HTTPS tunnel might also be encrypting that traffic stream a second time with TLS. Think of it this way, your transition tunnel (Teredo or IP-HTTPS) is like a conduit flowing through a wall. Inside that conduit run your individual networking cables, which are akin to your DirectAccess IPsec tunnels. Your IPsec tunnels that flow inside the conduit are already encrypted, so there is no need to encrypt the conduit itself. However, that is exactly what IP-HTTPS does in many circumstances. This is the core reason why we keep Teredo enabled when possible, so that any users which can connect using Teredo do so, and lessen the encryption processing load on both the clients and the DirectAccess servers. Here are some examples of IP-HTTPS connections that will help to show in what cases you are experiencing double encryption:

In the event that your client computer is running Windows 8 or higher, and the DirectAccess server is running Server 2012 or higher, then we are finally in a position where the negotiations of the tunnel are smart enough to negotiate null encryption on the IP-HTTPS tunnel itself. Because all DirectAccess traffic is already secured inside IPsec, we can safely negotiate NULL, and take some of the processing load for the IP-HTTPS tunnel off the client and the server. This is great news, and as the newer operating systems roll out further and further, this will help to speed up DA connections and reduce the load on DA servers everywhere!

BUT…there’s a catch, which is the purpose of this article. If you enable some of the advanced features on your Server 2012 DirectAccess server, namely VPN or OTP, your NULL encryption negotiation option will be gone. There is nothing in the wizards or GUI which tells you this is going to happen, but as soon as you enable OTP or add the VPN role to a DirectAccess server, the ability for your IP-HTTPS tunnels to connect using NULL vanishes, and all of your IP-HTTPS connections, even those between Windows 8 and Server 2012, are always double encrypted. This happens namely because you don’t want OTP credentials which are used as part of the IPsec tunnel authorization to be sent clear-text across the internet, and if you have users connecting via SSTP VPN, same is true. You certainly wouldn’t want their VPN tunnels to be able to authenticate and pass credentials over that null stream, sending critical information via clear text across the internet.

So while NULL encryption for IP-HTTPS tunnels gets disabled for very good reasons, the fact that this happens is not advertised anywhere for the administrator to see, and so you may be caught off guard to find that you have enabled VPN only to experience higher CPU load on your DA server, or complaints from users about having slightly slower connections than they used to have.

I recently helped a customer roll out DirectAccess on a couple of load balanced Server 2012 boxes. It is pretty common to get some questions after we finish installing, but I was asked something that (surprisingly) I haven’t ever been asked before. Specifically, his question was “When I am viewing the currently connected DirectAccess computers inside the Remote Access Management Console, how can I see what DirectAccess server they are connecting through without having to go into the details of each connection?”

“There’s a column right in there that shows you” was my response. But indeed, there was not. I checked some of my own servers, and sure enough there was a Server column right there where I could identify and even sort the connections by which node they were connecting through. But this column was not showing up in his console. Then we checked his other server, and the Server field was visible on that one! But still not on the first DirectAccess server.

It seems like we poked and prodded around every inch of the interface, but couldn’t find a menu that let us choose which columns were visible and which were not. Then just as I hung up the phone with him (isn’t that how it always happens?), I accidentally clicked on it. All you have to do is right-click on one of the Titles of the existing columns, and you see a list of available columns to select or de-select. The important part is that you must right-click on the name (right on the text) of one of the columns that is already being shown. Right-clicking anywhere else in the Console will not get you this selection.

So there was our answer. We simply checked the Server box in this list, and the new column was immediately available for viewing and helping us to manipulate the data as needed. Sometimes the simplest options are the hardest to find!

When running through the DirectAccess configuration wizards, a handy option that is often chosen by DA admins is “Allow DirectAccess clients to use local name resolution”. You can see this option on the screen where you configure settings for your Network Connectivity Assistant (NCA), inside Step 1. When enabled, this setting allows a DirectAccess user to click on their DirectAccess network connection from the systray, and choose “Disconnect”.

What this Disconnect button really does is temporarily disable the NRPT. This stops DNS requests from attempting to flow over the DirectAccess tunnels, and instead places those DNS requests on the locally configured DNS server of the user’s current network connection.

The problem with this Disconnect button is that it only shows up once the NCA tool has successfully “Connected”. So if NCA never goes to a Connected status, the Disconnect button is not available. One scenario where this will cause grief is when users are inside the corporate network, and there is something wrong with the NLS website. If you have a problem with NLS, it can cause all kinds of name resolution problems for your DirectAccess client computers which are inside your network. A nice workaround to this problem, until you fix the NLS of course, is to have everyone click on their Disconnect button. But wait, since there is a problem with NLS, DirectAccess tunnels are trying to build but never can, so your NCA tool in the systray continually says “Connecting” instead of flipping over to “Connected”. Since we are stuck on Connecting, the Disconnect button is not available to click on. So even if you have the option selected where users should be able to turn off the NRPT and resolve their DNS name resolution issues, the button will not be available to them.

Simply install this hotfix on your Windows 8 and Windows 8.1 clients, and should you have the unfortunate event of your NLS website going down, you can at least get folks inside the network back to work by being able to temporarily Disconnect the NRPT.

For anyone running DirectAccess that is based on Server 2012, you probably know that your Remote Access Management Console has the nice feature of showing you what users and computers are currently connected, and even what resources they are touching. This is a very nice feature, but there has recently been a problem discovered with this part of the console, that it continues to hold onto this information until the service is restarted. Microsoft has released a hotfix to be installed on the DirectAccess server to resolve this Remote Access Management Console memory leak:

Microsoft has recently released an interesting new tool for DirectAccess admins. The DirectAccess Client Troubleshooting Tool is a small, easy to use utility that can help diagnose DirectAccess connections gone wrong. Development is still happening on this tool, so expect more versions, but it’s a nice way to run a quick check on the status of DA components on a client machine, especially if you aren’t yet familiar with browsing through the log files.

You can run the DA Troubleshooting Tool on Windows 7, 8 or 8.1 – and you don’t even have to install it! Just download and run, and as long as you’ve got .NET 4, you’re in business.

The existence of this tool certainly doesn’t mean that you can spend your DirectAccess administration career without understanding the real log files, but it can give a nice summary. Also keep in mind that this initial version isn’t perfect, I expect they will be making some changes to help the tool accommodate better for things like a DirectAccess computer being inside the corporate network, or for a DA environment that makes use of OTP.

Microsoft has released SP4 for UAG! I know there are plenty of people out there who have been waiting for this one, as it incorporates support for Windows 8.1 clients, and the Internet Explorer 11 browser. You can also now make use of the built-in Mail app in Windows 8.1 through UAG, and Remote Desktop 8.1.

Learn more about the new features as well as the included KB fixes that are rolled into this new Service Pack, here:

Last night while working with one of my favorite customers to replace a NIC on a DirectAccess server, we discovered that the internal network was configured with a “global” approach to using ISATAP. I have seen this many times over the past couple of years, anyone who has stood up a DirectAccess environment following one of the Test Lab Guides out there most likely ends up with their network in this state, with a DNS host record for the word ISATAP. This is exactly what the TLGs tell you to do, but is actually not a good practice. I believe that some of the documentation out there specifies to take this approach because it’s easy to setup, and also because back when DirectAccess was new, we really didn’t know any better.

What is ISATAP?

Let’s back up a little. The Intra-Site Automatic Tunnel Addressing Protocol (ISATAP) is an IPv6 tunneling technology. Most DirectAccess admins are familiar now with 6to4, Teredo, and IP-HTTPS. These three technologies are also IPv6 tunneling technologies, designed to take IPv6 packets and encapsulate them inside IPv4 headers, so that those packets can successfully transport across an IPv4 network. (aka the Internet for these three transition technologies). ISATAP does essentially the same thing, but for the inside of your network. I like to think of ISATAP as a “virtual IPv6 cloud” inside your corporate network. Once your internal computers/servers have set themselves up as ISATAP clients, they will receive an IPv6 address and routing information from the DirectAccess server. When this happens, because Windows prioritizes IPv6 over IPv4, whenever ISATAP host computers communicate with each other, they will do so using their ISATAP IPv6 tunnels, instead of their regular IPv4 LAN transport.

Why is this a problem?

If ISATAP is enabled globally in your environment, that means that any ISATAP capable host system will automatically become an ISATAP connected host system. Any Server 2008, Server 2012, Windows 7 or Windows 8 boxes inside your corporate network will automatically set themselves up with one of these ISATAP IPv6 addresses. When this happens, as stated above, all traffic between these hosts is now going to prefer to use that IPv6 tunnel rather than the regular IPv4 network. Well, it’s technically still using the IPv4 network, but is pushing encapsulated packets across the network now, instead of native IPv4. This means that if you are using an IDS/IPS to monitor traffic inside your network, you probably won’t be able to see this traffic. It will also make troubleshooting network issues inside the network quite a bit harder, because you’re going to notice all of these IPv6 addresses and packets flowing around, and it’ll take a lot longer to identify a connectivity problem with a system inside the network. Finally, you only have one ISATAP router when you setup this global approach, which is the DirectAccess server. This means that your DirectAccess server is now doing all the grunt work of being an ISATAP relay (sort of a DHCP server) for all of these internal hosts, sometimes thousands of them. It also means that the DirectAccess server is now the default router for all of the internal hosts traffic! This is obviously going to put unnecessary load on the DirectAccess server and the network where it resides. In the worst cases, using global ISATAP can cause connectivity issues and even network flooding.

History of ISATAP, as it relates to DirectAccess

So if it has the potential for so many problems, why is it the default implementation path in the Test Lab Guides? This answer goes all the way back to Server 2008 R2’s release. This operating system was the first time that the word DirectAccess appeared. Most folks are familiar with UAG DirectAccess and Server 2012 DirectAccess, now that it’s becoming more and more popular. But there was another version of DirectAccess, back in Server 2008 R2’s native operating system, and it came with some hitches. The biggest requirement was that the internal network had to be IPv6. This just isn’t a reality for customers, even today, and so it would have been a complete showstopper. Cue ISATAP. In Server 2008 R2 DirectAccess, you could use ISATAP to easily spin up a virtual IPv6 environment that ran on top of your internal IPv4 network, and then you could easily make use of DirectAccess! In the newer versions of DirectAccess, both UAG and Server 2012, there are some new components called NAT64 and DNS64 that work together to ensure that you don’t have any IPv6 requirements anymore. In Server 2008 R2, to be able to get those client IPv6 packets into the network, you needed an IPv6 network inside to send them to. With NAT64 and DNS64, the DirectAccess server now has the ability to take those client IPv6 packets and spin them down into IPv4 packets, so you can simply leave your internal network all IPv4. So back in the beginning it was standard practice to enable ISATAP globally. Today, because of the known issues, it is recommended not to use ISATAP at all, unless you have a specific reason for needing it…

In what cases would I actually want ISATAP?

Now you know the history on ISATAP and the fact that we no longer implement it unless needed, but how do you know whether or not you need it? If you have IPv6 inside your network, you definitely do NOT need ISATAP. I just wanted to start by saying that. However, almost nobody has IPv6 inside their network yet. So assuming that your internal network is IPv4, as we talked about already DirectAccess will work just fine, because of the new NAT64 and DNS64 technologies. So with no ISATAP in your environment, we can absolutely get DirectAccess connected and working. However, what happens if you have the need to send packets outbound toward your DirectAccess client machines? I’m not talking about things like updates or Group Policies or anything like that, because those items are all client-side pulls, and they will work over DirectAccess with no ISATAP or any special considerations. But if you have the case where you need to do a true “manage-out” to the DirectAccess client machines, like an internal helpdesk computer needing to RDP into a DirectAccess client computer, this requires the helpdesk computer to have an IPv6 layer of transport available with which to contact the IPv6 DirectAccess client. This is where the need for ISATAP comes in.

How to configure ISATAP

If you do determine that ISATAP could benefit the way that you use DirectAccess, DO NOT CREATE A DNS HOST RECORD CALLED ISATAP. Doing so will turn ISATAP on globally, and I direct you back to the beginning of this article. You will want to create a “Selective ISATAP” environment, where you get to determine manually which internal machines will take advantage of ISATAP and set themselves up as ISATAP hosts. This will leave the majority of your internal network on IPv4, business as usual, and will be a much, much safer way of implementing. Here are a couple of web links that will assist with your ISATAP configuration:

If you’re running Server 2012 DirectAccess and have enabled Reporting inside the Remote Access Management Console, you already know that you can head into that GUI and search historically for DirectAccess and VPN connections. This works well and is nice because of the Search function near the top of the page, where you can sort by dates and type in just about any criteria that you may want to filter the data down into. The interface looks nice and works well. Sometimes though, you may want to send this data out to a file/spreadsheet to be able to email it to someone, to automate some kind of weekly or monthly report, or for further data manipulation purposes. There is an option to configure Reporting to send data to a RADIUS server, but unfortunately that option logs less data than the default internal WID reporting does, so it will be most beneficial to you to use WID (which is the same information that shows up in the Remote Access Management Console), and extract the data from there.

You can do just about anything with PowerShell these days, so let’s explore the commands that we can use to pull useful DirectAccess usage reporting out of a Server 2012 DirectAccess box. Here are the two commands we are going to use, and links to their official TechNet documentation:

I’ll let the documentation speak for itself on all of the different ways that these commands can be used, but here is the procedure (and sample scripts) that I most commonly use for pulling out statistics for a particular date range, which is the most common request that I receive from customers:

Create a folder on the hard drive of your DirectAccess server. I usually name it something like C:\DA_Reporting

Create two new text files inside this folder, called DA_Connections.txt and DA_Connections_Summary.txt

Edit DA_Connections.txt with Notepad to reflect the following:

Edit DA_Connections_Summary.txt with Notepad to reflect the following:

Now you need to rename these text files to be “.ps1” files. You can do this with either File Explorer or a command/PowerShell prompt, but ultimately just change the names of these files so that they are now DA_Connections.ps1 and DA_Connections_Summary.ps1

Open up PowerShell, browse to your folder, and run the scripts. If this is the first time you have run a PowerShell script and you receive an error message about your “execution policy”, see here for information on correcting that behavior: http://technet.microsoft.com/en-us/library/ee176949.aspx. I typically get past this error by simply running the Set-ExecutionPolicy RemoteSigned command, but you should decide for yourself based on that document what option best meets your needs.

Once you have run the scripts, you will now have CSV files inside your DA_Reporting folder that can be opened and manipulated using Excel!

You can, of course, modify these scripts in many different ways, including new variables for filtering and giving it a different file name or path in which to store the CSV files. Also, you will need to modify the script whenever you want to change the date ranges that you want reporting information for. This is just a simple example with some step-by-step direction on getting you to a starting point, and you can tweak your implementation of these scripts as needed in your own environment.