Friday, February 17, 2017

Intel Network Cards are a Disappointment

This is simply to share my disappointment in the quality of hardware and software drivers of the Intel network cards both wired and wireless. I haven't found any solutions to resolve the problems described below and I have no hope in finding a solution so I simply mention the problems exist and are persistent to help other people avoid them if they can.

Note. The Intel network cards in my past experience had always been a top grade standard of quality and performance. Unfortunately, not any more and I don't feel any loyalty to the brand any longer.

Problem 1

Intel Wireless + Bluetooth notebook adapter Intel Centrino® Wireless-N 2230

After upgrading to Windows 10 this adapter does not work any more. The problem is easily found using an Internet search with numerous reports and no solutions. The problem is that the adapter drops a Wi-Fi connection quickly and frequently and after a few drops disconnects completely with a hardware error entry in the Windows event log.

Note: under Windows 8.1 this adapter works flawlessly.

Intel claims they have released the latest drives in the Windows 10 distribution and doesn't have any updates. Windows 10 does recognize the adapter but it misbehaves consistently with the mentioned driver. The only resolution if you want to keep Windows 10 is to replace an adapter with another brand.

Problem 2

Intel wired Intel Ethernet Connection I219-LM

The adapter randomly but regularly disconnects form the network with a warning entry in the event log under Windows 10 on a brand new computer. No driver updates exist nor help with this problem. Numerous reports and no solution can be quickly found on the Internet. This is a very annoying problem as Windows 10 does not really show that the adapter has lost a connection in the icon tray because no error is reported just a warning. You can only figure that out once a program reports that it cannot connect to the Internet. The only remedy is to disable and re-enable the adapter in the network settings. Most of the complaining people install an alternative PCI or USB adapter of a different brand.

If you have anything to add please leave a comment below.

Friday, January 6, 2017

VPN Site-to-Site connection between Azure VPN Gateway and pfSense: Important Details

When implementing an IaaS solution on Azure for, let's say, hosting a web application, it is important to have a controlled secure access to the Azure network from the office site in order to limit an exposure of the Azure virtual machines to the public Internet and prevent unauthorized access to the Azure network resources. Standard solution for this requirement is a site-to-site VPN that allows continuous encrypted connection between two networks: a physical office network and a virtual network on Azure.

There is an out of the box Azure solution for the site-to-site VPN: virtual network Gateway. It's a fairly straightforward IaaS component that supports site-to-site VPN over IPSec protocol and point-to-site VPN access point. It's well documented on Azure https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-howto-site-to-site-resource-manager-portal.
In the scope of this article I will not be explaining basics of this solution but rather focus on some specific details of implementing this solution for one particular scenario: in the office site the VPN is implemented on pfSense firewall. Specifics of such an implementation are those:
  • Azure does not have a standard VPN gateway configuration to connect with pfSense;
  • Azure requires IPSec to be used for site-ti-site VPN which is rather tricky to configure on pfSense;
  • Particulars of IPSec configuration are not documented.
There are articles written about this scenario on the Internet (just do a search) but even with the most detailed explanation and screenshots it may take some time and debugging efforts in order to make it work. On a flip side, once it works it most likely will be very reliable and trouble-free. Let's waist no more time and get right to the matter.

Start from creating an configuring a VPN gateway on Azure as this is a prerequisite. Follow the Azure documentation in the list below:
  • https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-site-to-site-create
  • https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-about-vpn-devices
  • https://docs.microsoft.com/en-us/azure/vpn-gateway/vpn-gateway-configure-vpn-gateway-mp
Once you have the VPN gateway created and the VPN device configured, it's time to configure the pfSense. Keep in mind that because the pfSense is not a supported Azure VPN device you won't be able to get technical help form Azure, so pay attention to the details.

Step 1. Configure pfSense VPN IPSec Phase 1

Step 2. Configure pfSense VPN IPSec Phase 2


Step 3. Connect and enjoy

If you configured everything exactly how it's shown on the screenshots the connection should be established and stay connected.

Troubleshooting

