VMware ESXi 5.x Disable Shell Warning

vmware-logo

Cluster warning for ESXi shell and SSH appear on ESXi 5.x host

This is not something you should do unless you want to “hide” the error message when having the ESXi shell and SSH enabled for ESXi 5.x.

I removed the error messages in my test environment as I know no one is going to connect to the shell, this might be different in corporate enterprise environments.

References:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2003637

To disable these warnings using vSphere Client:

  1. Select the ESXi host from the Inventory.
  2. Click the Configuration tab.
  3. Click Advanced Settings in the Software menu.
  4. Navigate to UserVars > UserVars.SuppressShellWarning.
  5. Set the value from 0 to 1.

Click OK

 

To disable these warnings using esxcli:

  1. Connect to the ESXi host through SSH using root credentials.
  2. Run this command:
esxcli system settings advanced set -o /UserVars/SuppressShellWarning -i 1

To enable these warnings using esxcli:

  1. Connect to the ESXi host through SSH using root credentials.
  2. Run this command:
esxcli system settings advanced set -o /UserVars/SuppressShellWarning -i 0

To disable SSH and warning using vSphere Web Client:

Disable remote access to the ESXi 5.x host

  1. From the vSphere Web Client, select vCenter from the Home menu.
  2. Select Hosts and Clusters under the Inventory Trees.
  3. Expand the tree in the left pane of the vSphere Web Client.
  4. Click the ESXi host with the yellow exclamation and click the Manage tab.
  5. Click Settings and highlight Security Profile.
  6. Scroll to Services and click Edit.
  7. Highlight ESXi Shell and click Stop.
  8. Repeat for SSH, then press OK.

Disable the Warning message

  1. From the vSphere Web Client, select vCenter from the Home menu.
  2. Select Hosts and Clusters under the Inventory Trees.
  3. Expand the tree in the left pane of the vSphere Web Client.
  4. Click the ESXi host with the yellow exclamation and click the Manage tab.
  5. Click Settings and highlight Advanced System Settings.
  6. Locate the parameter UserVars.SuppressShellWarning and click the pencil icon to edit.
  7. Change the value to 1 and press OK.

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.

HP Microserver N40L Memory Compatibility

HP-Logo HP Microserver N40L

N40L comes with 1x2GB ECC RAM installed. It will accept up to 2x8GB (16GB total) 240-Pin DDR3 SDRAM 1333 (PC3 10600) RAM.

Non-ECC RAM is compatible, but not recommended for mission critical servers. Most casual, NAS or home server systems do not require ECC RAM.

