April 17 2015

Checking worldwide DNS propagation



----------------------------------------------------------------------------
I use a maximum of one Google Ad per post to help offset some of my blog hosting costs.

----------------------------------------------------------------------------

Recently when moving website hosts I needed to update the DNS A records to point to the new hosting provider. Global DNS replication can take time and there is a great free tool to perform a DNS lookup against multiple name servers located in different parts of the world.  For example, the image below shows that the Google DNS server in Mountain View CA (USA) has a different value to the rest of the DNS servers.

For blog.danovich.com.au
For blog.danovich.com.au

When I tried again an hour later, they were all the same meaning that global replication had finished.

See https://www.whatsmydns.net for the free web based tool.



----------------------------------------------------------------------------
I use a maximum of one Google Ad per post to help offset some of my blog hosting costs.

----------------------------------------------------------------------------

Category: Geek | LEAVE A COMMENT
October 31 2014

Moving my WordPress blog to Azure

Here’s a little about my experience moving the hosting of this WordPress blog to the Azure platform.

I had been using Webcity to host this blog for many years. I would constantly receive warnings about CPU spikes from them because their solution doesn’t scale. This led to my account being suspended a number of times this year and in one week last month there were 2 x 8 hour+ unexplained  & un-communicated outages for all hosted websites – this pushed me over the edge to look at other solutions. I liked the idea of more stable infrastructure and the flexibility to scale up and down.

