About Me

My photo
JHC Technology is a Service Disabled, Veteran-Owned, Small Business based in the Washington, DC Metro area. Our primary focus is to offer customized solutions and IT consulting to our Commercial and Government clients. Our experts have a broad experience delivering and managing Microsoft Enterprise applications and Cloud and Virtualization Solutions, as well as mobilizing Enterprise data.
Showing posts with label How To. Show all posts
Showing posts with label How To. Show all posts

Monday, September 22, 2014

High Availability (HA) for NAT Instances

While working with a project that utilized an Amazon Linux NAT (network address translation) instance for outbound connections in redundant availability zones, I realized that a single NAT making egress requests for two Availability Zones (AZs) introduces a single point of failure.

A whitepaper written by Jinesh Varia outlines the steps required to implement a two-way monitoring high-availability (HA) failover NAT solution. He provides a script with a guide on how to replace necessary variables to give each NAT instance visibility of each other.

However, I wanted to provide insight into an issue I faced while testing this configuration. I found that when I would stop a NAT instance, it would not restart. The next steps were to see if any intended routing failover was occurring, which in fact was. Using the script below I was able to see the logs of nat_monitor.sh :

tail /tmp/nat_monitor.log

Troubleshooting led me to find out that the active NAT instance was unable to see the downed instance’s state due to two reasons.

The first is that the instances only had public IPs, not Elastic IPs (EIPs). EIPs stick to the instance when the instances are turned off and are visible to the API, so when you are making calls to a box that is turned off, you are still able to communicate with it.

The second is specified in a notation Jinesh made in his whitepaper (in Step 7). He makes it clear that the script works with tools version 1.6.12.2 2013-10-15.  He points out that if NAT_STATE isn’t updating, then to change "print $4;" on line 77 to "print $5;". It's because different versions of the tools output the ec2-describe-instances differently. Here’s the original Line 77:

NAT_STATE=`/opt/aws/bin/ec2-describe-instances $NAT_ID -U $EC2_URL | grep INSTANCE | awk '{print $4;}'`

This article was written January 30, 2014, and the tools have since been upgraded. While opening up a ticket with AWS to assist in troubleshooting the script’s output, the support engineer recommended to change “print $5”; to “print $6”; and the change produced the outcome I’d been seeking.

The script uses the API to see if the NAT box is "stopped". If it is, then it will start it. If it's not stopped, it will try to stop it and then loop back to the previous attempt to start it.

You will be able to successfully test this functionality by stopping an instance within the console and observe it restarting automatically after the threshold in the nat_monitor.sh configuration is met.


Rory Vaughan is a Cloud Engineer with JHC Technology. He can be reached at rvaughan (at) jhctechnology.com or connect with him on LinkedIn.

Tuesday, April 22, 2014

How to protect yourself from the HeartBleed Bug?

·       Change your passwords on a more regular basis
·       Sites such as Yahoo, Github, Netflix, Amazon, Paypal Cloudfront have issues new SSL certs for their sites (So these Sites should be good to go)
·        Contact the sites in which you provide some of your most sensitive/private information (financial or not) and ask questions about Heartbleed Bug.
o   Also make sure you ask what you can do to again PROTECT yourself.
Engineers and Admins with systems on AWS please refer to the following website(s) for more information…

* Red Hat: https://rhn.redhat.com/errata/RHSA-2014-0376.html
* Ubuntu: http://www.ubuntu.com/usn/usn-2165-1/

For more information about this vulnerability, please visit
* AWS Security Bulletin page: https://aws.amazon.com/security/security-bulletins/
* OpenSSL’s official advisory: https://www.openssl.org/news/secadv_20140407.txt
* The Heartbleed Bug: http://heartbleed.com/

Tuesday, February 18, 2014

Why use the Configuration Logging feature in XenApp 6.5?

The Configuration Logging feature allows you to keep track of administrative changes made to your server farm environment. By generating the reports that this feature makes available, you can determine what changes were made to your server farm, when they were made, and which administrators made them. This is especially useful when multiple administrators are modifying the configuration of your server farm. It also facilitates the identification and, if necessary, reversion of administrative changes that may be causing problems for the server farm.