If using ECC RAM, ensure it is not Registered as the N40L will not boot (VGA, POST or ‘blue light’.

N40L is capable of utilising dual channel RAM, which results in marginally increased memory speeds when two matched DIMMs are installed.

Ensure that RAM modules do not have large heat-sinks protruding from the top (clearance approx. 40mm from slot to chassis).

Ram modules known to work with the N40L: 

Brand

Model

Config

A-DATA non-ECC 8GB Kit AD3U1333C4G9-2 1×8
AMD Entertainment Series AE34G1339U2 (4GB) 1×4
Corsair CT2KIT51272BA1339
Crucial Non-ECC 16GB Kit CT2KIT102464BA1339 2×8
Crucial ECC 8GB Kit CT2KIT51272BA1339 2×4 ECC
Crucial ECC 8GB Kit CT1508549 2×4 ECC
Crucial ECC 4GB Kit CT1508551 2×2 ECC
Crucial ECC 4GB Module CT1508550 1×4 ECC
Crucial ECC 2GB Kit CT1508553 2×1 ECC
Crucial ECC 2GB Module CT1508555 1×2 ECC
Crucial ECC 1GB Module CT1508559 1×1 ECC
G-Skill Value Series 8GB GS-F3-10600CL9D-8GBNT 1×8
G-Skill Value Series 4GB GS-F3-10600CL9S-4GBNT 1×4
G-Skill Ripjaws X Series F3-12800CL9D-8GBXL 1×8
GeIL Evo Leggera PC3-10666 1333 MHZ CL 9-9-9-24 2x8GB Dual-Channel Kit GEL316GB1333C9DC 2×8
Integral PC3-10600 DDR3 PC Memory – 8GB DIMM RAM 35665 1×8
Kingston ECC 16GB Kit KVR1333D3E9SK2/16G 2×8
Kingston 2x8GB DDR3 1600 ECC KVR16E11/8I 2×8 ECC
Kingston 2x8GB DDR3 1600 ECC KVR16E11/8 2×8 ECC
Kingston 2x8GB DDR3 1333/PC310600 ECC KTH-PL313E/8G 2×8 ECC
Kingston 8GB DDR3 1333Mhz CL9 non-ECC KVR1333D3N9/8G 1×8
Kingston 4GB DDR3 1333/PC310600 ECC KTH-PL313E/4G(NOT KTH-PL313/8G) 1×4 ECC
Kingston 2GB DDR3 1333/PC310600 ECC KTH-PL313ES/2G 1×2 ECC
Kingston 2GB 1333MHz DDR3 Non-ECC KVR1333D3S8N9/2G 2×2
Kingston HyperX Blu 16GB Kit 1600MHz 240-pin DDR3 Non-ECC CL10 Desktop Memory KHX1600C10D3B1K2/16G 2×8
Kingston HyperX 4GB 1600MHz 240-pin DDR3 Non-ECC CL9 Desktop Memory KHX16C9X3/4 1×4
Kingston KVR1333D3N9/2G 1×2
Kingston KVR1333D3N9/4G 1×4
Kingston ECC KVR1333D3E9S/8G 2×8 ECC
Kingston KHX1333C9D3B1K2/8G 1×8
Kingston Value Ram 4gb KVR1333D3E9SK2 1×4
PNY Optima MD8192KD3-1333 2×4
Samsung M378B5773CHO 2×2
Super Talent DDR3-1333 8GB ECC Micron Chip Server Memory W1333EB8GM 1×8 ECC
Teamgroup 1333MHz 240-pin DDR3 Non-ECC CL9 Memory TED316G1333HC9DC 2×8

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.

Install WordPress on Microsoft IIS with Microsoft SQL 2008 Database Backend

wordpress-logo-stacked-rgb

Okay, so I struggled to get this going so I thought my very first blog post should attempt to help other people trying to host their own WordPress blog on IIS with a Microsoft SQL backend database server.

The problem came trying to get IIS to talk to the database server, the rest of the installation was easy, I will go into a lot of detail when I get to that part of the installation guide.

Under normal circumstances I would recommend installing WordPress on Apache with a MySQL database backend server, however, I have other hosted services on IIS *that could only be hosted on IIS* and already had a MSSQL database backend for other services and didn’t want to have multiple database servers of different flavors and I didn’t want to use a spare public IPv4 IP just for WordPress.

This guide is how to install WordPress on a Microsoft Server 2008 R2 IIS 7.5 server with a separate Microsoft Server 2008 R2 server with Microsoft SQL 2008 R2 database server.

Servers

Assumptions: Two Microsoft 2008 R2 servers on the same LAN subnet.

Register domain and point the A records to your hosting server

This should be obvious but I thought I would mention this just in case, you can register domains from many different suppliers around the world; I am not going to go into detail about that. Pointing the A record to your hosting server just comes down to logging into the control panel of the registrar you purchased the domain from and changing the A record to the public IP address of where you have your hosting server.

Configuration of IIS 7.5

There are some prerequisites that need to be installed on IIS, the steps are as follows:

  • Add the IIS Web Server Role on your server, when installing the role you will be prompted to install the .Net 3.5 Framework as it is a dependancy.

Installing IIS Role

Open up “Server Manager”, select “Roles” on the left hand side and select “Add Roles”.

MS - Add Role - IIS - 1

Select “Web Server (IIS)” and click “Next”.

MS - Add Role - IIS - 2

Click “Next”.

MS - Add Role - IIS - 3

Add services “CGI” under “Application Development”.

MS - Add Role - IIS - 4

Confirm Installation Selections and click “Install”

MS - Add Role - IIS - 5

Click “Close” and restart the server

MS - Add Role - IIS - 6
  • Install the Microsoft Visual C++ 2008 Redistribute Package; you can download it from here. Check in Add/Remove programs whether it is installed if you are not sure.
  • Install the latest version of PHP, download it from here or download an older version of PHP from here. I used the non-thread safe version. The difference between the non-thread safe and thread safe is basically to increase performance alongside the FastCGI protocol setup in IIS; you can read more about it from here. As of the 17th of April 2013 there is PHP version 5.4.16 as the latest version but it has no “Installer” so I used PHP 5.3.26 VC9 x86 Non Thread Safe (Installer) @ 45.74MB.

 Installing PHP 5.3.26

Click “Next”

Install PHP - 1

Click the tick box “I accept the terms in the license agreement” and click “Next”

Install PHP - 2

Browse to a location you wish to install. I left this as standard.

Install PHP - 3

Select “IIS FastCGI” and select “Next”
FastCGI for IIS enables popular application frameworks that support the FastCGI protocol to be hosted on the IIS web server in a high-performance and reliable way. FastCGI provides a high-performance alternative to the Common Gateway Interface (CGI). CGI is a standard way of interfacing external applications with Web servers that has been supported as part of the IIS feature-set since the very first release; you can read more about it here.

Install PHP - 4

If you get the following error message, you have done it wrong. Please read my instructions above

Install PHP - 5

Install all components under “Script Executables” Option: Install all Extras if you want too. I installed LDAP extensions (not that it is needed for this but I might need it as I have a separate LDAP server).

Install PHP - 6

Click “Install”

Install PHP - 7

Installing SQL Native Client

Download the SQL Native Client 2.0, you can download it here
Create a desktop folder called “SQL Native Client 2.0 Extract”

Click “Yes”

SQL Native Client - 1

Click “Browse”

SQL Native Client - 2

Browse to the folder you just created on your desktop and click “OK”

SQL Native Client - 3

Click “OK”

SQL Native Client - 4

The following files should be extracted

SQL Native Client 5Copy the following files into the “ext” folder where the PHP was installed.

php_pdo_sqlsrv_53_nts_vc6.dll
php_pdo_sqlsrv_53_nts_vc9.dll
php_sqlsrv_53_nts_vc9.dll
php_sqlsrv_53_ts_vc9.dll

SQL Native Client 7

 Install PHP Manager

There are some PHP modifications to do; the best and safest way to do this is by downloading and installing PHP Manager. You can download it here
You will need to restart the server for PHP Manager to be available

Creating the site in IIS

Create a folder you wish to host your website in, for this example I am going to use:

Create Website IIS 0.9

Open up Server Manger on the IIS server

Expand Roles -> Web Server (IIS) and click on “Internet Information Server” on the left hand side

Expand the server on the left hand side and expand “Sites”

Create Website IIS - 1

Right click on “Sites” and select “Add Web Site”

Complete the following:

  • Fill in the “Site Name” field – I use the actual name, this helps identify the site
  • Browse to the physical path of the website – This is where you created the folder where you will hold the website files
  • Host Name: You must put the domain name of the website in here.
    If you want to resolve www at the begining you will need to add a second hostname
    eg: test.co.nz and www.test.co.nz
  •  Ensure “Start Web Site immediately” is selected
Create Website IIS - 3

Configuring PHP Manager

Open PHP manager

Configuring PHP Manager - 1

Once you open the Manager for the first time it should detect your PHP installation automatically depending on where you have installed it. If it does not simply use the “Register new PHP version” link to browse the php-cgi.exe and register your installation.

There will be a small warning about optimal configuration of PHP. Feel free to use the “View recommendations” link to sort this out and enable all the applicable recommendations. If there is a recommendation for the default document, you will need to actually change it under the website by opening “Default Document” and moving the .php extension to the top.

Configuring PHP Manager - 7

Now we can register our drivers for SQL. To do this click on the “Enable or Disable an Extension” link to open the configuration window.

Configuring PHP Manager - 2

Configuring PHP Manager - 3

Select each of the disabled files and click on “Enable” on the right hand side.

Configuring PHP Manager - 4

Configuring PHP Manager – Optional

PHP Logging

If the user in the application pool is not configured for access then the PHP logging won’t work, I recommend changing the error logging path of PHP, I changed mine to the PHP path itself (and created a new folder called “logs”).

Configuring PHP Manager - 5 Configuring PHP Manager - 6

URL Rewrite

We will need to install URL Rewriting on our IIS machine for use with WordPress Permalinks. Download it from here.

On a new machine you will be prompted to install the Web Platform Installer 4.5 before continuing. Install this and then re-try the URL Rewrite install. You will find that the Web Platform Installer takes over the install once it starts. Simply press next to everything and continue with the install.

Configuring SQL Server Database

The assumption is you already have a Microsoft 2008 R2 Server with SQL 2008 R2 installed and configured correctly.

Firstly we need to create our WordPress Database. To do this open your SSMS (SQL Server Management Studio) and right click on your Databases folder. Select New Database from the menu to begin.

SQL Database - 1

Give your database a name and leave all other options as default. Next we need to create our user to access our database from WordPress. To do this, expand your Security folder in your SSMS and right click on New Login option.

SQL Database - 2

Give your login a Name and set the password for the user. Make sure you unselect “User must change password at next login”

SQL Database - 3

Click on “User Mapping” on the left hand side. Select the database, ensure the username you just created is in the “User” field, and change the “Default Schema” to “dbo”.

Add the following database role memberships:

  • db_accessadmin
  • db_datareader
  • db_datawriter
  • db_ddkadmin
  • db_owner
  • db_securityadmin
  • public
SQL Database - 4

 Install and configure WordPress

Finally!

Download the IIS version of WordPress from here and extract the files from the compressed file.

Copy the WordPress files to the location you created to store your website files.

Once you have extracted the WordPress site set the permissions for the IUSR user on the WordPress root folder to be full control.

Folder Permissions

Create a web.config file in your WordPress root directory and paste in the following config text:

<?xml version=”1.0″ encoding=”UTF-8″?>
<configuration>
<system.webServer>
<httpErrors errorMode=”Detailed”/>
<rewrite>
<rules>
<rule name=”wordpress” patternSyntax=”Wildcard”>
<match url=”*”/>
<conditions>
<add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true”/>
<add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true”/>
</conditions>
<action type=”Rewrite” url=”index.php”/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

 Install “wp-db-abstraction” plugin

This plugin allows WordPress install and gives the option to connect to a database, the default installation page for WordPress doesn’t give you this option and attempts to connect to a MySQL database.

Download from the here and extract the compressed file to a folder and complete the following:

  • Upload the wp-db-abstraction.php and the “wp-db-abstraction” folder to “wp-content/mu-plugins” folder. This should be parallel to your regular plugins directory. If the mu-plugins folder doesn’t exist, you must create it.
  • Move the db.php file from inside the wp-db-abstraction folder to wp-content/db.php

Now we need to run the install wizard of WordPress and finish our Install.

To do this browse to the http://your domain/wp-content/mu-plugins/wp-db-abstraction/setup-config.php.

This will then prompt you with a configuration setup window for WordPress.

Click the “Let’s Go” button to move to the configuration page. This looks like a standard WordPress config page but this one has a DB Type field. Select the correct driver and enter in all the required information for the database and the user we created earlier. Then click submit.

At this point WordPress will be up and running and most blog posts end here and say “now you’re done”. Well actually that’s not true. What you will find is that all looks OK until you try and look at your Posts or Media lists.

You will notice that the counts say (1) but the number of posts showing is zero. This is because the current version of the WordPress DB Abstraction plugin ships with a bug. This bug is with a RegEx in the translations.php file. It adds a trailing “;” to some of the queries which causes SQL to fall over. To fix this browse to this file from your WordPress root folder.

Open up the translations.php in a text editor and go to line 726 in the file. Here you will find the RegEx line that needs to be changed. Download the file:

translations

And there you have it, a WordPress Blog on Microsoft IIS with a Microsoft SQL backend.

Cisco “Stop DNS Lookups in the Console”

cisco logo

Have you ever typed a command into the Cisco console incorrectly and left waiting for a minute or two as the router tried to “translate” your command to a domain server of “255.255.255.255”? The router is set by default to resolve any word that is not a command to a Domain Name System (DNS) serfver at address “255.255.255.255”. If you are not going to set up DNS, turn off this feature to save you time, stress and swear words.

1. Log into router

enable
configure terminal
no ip domain lookup
exit
copy running-config startup-config

Now type away, make a mistake, make many mistakes!Invaild Command

 

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.

Alternative Data Streams (ADS) on NTFS

An alternate data stream (ADS) is a feature of Windows New Technology File System NTFS that contains metadata for locating a specific file by author or title.

Alternative Data Stream support was added to the NTFS file system(Windows NT,2000,XP,7,8) to help support Macintosh Hierarchical File System (HFS) which uses resource forks to store icons and other information for a file. While this is the intended use there are other uses that should concern system administrators and security professionals.

Using Alternative Data Streams can easily hide files that can go undetected unless close inspection is done on the file.

This is classed as Steganography as it embeds data within data that is hard to detect, note I wrote an article about using Steghide which uses images or audio files to encrypt data within them and protected using a password, you can read about that here

Creating AltDS Text File

Making an AltDS is fairly simple and doesn’t require any application to be installed, just a Microsoft Windows operating system with an NTFS filesystem. Drop to a elevated command line and execute the following after “C:>”

Create Plain Text File

C:>echo Plain Text For A Normal File > text.txt

Embed Data to Plain Text File

C:>echo Password.or.what.ever.you.want.to.embed > secret.txt
C:>notepad text.txt:secret.txt

Note the size of text.txt did not increase in size

Data Loss

Don’t use this for critical data as backup software might not migrate the data when the copy occurs, also the data might not be recoverable should you try and recover data from a broken NTFS table.

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.