Larry Brouwer

... just my personal technology sandbox

  • About
  • Blog
  • Archives
  • Contact

Connect

  • Email
  • Facebook
  • LinkedIn

Powered by Genesis

configuring NTP Service on FreeNas, XenServer, and virtualized Windows Server 2012 R2 Domain Controller

April 8, 2016 By Larry Brouwer Leave a Comment

Resources used to complete the configuration:

FreeNAS

http://joepaetzel.com/2014/03/03/freenas-naughty-ntp/

 

XenServer

http://support.citrix.com/article/CTX121278
http://support.citrix.com/article/CTX116307

 

NTP

http://www.pool.ntp.org/zone/us
http://support.ntp.org/bin/view/Support/AccessRestrictions#Section_6.5.1.1

 

Windows Server 2012 R2

http://nefaria.com/2013/03/configure-windows-server-20082012-to-sync-with-internet-time-servers/

 

My network consists of 2 FreeNAS servers, and 3 XenServer virtualization servers (which run most of the Microsoft Server 2012 R2 servers, and 2 CentOS 7 machines), and several Windows 7, 8 and 10 clients.

After some consternation, I determined the best course of action was to set up one of the FreeNAS servers to be the primary NTP Server for the network, with the second FreeNAS Server acting as the secondary NTP Server.

Here’s the configuration changes I made to the primary FreeNAS server:

edit: /conf/base/etc/ix.rc.d/ix-ntpd

add the following line towards the end just above the “EOF”:

restrict 10.1.10.0 mask 255.255.255.0 nomodify notrap nopeer

Using the GUI, log in and navigate to System | General, then click on the “NTP Servers” button at the bottom right.

enter the following NTP servers:

0.us.pool.ntp.org
1.us.pool.ntp.org
2.us.pool.ntp.org
3.us.pool.ntp.org

reboot the box

On the Secondary FreeNAS Server, make the following changes:

edit: /conf/base/etc/ix.rc.d/ix-ntpd

add the following line towards the end just above the “EOF”:

restrict 10.1.10.0 mask 255.255.255.0 nomodify notrap nopeer

Using the GUI, log in and navigate to System | General, then click on the “NTP Servers” button at the bottom right.

enter the following NTP servers:

0.us.pool.ntp.org
1.us.pool.ntp.org
2.us.pool.ntp.org
3.us.pool.ntp.org
10.1.10.x –> IP Address of the Primary FreeNAS Server, make this a “Preferred” NTP Server

reboot the box

On each of the XenServer Servers, using XenCenter, log into the console for each and make the following changes:

Using “xsconsole”,

navigate to “Network and Management Interface”
navigate to “Network Time (NTP)”
log in as root
Remove All NTP Servers
Add the Primary FreeNAS Server’s IP Address
Add the Secondary FreeNAS Server’s IP Address
reboot the box

To verify that NTP is working correctly, log into the XenServer console and enter the following:

ntpq –p 10.1.10.x –> the Primary FreeNAS Server, you should get something like this returned:

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+y.ns.gin.ntt.ne 249.224.99.213   2 u   45   64    7   45.388   -2.965   1.896
+104.156.99.226  204.123.2.72     2 u   41   64    7   66.195    5.041   1.599
*clock.xmission. .GPS.            1 u   43   64    7   39.903   -1.483   2.415
time.tritn.com  198.60.22.240    2 u   40   64    7   51.294    1.535   1.984

ntpq –p 10.1.10.x –> the Secondary FreeNAS Server, you should get something like this returned:

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
+cheezum.mattnor 129.7.1.66       2 u   30  128  377   13.744   -7.718   2.658
+mdnworldwide.co 127.67.113.92    2 u   31  128  377   22.938   -8.589   0.869
-repos.lax-noc.c 206.117.25.20    2 u   41  128  377   50.227   -2.232   2.751
*freeNas.loc.com 198.60.22.240    2 u   73  128  377    0.188   -5.571   1.500
-snotra.fanube.c 132.163.4.102    2 u   66  128  377   54.298    1.640   4.002

 

On the Windows Server 2012 R2 primary domain controller, open a command prompt and enter the following:

 