Webcity charged me $150AU per year. Using CPanel, I worked out that my total HTTP traffic per month averaged over the last 6 months is 6GB per month. Based on the Azure pricing calculator (http://azure.microsoft.com/en-us/pricing/calculator/), this means I should actually be saving around $30 per year by using Azure.

calc

To get started, I logged onto https://manage.windowsazure.com and associated my credit card with my existing Windows Live ID (or whatever it is called now). From there, I simply opened the Azure management website, went to Web Sites, Create a Web Site and then From Gallery:

azure1

Selected WordPress, then filled in the site details:

azure2

On the next page, accept the new Database name or create your own.

After a few minutes, the new website will appear and go into ‘Running’ status. Select the instance and click ‘Browse’:
azure3
Fill in your details, these are only temporary as you can change them later. Hit ‘Install WordPress’. After a few minutes there will be a success page.
azure4
A basic WordPress site is now up and running, you can visit the URL that you chose at the start – in my case it was http://danovich.azurewebsites.net/ .
The default option is to set up the web hosting plan as ‘Free’, however this doesn’t allow for a custom domain name (danovich.com.au).From the help page: Each plan has a mode associated with it. Different modes expose different sets of features and capabilities. Plans in the Free and Shared modes run on a shared infrastructure with sites managed by other customers. These sites will have strict quotas for resource utilization. Plans in the Basic and Standard modes run on resources that are dedicated to your sites and have fewer restrictions. Also see http://azure.microsoft.com/en-us/pricing/details/websites/To configure this, head back to the Azure management portal, select your website and click on ‘Scale’.  In my case I selected Shared, this will be enough for me for now and the beauty of Azure is that I can upgrade to a different plan easily later on if needed.

azure5

I originally planned to use a migration tool to move across the site configuration and content however I ran into multiple errors no matter which migration tool I tried:

  • All-in-One WP Migration
  • WP Clone by WP Academy
  • WordPress Move
  • WP Migrate DB
  • UpdraftPlus
  • Duplicator

I put this down to the fact that I had a very old and unsupported WordPress theme running plus 6+ years of WordPress customizations. I decided not to use the migration plugin tools and went for using the freshly installed WordPress instance on Azure, picked a new theme, added a handful of useful plugins and then used the native export and import functionality of WordPress to get the old posts across. I then used FTP to copy to uploads directory across.

azure6

I remembered that my DNS was hosted with my old web hosting provider, so I upgraded my domain registration provider account to also host by DNS. I entered my handful of A and CNAME records and waited til the next day for replication around the Internet. At the same time, I added an additional A record for migrate.danovich.com.au that pointed to the IP address provided by Azure (screenshot below) and also a CNAME for awverify.migrate.danovich.com.au  to point to awverify.migrate.danovich.azurewebsites.net for the purposes of testing before cutting over the remaining DNS records.

After waiting for replication, I went into the Azure management portal –> configuration –> domain names  –> manage domains, where I added the new line for migrate.danovich.com.au.  I could then use my browser to see that migrate.danovich.com.au was now showing my new website hosted on Azure.  The next step was to update my remaining A & CNAME DNS records to point to the IP address or the awverify CNAME that Azure needs for verification.

DNS records
DNS records
Manage custom domains
Manage custom domains

Once this was done, I could access the website using blog.danovich.com.au or any of the other DNS entries I had added.

Whilst it was very easy to set up a WordPress instance on Azure and relatively easy to import my old content, I’ve had a few issues using Azure – specifically around billing and availability –  to the point where I don’t see me continuing to use Azure in the future. I’ll save that for another post…… but overall it was a very easy process to get WordPress up and running on Azure.

March 7 2014

Fastest DNS servers available

Recently I was looking for the fastest responding DNS servers to speed up my Internet experience. I came across a great tool called namebench – an open-source DNS benchmark utility.  From their website:

 

It hunts down the fastest DNS servers available for your computer to use. namebench runs a fair and thorough benchmark using your web browser history, tcpdump output, or standardized datasets in order to provide an individualized recommendation. namebench is completely free and does not modify your system in any way. This project began as a 20% project at Google.

 

Download from free from their website – https://code.google.com/p/namebench/

 
 

May 20 2013

Powershell script to check automatic registration of addresses in DNS

This is nifty PowerShell script to query a list of computer names and then work out whether the “Register this connection’s address in DNS” tick box is ticked for each active NIC.

 

 
##########################################################
#
# Adjustable variables (2)
#
# Specify the name and location of the a text file containing the server names to be scanned, eg $computers = get-content C:tempServer_Names.txt

$computers = get-content C:tempServer_Names.txt

# Specify the name and location of the export CSV file to be created, eg $FileLocation = "c:tempExport.csv"

$FileLocation = "c:tempExport.csv"

##########################################################

# AUTHOR:	blog.danovich.com.au
# DATE:		20/05/2013
# NAME:		DNS_Registration.ps1
# VERSION:	1.1
# PURPOSE:	Query list of servers and return if the "Register this connection's address in DNS" tick box is ticked for each active NIC
# COMMENT:	1.0 Initial release after testing
#				This script checks the FullDNSRegistrationEnabled properties of each network card:
#					If TRUE, the IP addresses for this connection are registered in DNS under the computer's full DNS name.
#			1.1 Added check for remote WMI connectivity. Added listing of DNS servers used for each NIC. Added Connection Name as well as NIC name.

##########################################################

$ErrorActionPreference = "SilentlyContinue"

# Create empty array
$report = @()

# Set count
$i = 0

ForEach ($computer in $computers){

    #Count the computers
	$count = $computers | measure

	# Output progress to screen
    $i++
    $numberofservers = $computers.count
    $ProgressName = $computer
    Write-Progress -Activity "Collecting NIC information" -status "Contacting $computer [$i out of $numberofservers].  Overall percentage complete:" -percentComplete ($i / $computers.count*100)

	# Check WMI connectivity

	$wmi = $null
	$wmi = Get-WmiObject -class Win32_ComputerSystem -ComputerName $computer -ErrorAction SilentlyContinue

	if ($wmi) 
		# Start query if WMI connectivity is true
		{
				#Connect to the Win32_NetworkAdapterConfiguration class using WMI
				$compnetworks = Get-WMIObject -computername $computer -Class Win32_NetworkAdapterConfiguration | Where-Object{$_.IPEnabled -eq $True}

				ForEach($compnetwork in $compnetworks) 
				{

					# Get which DNS Servers are used for queries
					$DNSServers = ""
					ForEach($Address In $compnetwork.DNSServerSearchOrder)
					{$DNSServers += $Address + "  "}		

					# Create object to collect elements

					$OutputObj = New-Object -TypeName PSObject -Property @{
										"Name" = $computer.ToUpper()
										"IP_Address" = $compnetwork.IPAddress
										"Register DNS ticked?" = $compnetwork.FullDNSRegistrationEnabled
										"DNS Servers" = $DNSServers
										"Network Connection" = $($compnetwork.GetRelated("Win32_NetworkAdapter")).NetConnectionId + " (" +  $compnetwork.Description + ")"

					} | Select-Object "Name","Network Connection","IP_Address","Register DNS ticked?","DNS Servers"

					# Convert to exportable format

					$OutputObj | %{$_.IP_Address = [string]$_.IP_Address}

					# Add item to report
					$report += $OutputObj	
				}
		# End query if WMI connectivity is true						
		}
	else
		# Unable to connect to WMI
		{
			# Create object to collect elements
			$OutputObj = New-Object -TypeName PSObject -Property @{
										"Name" = $computer.ToUpper()
										"Description" = "Unable to connect to remote WMI"
										"IP_Address" = "Unable to connect to remote WMI"
										"Register DNS ticked?" = "Unable to connect to remote WMI"               
										"Network Connection" = "Unable to connect to remote WMI"        
			} | Select-Object "Name","Network Connection","IP_Address","Register DNS ticked?","DNS Servers"

		# Add item to report
		$report += $OutputObj	

		# End unable to connect to WMI
		}
	}

# Output findings

$report | Export-Csv $FileLocation -Force -NoTypeInformation
clear
write-host "Done... results exported to" $FileLocation
December 9 2010

Add SRV record for Lync to Unix BIND DNS

Recently I need to add the _sipinternaltls SRV record for Lync to a DNS server running BIND on Unix (same process for _sipexternaltls). After reading through this article – http://www.linuxquestions.org/questions/linux-networking-3/howto-ms-active-directory-with-bind-on-linux-379377/ – I found that it wasn’t too hard – just needed to add the following line to the db.zonename file:

_sipinternaltls._tcp.danovich.com.au. SRV 0 0 5061 sip.danovich.com.au.

In my case I pointed the SRV record to an A record – sip.danovich.com.au that had the IP address of the internal Lync pool. I did it this way because otherwise you will get an error on your Lync client stating Lync cannot verify that the server is trusted for your sign-in address. Connect anyway?. More about this error here – http://www.confusedamused.com/notebook/780/.

Don’t forget to restart BIND so it reloads your DB file.