Below I have provided step by step instructions on how to configure this feature in XenApp 6.5.

Step 1: Left click on "Start (push button)" in "Start"

Step 2: Left click on "Citrix AppCenter (menu item)" in "Start menu"



Step 3: Left click on "SOC Farm (outline item)" in "Citrix AppCenter" 


Step 4: Right click on "SOC Farm (outline item)" in "Citrix AppCenter"



Step 5: Left click on "Farm properties (menu item)"



Step 6: Left click on "Configuration Logging (outline item)" in "SOC Farm - Farm Properties"



Step 7: Left click on "Configure Database... (push button)" in "SOC Farm - Farm Properties"




Step 8: Left click on "Server name: (This will be the name of your SQL server)" in "Configuration Logging Database"


Step 9: The username specified must have db_owner permissions over the database in SQL.

Citrix recommended to use Windows authentication as it’s more secure than SQL authentication.


Step 10: Left click on "password (editable text)" in "Configuration Logging Database"




Step 11: Left click on "password (editable text)" in "Configuration Logging Database"



Step 12: Enter the password for the Windows account.




 Step 13: Left click on "Next > (push button)" in "Configuration Logging Database"





Step 14: Left click on "specify the database (editable text)" in "Configuration Logging Database"



Step 15: Specify the database created in SQL





Step 16: Left click on "Next > (push button)" in "Configuration Logging Database"




Step 17: Left click on "Open (push button)" in "Configuration Logging Database"



Step 18: left click on "No (list item)"


 Step 19: left click on "Next > (push button)" in "Configuration Logging Database"



Step 20: left click on "Test Database Connection (push button)" in "Configuration Logging Database"



Step 21: left click on "OK (push button)" in "AppCenter"



Step 22: left click on "Finish (push button)" in "Configuration Logging Database (4/4)" 



Step 23: left click on "Apply (push button)" in "SOC Farm - Farm Properties"



Step 24: left click on "OK (push button)" in "SOC Farm - Farm Properties"


Step 25: left click on "History (outline item)" in "Citrix AppCenter"




Step 26: User left click on "History (outline item)" in "Citrix AppCenter"





Step 27: User left click on "Yes (push button)" in "No Filters Specified"


Step 28: Once History is selected, choose “Get Log” under the Action column on the right hand side of the window.



Step 29: As you can see, now that Configuration Logging has been enabled changes made within the AppCenter, such as the publishing of Apps or changes to the permissions of applications or policies will be logged under the History option located within your Farm under XenApp.


David Cuevas is a Jr. Citrix Engineer for JHC Technology.  He can be reached at dcuevas (at) jhctechnology.com.

Tuesday, November 5, 2013

DIY, Cloud Style

Unless you’re actively working in the cloud technology space, you’re probably relying on those that are to provide you the cloud services you’ve come to depend on.  One of the biggest pieces of the move to cloud is the use of the cloud for backing up your data.  I know many people that either utilize their own external storage drives or pay a yearly/monthly subscription to backup info to an online vendor.

While an external drive is good, it’s not always there when you need it, and while an online vendor is an easy choice, what do you really know about them?  Can you trust the storage?  Can you trust that they’ll be in business?  Can you trust that they won’t make a mistake and delete your files?

For me, I decided that I wasn’t going to pay for an external drive, and there’s no reason for me to utilize an online vendor.  With Amazon Web Services and the free tier, I pay next to nothing for my small backup account.  This post will walk through the ease of using AWS’s Simple Storage Service (S3) to back up your own information and cut out the expensive hardware and expensive middle man.

If you haven’t done so already, create an AWS account by going to http://aws.amazon.com and clicking “Sign Up”.
  1. Once you have your account created, go to the AWS Management Console.  Select S3.  
     
  2. From the S3 Dashboard, select Create Bucket.  (Note:  an S3 Bucket is simply a container for your files.  Within Buckets you can have Folders to help organize information.)  
     
  3. Once you’ve created the bucket, you will be prompted to enter a name.  Keep in mind that this name is not simply unique to your account, which means you won’t be able to go generic.  You may have to enter a couple of names to find one that works.  I ended up with “demo-test-1” as my bucket name, as an FYI.  As you can note, you also get to select the region in which to store your data.  
     
  4. Once you’ve named your Bucket, click Create (You can also set up logging for the bucket, if you’d like).
  5. You will now have your bucket listed on the S3 dashboard.  
      
  6. Access the bucket by clicking the Bucket name.
  7. You can create folders by clicking on the Actions dropdown and selecting Create Folder.  Simply type the folder name in the line that appears.
  8. To upload a file or files, click Actions, then select Upload.  
      
  9. You will then be prompted to select your files.  Click Start Upload when finished selecting your files.  
      