w32tm /monitor
w32tm /query /status
net stop w32time
w32tm /config /syncfromflags:manual /manualpeerlist:”10.1.10.x, 10.1.10.x”
w32tm /config /reliable:yes
net start w32time
w32tm /query /configuration

Filed Under: Daily Log

PHP Random Key Generator

January 10, 2012 By Larry Brouwer Leave a Comment

Yesterday, I needed a way to generate a random alpha-numeric key of various lengths using PHP for a project that I’m currently working on. I didn’t find any built-in functions, so after some Googling, I decided to implement my own version.

[code type=PHP]

private function generateRandomKey($len)

{

$chars = array(‘1′,’2′,’3′,’4′,’5′,’6′,’7′,’8′,’9′,’0’,

‘a’,’b’,’c’,’d’,’e’,’f’,’g’,’h’,’i’,’j’,’k’,’l’,’m”

‘n’,’o’,’p’,’q’,’r’,’s’,’t’,’u’,’v’,’w’,’x’,’y’,’z’,

‘A’,’B’,’C’,’D’,’E’,’F’,’G’,’H’,’I’,’J’,’K’,’L’,’M”

‘N’,’O’,’P’,’Q’,’R’,’S’,’T’,’U’,’V’,’W’,’X’,’Y’,’Z’);

$min = 0;

$max – sizeof($chars)-1;

$key = “”;

for ($i=0; $i<$len; $i++) {

$key .= $chars[mt_ramd($min, $max)];

}

return $key;

}

[/code]

 

Let me know if anyone has a better suggestion?

Filed Under: Daily Log Tagged With: PHP

Installing OpenCart on Windows Server 2008

January 15, 2011 By Larry Brouwer Leave a Comment

Today, I’m attempting to install OpenCart, an open source ecommerce package. OpenCart was chosen as the runner-up of the 2010 Open Source Awards as published by Packt Publishing.

I first looked through the OpenCart Online Documentation. The most current stable release as of this writing is OpenCart v1.4.9.3. OpenCart requires PHP, and MySQL. I currently have both installed on my Windows Server 2008 platform. It should also work fine running  under Windows IIS 7.

As a side note, the OpenCart Tools section outlines some great suggestions for free tools. I use some of them, like Jing, others I’m excited to check out.

[Read more…]

Filed Under: Daily Log Tagged With: eCommerce, MySQL, OpenCart, PHP

Installing Google Analytics for WordPress

January 12, 2011 By Larry Brouwer Leave a Comment

I’ve been creating a new Web Site for one of my clients, Clear Lake Auto Service, using WordPress, and the client is wanting to see statistics regarding Web Site traffic. My first thought is to add Google Analytics to the site. Here are the steps I took to get analytics up and running for him.

First, I logged into the WordPress site, and installed the Google Analytics for WordPress v4.0.9.

Second, I created a new Google Analytics account under his Google mail id.

Third, I activated the WordPress plugin, selecting his new account. The plugin automatically verified the Account and Profile to use.

Forth, added my email account as an Administrator to the profile.

That’s it!

Filed Under: Daily Log Tagged With: Google Analytics, WordPress

Windows Live Writer 2011 Plug-ins

January 12, 2011 By Larry Brouwer Leave a Comment

I’ve been using Windows Live Writer to create my blog posts, and I’ve just stumbled upon the plugins site for Live Writer, here. I’ll add more to this post as I get more experience with them.

I’ve installed the following plug-ins:

Insert Code for Windows Live Writer

Code Snippet plugin for Windows Live Writer

Filed Under: Daily Log Tagged With: Live Writer

SmarterMail Exception System.OutOfMemory Exception Errors

January 12, 2011 By Larry Brouwer Leave a Comment

Today, I discovered that my SmarterMail is acting up again. When I attempted to check my emails, I get a really nice aspx error page.

My first thought is that someone has hacked my mail system, and is sending out spam again. I’ve had this problem before, and outlined the steps I undertook in order fix the problem in my post entitled, SmarterMail Security Lockdown Prodecures.

I shut down the SmarterMail Service and started looking at the mail logs, and event logs. I can see the out of memory errors, but I still don’t know what’s causing the problems.

I then restarted the SmarterMail Service and logged into my account to look at the reports being generated. There is nothing in the reports that are out of the ordinary.

[Read more…]