If pfSense and Azure gateway cannot connect most likely there is a mistake in a configuration. Verify thoroughly that all the pfSesnse settings are exactly as shown on the screenshots. If you don't see required options in the settings your pfSense is outdated and you need to upgrade to a more recent version that supports all the required protocols and algorithms.

Tuesday, December 29, 2015

Easily add config transformation files to a Console App project

This is a very short post. Not digging into a theory of config transformations just add this add-on Configuration Transform to your Visual Studio and you'll be able to right click on an App.config file and see "Add Config Transforms" in the context menu. Works just fine.

Friday, October 30, 2015

Using Google Tag Manager to deploy Azure Application Insights client-side monitoring

If your web application is hosted on Microsoft Azure and you are using Application Insights for monitoring you'll have to add a piece of JavaScript on web pages to collect client-side statistics like page load time, JavaScript errors, users and sessions analytics, etc. The script can be found on Azure portal when Application Insights is enabled for a web application and it should look similar to this (don't pay attention to formatting):

Standard Azure instruction says:
To collect end-user usage analytics about your application, insert the following script into each page you want to track. Place this code immediately before the closing tag, and before any other scripts. Your first data will appear automatically in just a few seconds.
The trouble with this is you may need to modify many web pages and then do the live deployment before any data will be collected, and then if you are not happy with something, repeat the cycle over again. It's time consuming and counter productive. What's the solution then?

You you already use Google Analytics on your web site you may be familiar with Google Tag Manager, aka GTM, if not Google it up. In short GTM allows dynamically adding random blocks of JavaScript on live web sites without making any changes to the code and control JavaScript block presence from the Web UI. Convenient, efficient, and provides good control.

In general GTM works out of the box with no or little troubleshooting required but some scripts may not work with it. Many script providers usually state their known compatibility level with GTM. Unfortunately Azure does not say in their documentation anything about GTM. Regardless, first it's worth a try, and secondly, it does work.

The Application Insights JavaScript for client-side analytics does work with Google Tag Manager and requires no changes nor troubleshooting. Clear pass. Give it a try and enjoy the ride.

Thursday, June 11, 2015

WebDav Client for Windows

Recently I've been involved in migrating JIRA Server to JIRA Cloud and one particular required step was to upload exported JIRA data files on to Atlassian cloud storage. Atlassian supports WebDav protocol but they have no suggestions about what client software to use most likely because of the large diversity of what operating systems their customers use.

I was working on Windows 8/Server 2012 and did not have previous experience nor preference for a particular WebDav client. Google search returns a number of choices on the first page but it's hard to pick one based just on reading so I ended up installing and trying a number of different software packages. Without further ado to save time to someone who is facing similar exercise my tool of choice happened to be BitKinex. Extremely easy and intuitive to use, works immediately with no additional configuration, and provides familiar Windows Explorer user experience with drag and drop support. Thumbs up!


Tuesday, May 5, 2015

Controlling console output from a windows task

Windows tasks continue to be very handy especially for automating batch operations that do not require constant human attention. But even such operations may require occasional human interference to troubleshoot problems.

Most of the Windows tasks execute command line programs that do not have graphical user interface but produce output in form of log files or console messages. While monitoring of log files can be relatively easy automated via different kinds of log collection services, the console output that is mostly meant for human eyes and could provide helpful information is usually lost as by default Windows task does not save console output anywhere.

There is however a relatively easy way to save console output produced by a Windows task in a text file. Windows command line environment provides with a function to redirect standard program output to stdout or stderr to a file using redirection commands '>' or '>>'. The first one redirects that output to a file and replaces the file if it exists with a new version and the second one appends the output to a file if it exists.

In order to use output redirection a Windows task action should be configured to execute a CMD shell instead of an actual cl program. So instead of

>myprogram.exe > output.txt

it should be configured as

>CMD /C "myprogram.exe" > output.txt

In the first example of direct calling a program Windows task will ignore output redirection and the entire output will not be saved. In the second example the redirection will be executed not by a Windows task but by a CMD shell instead and the output will be saved in a file.