By default, the S3 bucket is accessible only to the user account that created the bucket.  In order to make the bucket available to others, permissions will have to be assigned via AWS Identity and Access Management users or through other permissions that open availability to the public.

Matt Jordan is the Cloud Services Manager for JHC Technology.  He can be reached at mjordan@jhctechology.com, @matt_jhc, or connect with him on LinkedIn.


Tuesday, October 29, 2013

Enabling MFA on your AWS account

One of the key components to cloud security and a question we hear all the time is around the use of multi-factor authentication (MFA).  Implementing MFA is considered more secure than a simple user name and password, because it requires anyone logging in to have something they know (user name and password) and something they have (MFA device). 

Implementing MFA on the Root Account is even more important to ensure the integrity of the entire environment.  JHC Technology always recommends protecting the Root Account.  To do this, we create various security groups and users under the Root Account.  Access is then controlled by the security groups and IAM users.  For more on IAM and assigning permissions, please click here.

MFA devices can either be physical or virtual.  For this entry, I’m going to walk you through the steps to implement an Android virtual MFA with an Amazon Web Services (AWS) account.

This entry does not cover the creation of an AWS account.  If you haven’t created an account, visit http://aws.amazon.com.  Before we get started, it’s also important to have downloaded and installed two applications:  AWS Virtual MFA and ZXing Barcode Scanner (both are free).  Before beginning, I highly encourage the review of the MFA FAQs, located here.

Let’s get started:
  1. Sign in to your AWS Account:   
  2. Select IAM from the Management Console.  
  3. Under Security Status, you will see that the Root Account MFA is Disabled.  Click on “Manage MFA Device”.  
  4. We are activating a virtual MFA device.  Ensure this option is selected and click Continue.  
  5. Since we have already installed the AWS MFA-compatible application, select Continue.   
  6. You will be prompted by the following screen, which is where you need to utilize your Virtual MFA Device.  Do not close this window.  
  7. Launch the AWS Virtual MFA from your Android device.
  8. Click on your device’s menu button and select Scan QR Code.
  9. Once this code is scanned, it will present your associated account on the MFA application.
     
  10. Now you are prepared to finishing authorizing your device.  Looking back at your browser window, you will see that in order to synchronize the device, you need to enter two consecutive Authentication Codes.  You will use your Virtual MFA to generate these codes.
  11. Tap the account name on your Virtual MFA.  It will generate a six digit code such as this:    
  12. Enter this code into Authentication Code 1 in your browser.  
  13. Tap your account name on the Virtual MFA to generate another six-digit code. If it’s the same code, you’ll need to tap the name again until the code changes.  Keep in mind that the codes need to be consecutive, so you can’t wait five minutes in between entering codes.  
  14. Once you generate the next code, enter that into the browser under Authentication Code 2.  Once you’ve done this, select Continue.
  15. If you have entered the consecutive codes appropriately, you will get validation.  Click Finish.  
  16. Now you need to test the MFA authentication.   
  17. Logout of your account.
  18. Begin the process of signing back into your account.  Once you have entered your associated email address and password, you will be prompted by a second screen.  
  19. Open your Virtual MFA application and tap the associated account.  This will generate your six-digit code to enter.  Enter that number in the Authentication Code field and then click the link to sign-in.
Setting up MFA on your root account is a security best practice that is monitored by AWS’s Trusted Advisor (available to customers with Business Level support) and to third-party products such as CloudCheckr.

A few additional notes:

Matt Jordan is the Cloud Services Manager for JHC Technology.  He can be reached at mjordan(at)jhctechnology.com, @matt_jhc, or connect with him on LinkedIn.