Filed Under: Daily Log Tagged With: SmarterMail

Installed Windows Azure tools for Visual Studio 2010

January 7, 2011 By Larry Brouwer Leave a Comment

I finally got around to setting up a Microsoft Azure service for doing some cloud test development this afternoon.

After logging into my MSDN account a activating my Azure service, I went into VS 2010 and installed the Windows Azure SDK and Windows Azure Tools for Microsoft Visual Studio (November 2010). There are several downloads available.

Filed Under: Daily Log Tagged With: Azure, Visual Studio

Copying Sql Server 2008 database from Prod to Dev

December 29, 2010 By Larry Brouwer Leave a Comment

I had the pleasure of refreshing the development instance of the Harris County Master Gardener’s database this morning. Basically, Dev was getting too old to conduct testing on, so took the most recent Production backup (from last night), and using MS SSMS I was able to restore the database without much incident.

However, my troubles then began when I attempted to pull up the Development Web Site. The application couldn’t connect to the database. I’ve had this type of thing happen in the past, but as usual, I’ve forgotten how to fix it.

After some researching on the Web, I came up with a Microsoft Support Article entitled, Troubleshooting Orhpaned Users, and I was able to fix the problem with relative ease. Look under the section “Steps to Resolve Orphaned Users”.

The following are the steps I undertook:

1. Using MS SSMS, connect to the Sql Server instance where the copied database exists.

2. Open a New Query window and enter: Use DataB go sp_change_users_login ‘report’

3. The stored procedure will display output for all of the affected login’s

4. Open a New Query window and enter: Use DataB go sp_change_users_login ‘update_one’, ‘test’, ‘test’ for each login.

That should fix the problem!

Filed Under: Daily Log Tagged With: SqlServer

Silverlight training downloads

July 13, 2010 By Larry Brouwer Leave a Comment

Installed Silverlight 4 Training

Installed Microsoft Silverlight 4 Offline Documentation

Installed WCF RIA Services Offline Documentation

Installed WCF RIA Services Toolkit May 2010

Installed Microsoft Silverlight 4 Tools for Visual Studio 2010

Installed Microsoft Silverlight PivotViewer

Installed Fiddler

Filed Under: Daily Log Tagged With: Silverlight

Windows XP Remote Desktop problems printing locally

July 12, 2010 By Larry Brouwer Leave a Comment

While setting up a client for remote desktop using Windows XP Pro to remotely access Windows Server 2008, I discovered that the clients local printers weren’t accessible by the server. After much Google searching, I discovered that (mstsc.exe) RDS 7.0 is now available for XP. This solves the problem with RDS Easy Print. The latest RDS 7.0 is available here.

Here’s a great post that describes Windows Terminal Services Easy Print in detail.

Good troubleshooting tips are provided at Remote Desktop Services troubleshooting.

Update. The client was able to initially print to the local printer after installing the update. However, it was not reliable and the printer did not always show up.

To solve the problem I actually physically connected the printer to the server and installed the drivers from the originally installation disk. The driver downloaded off the Canon website would not install without the printer being physically installed.

After doing this, the printing now works great from Server 2008 to Windows XP Home.

Filed Under: Daily Log Tagged With: mstsc.exe, Windows Remote Desktop

  • 1
  • 2
  • 3
  • 4
  • Next Page »

Recent Posts

  • Weaver’s Bamboo “Bambusa textilis” clumping bamboo for sale
  • configuring NTP Service on FreeNas, XenServer, and virtualized Windows Server 2012 R2 Domain Controller
  • CentOS 7 Warning: Your Magento folder does not have sufficient write permissions.
  • AOE Scheduler 1.3.0 cron issue with Magento 1.9.2.2

Tag cloud

iframe Scanpst.exe Google Analytics Linux Outlook 2007 eCommerce Database Mail AWStats DIR-655 Silverlight ASP.Net Yahoo Mail Neptune MySQL OpenCart Security .NET Framework OfficeLive Tools TomatoCart Maytag clumping bamboo Live Writer Port 25 C# SSMS DotNetNuke SmarterMail 301 Azure CentOS SMTP Log Parser WordPress mstsc.exe PST PHP Magento Windows Remote Desktop Outlook Connector Visual Studio Comcast SqlServer SSL D-Link