PPTP VPN (GRE) Broken After VMware vSphere 5.5 Upgrade? Switch the Sophos UTM VM to VMXNET3

You’d think upgrading VMware would be transparent to the guest operating system. Not with vSphere 5.5: it broke my PPTP VPN. Here’s how I fixed it.

I run a Sophos UTM 9 firewall as a VM appliance on VMware 5.5. It works great, but to get PPTP VPN (which relies on GRE) working again after the upgrade, I had to change the VM’s settings and swap its network adapters from E1000 to VMXNET3.

1. Change the Guest Operating System Type

In the VM properties, change the guest operating system from “Other Linux”:

VM guest OS set to Other Linux 64-bit

To “Red Hat Enterprise Linux 6”:

VM guest OS changed to Red Hat Enterprise Linux 6 64-bit

This lets you add virtual network adapters other than the E1000:

E1000 virtual network adapter

2. Remove the Existing NICs

VM with the existing network adapters removed

3. Re-add the NICs as VMXNET3

Adding a VMXNET 3 network adapter

When you’re done, the VM should look like this:

VM with VMXNET3 network adapters added

How to Configure Incoming Email in SharePoint 2010 with Exchange 2010 (Step by Step)

This guide continues setting up a SharePoint 2010 farm, focusing on configuring incoming email so messages are delivered straight into SharePoint document libraries and lists. When SharePoint 2007 was released, there was a lot of discussion and rumors around Exchange 2007 being the last version of Exchange to provide Public Folder support, and that SharePoint 2007 was going to be its alternative. Microsoft quickly changed its stance and continues to support Public folders in Exchange 2010. However, there still might be a number of compelling reasons why you would want to consider storing incoming email messages in SharePoint 2010 document libraries, instead of public folders.

In today’s post, I will provide you with a comprehensive step by step guide in configuring your SharePoint 2010 server in conjunction with Exchange 2010, to provide successful delivery of incoming email directly to your SharePoint Web Applications.

The environment

It consists of the following servers which would form a common basis in most large organizations.

  • Windows 2008 R2 server running Active Directory Domain Services
  • Windows 2008 R2 server running SQL 2008R2
  • Windows 2008 R2 server running SharePoint 2010 RTM
  • Windows 2008 R2 server running Exchange 2010 RTM
  • Windows 7 client running Office 2010 RTM

The SMTP service

SharePoint 2010 is reliant on the SMTP service which is a Windows 2008 feature and we must install this on our SharePoint 2010 front-end web server.

Navigate to your Start Menu / Administrative Tools / Server Manager. Click on the Features node and select Add Feature. Scroll down and select SMTP Server and click on Add Required Role Services.

image_thumb1

Click Next, Next and Install.

image_thumb2

Click Close

We now need to install the IIS 6.0 Management Tools on our Windows 2008 R2 server in order to configure our SMTP service. If IIS 6.0 Manager is not already installed you must do so via, Start / Administrative Tools / Server Manager. Click on the Roles node and select Role / Add Role Services. Then select Management Tools and IIS 6 Management compatibility. Click Install.

We can now launch the IIS 6 Manager via Start / Administrative Tools.

image_thumb3

Right click on SMTP Virtual Server #1 and select properties.

Under the General tab, I have enabled logging and encourage doing so at the start in the event we need to do some troubleshooting. You can turn logging off after successful testing.

image_thumb4

Click on the next tab, “Access”.

Click on “Authentication” and ensure that Anonymous access is selected.

image_thumb5

Next, click on “Connection” and ensure “All except the list below” is selected.

image_thumb6

Finally, click on “Relay”, and ensure that “Only the list below” is selected and that “Allow all computers which successfully authenticate to relay, regardless of the list above” is also checked.

image_thumb7

Now click on the Messages Tab and make any necessary adjustments that you see fit, such as potentially increasing the message size to allow for the delivery of larger emails with attachments into your SharePoint Libraries and Lists.

image_thumb8

Next click on the Delivery Tab in which I normally leave all the defaults in place.

image_thumb9

We can skip the LDAP routing tab as there are no settings required to be configured in this area.

Lastly, the Security tab should list the default permissions as per the below. No changes are necessary in this area.

image_thumb10

Next, open the “Domains” area within IIS 6 Manager and a domain name should be listed, which by default is the fully qualified domain name of the machine.

Right click on the Domain Name and select properties and take note of the Drop directory.

image_thumb11

Finally, we now just need to confirm that our SMTP service is set to start automatically in the event the server is restarted. I can tell you now that the service is by default set to Manual.

Venture into Start / Administrative Tools / Services.

Scroll down your list of services and ensure that the Simple Mail Transfer Protocol (SMTP) is set to Start-up type, Automatic.

image_thumb12

We have now completed the configuration of our SMTP service on our SharePoint Server.

Exchange 2007/2010 Connectors

Part two of the implementation of configuring incoming email in SharePoint is to configure our connectors in Microsoft Exchange. Now even though this is not a requirement, most organizations running SharePoint 2010 or 2007 will also be running a recent version of Microsoft Exchange, hopefully either 2007 or 2010. Exchange 2010 or 2007 will provide you with that extra layer of protection ensuring that all the necessary message hygiene has been performed via its inbuilt Anti Spam Agents on the Edge or Hub Transport Server in conjunction with some form of email antivirus such as Microsoft’s Forefront for Exchange, before the message is delivered to the SharePoint 2010 List or Library.

My instructions and screen captures below are from an Exchange 2010 server which are pretty much identical and applicable to Exchange 2007.

Let’s begin by launching the Exchange Management Console / Organization Configuration / Hub Transport.

Click on Send Connectors / Actions / New Send Connector.

Type in a descriptive name for your Send Connector and then select Internal as the type.

image_thumb13

Click Add and enter the Address space as the fully qualified domain name of the server where the SMTP service is installed (i.e. your SharePoint Server)

image_thumb14

Click Next

Enter the IP address of the server which also hosts the SMTP service.

image_thumb15

Click Next

Select “None” as your smart host authentication settings

image_thumb16

Click Next

Ensure your Hub Transport Server has been added.

image_thumb17

Click Next

image_thumb18

Click New and then click Finish

The end result will be that the Send connector will route email to the SMTP service sitting on our SharePoint Server.

image_thumb19

The Directory Management Service

SharePoint 2010 allows you to leverage Active Directory Domain Services (AD DS) so that contacts that are created when you email enable document libraries or lists are stored in a designated Organizational Unit within your AD DS infrastructure. So why would you want to enable Directory Management Service? Purely for the fact that by storing these contacts in AD, you are allowing your users to locate email enabled libraries and lists easily from within their Outlook Address book.

Let’s begin by creating an Organizational Unit in Active Directory.

From your Active Directory server, click Start / Administrative Tools / Active Directory Users and Computers.

Right click on your domain object and select New / Organizational Unit

Type in a descriptive name

image_thumb20

Click Ok.

The next step is imperative and very important that we get this right. I have seen on many occasions where incorrect permissions were applied and all sorts of problems were encountered when libraries or list were email enabled.

In summary, we need to provide our Central Administration Application pool identity account specific permissions to our recently created Organizational Unit to be used for creating and deleting contacts for our SharePoint 2010 libraries and lists when they are either email enabled or email disabled.

Right click on the recently created Organizational Unit and click on Delegate Control. This will invoke the Delegation of Control Wizard.

image_thumb21

Click Next.

We will now add the Central Administration application pool account which you can confirm from IIS Manager as per the below screen capture.

image_thumb22

Add the necessary Account.

image_thumb23

Click Next.

Click Create a custom task to delegate.

image_thumb24

Click Next

Click “This folder, existing objects in this folder, and creation of new objects in this folder’.

image_thumb25

Click Next

Click on Create All Child Objects and Delete All Child Objects.

image_thumb26

Click Finish.

Before we finish off our configuration of AD DS and the Directory Management Service we need to provide our Central Administration application pool account with Delete Subtree permissions.

We need to ensure that “Advanced Features” from within Active Directory Users and Computers (ADUC) is active before we venture into the security tab of our SharePoint organizational unit. If you do not enable Advanced Features, the security tab will not be visible.

From within ADUC, click on View and select Advanced Features.

Right click on our SharePoint 2010 Organizational Unit and select Properties.

Click on the Security Tab / Advanced /and Edit the CA Application Pool Identity Account.

image_thumb27

Select Allow for “Delete Subtree”

image_thumb28

Click on OK and Apply.

After assigning these permissions, you must run IISRESET on your SharePoint server.

Configuring Incoming e-mail settings in Central Administration

Navigate to Central Administration / System Settings / Configure incoming e-mail settings.

image_thumb29

Select Yes to “Enable site on this server to receive e-mail”

Select “Automatic” for Setting mode.

Select “Yes” to use the SharePoint Directory Management Service to create distributions groups and contacts.

Enter your Active Directory container details, i.e. the Organizational Unit container that we created specifically for our SharePoint 2010 contacts.

Ensure that your SMTP server details are correct, this should be the fully qualified domain name of your SMTP service that was installed on your SharePoint Server.

image_thumb30

Finally, ensure “Accept mail from all e-mail servers” is selected.

image_thumb31

Click OK.

Please note that this process will configure the necessary permissions on the email drop folder listed in IIS 6 Manager. In summary, the following permissions are added;

WSS_Admin_WPG – Full Control and

WSS_WPG – Read & Execute / List folder Contents / Read

image_thumb32

Ensure that these accounts are added successfully and on the rare occasion in which it isn’t, you will need to add them manually.

Testing the configuration

From within any document library or list, click on Library / Library Settings.

image_thumb33

Click on Incoming e-mail settings.

Select “Yes” to allow this document library to receive e-mail.

Select your email attachment options and ensure that Save original e-mail is set to Yes.

Lastly, ensure that you Accept e-mail messages from any sender is selected.

image_thumb34

Click OK.

This is your first step to ensure that all of the above configuration is in place. If you do receive an error, it’s most likely going to be permissions related against your Organizational Unit, i.e. SharePoint may not have the privilege to add the contact in Active Directory.

Let’s navigate back to ADUC and confirm that our “testing” contact is created under the SharePoint 2010 Contacts Organizational Unit.

image_thumb35

Let’s next navigate to our Exchange 2010 server and ensure it is also listed there with an SMTP address against it.

Launch your Microsoft Exchange Management console and navigate to Recipient Configuration / Mail contact.

image_thumb36

Right click on the Contact and select Properties / E-Mail Addresses.

Ensure that both an internal and external routable email address is listed.

image_thumb37

From your favorite email client, send a test email to the document libraries’ external SMTP address.

Navigate to your recently email enabled document library and hopefully after a couple of minutes (SharePoint Job timer service delay) you should have received your test email.

image_thumb38

Well! That’s all that is to it, from start to finish. Apart from sending a test email, there are a couple of other scenarios that you should test to ensure complete seamless integration with the SharePoint 2010 Directory Management Service. Within the same document library, modify the email address to something different and ensure that this change also flows through to Active Directory. You should also try disabling incoming email from that same library and ensure that the contact is completely removed from Active Directory. If you pass all of these tests scenarios, then we are comfortable in knowing that the correct delegation was provided to our Central Administration Pool Account against our SharePoint Contacts Organizational Unit.

Shrink the Windows Page File on VMs with a Group Policy Registry Preference

I run a lot of virtual machines on a tight budget with thin-provisioned storage, so wasted disk space bothers me. A large default page file on every Windows VM adds up quickly. To keep it in check, I set a fixed page file size with a registry preference in my “Server Optimization” GPO.

GPO Location

Computer Configuration
  Preferences
    Windows Settings
      Registry

Registry Item Settings

ActionUpdate
HiveHKEY_LOCAL_MACHINE
Key pathSYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
Value namePagingFiles
Value typeREG_MULTI_SZ
Value datac:\pagefile.sys 1000 1000

The value data sets the page file on C: to a fixed 1,000 MB (initial and maximum size). On the Common tab, I leave all options (stop processing on error, remove when no longer applied, apply once) set to No.

Slap that in your GPO, and the change takes effect after the next Group Policy refresh and reboot.

Group Policy Security Tip: “Do Not Display Last User Name” at Logon

One Group Policy setting I always enable is Interactive logon: Do not display last user name. If the logon screen shows the last user name, you’re handing anyone at the keyboard half the credentials they need.

Where to Find the Setting

Computer Configuration
  Policies
    Windows Settings
      Security Settings
        Local Policies
          Security Options
PolicySetting
Interactive logon: Do not display last user nameEnabled

Link the GPO to the OUs containing your servers and workstations, and users will have to type both their user name and password at logon.

Fix Exchange 2010 Event ID 1020: “Provided Valid Credentials, but Is Not Authorized”

Exchange Server 2010 administrators often run into this error:

The account 'Domain\Administrator' provided valid credentials, but is not authorized to use the server; failing authentication.
Event ID: 1020

What It Means

The account is missing permissions on the receive connector. Specifically, it doesn’t have the ms-Exch-SMTP-Submit right on the Hub Transport or Edge Transport server that hosts the receive connector, even though it may be allowed to use that connector for inbound messages.

Receive connectors are assigned predefined permission groups, which grant sets of permissions to users, computers, and security groups. Those groups determine who can submit messages through the connector. In Exchange 2010 the predefined permission groups can’t be modified and you can’t create new ones, so the fix is to grant the right directly.

How to Fix It

Open the Exchange Management Shell and list your receive connectors, noting the identity of the one on the affected server:

Get-ReceiveConnector

Check the user’s current permissions on that connector:

Get-ReceiveConnector -Identity "SERVERNAME\Default SERVERNAME" | Get-ADPermission -User UsernameHere | Format-Table -View User

Grant the submit permission:

Add-ADPermission -Identity "Default SERVERNAME" -User Username -ExtendedRights ms-Exch-SMTP-Submit

If that doesn’t solve it, use the Exchange troubleshooting tools available from the Exchange Management Console to dig further.

Using Sysprep Instead of QuickPrep with VMware View Desktop Pools

Sometimes you need Sysprep instead of QuickPrep when creating a VMware View linked-clone desktop pool, usually because legacy software requires a unique local security identifier (SID) on every desktop. I was recently asked about it because an older antivirus product needed unique SIDs to centrally manage its in-OS agents.

The two customization methods are compared in the View Administration Guide (pages 95–96), and VMware KB 2003797 sums up the differences:

QuickPrep vs. Sysprep

FunctionQuickPrepSysprep
Removing local accountsNoYes
Changing Security Identifiers (SID)NoYes
Removing parent from domainNoYes
Changing computer nameYesYes
Joining the new instance to the domainYesYes
Generating new SIDNoYes
Language, regional settings, date, and time customizationNoYes
Number of reboots01 (seal & mini-setup)
Requires configuration file and SysprepNoYes

High-Level Steps

  1. Copy the Sysprep files to the vCenter Server. This is only needed for Windows XP; Windows 7 includes Sysprep. Details are in VMware KB 1005593.
  2. Create a guest customization specification in vCenter.
  3. Add a desktop pool that uses Sysprep with that customization specification.

Create a Guest Customization Specification

In vCenter, open Home → Customization Specification Manager, click New, and enter a name on the Properties page. Do not use a custom Sysprep answer file.

Customization specification Properties page in vCenter

Continue to the Computer Name page and set it to use the virtual machine name. Then enter your license key, administrator password, time zone, and so on until you reach the Network page.

Leave the network at the default Typical settings so the desktops use DHCP.

Network page set to typical settings (DHCP)

Leave the Workgroup or Domain page at its default. Anything entered here is ignored; the VM joins the domain using the guest customization settings in the View pool instead.

Workgroup or Domain page left at default

On the final Operating System Options page, make sure Generate New Security ID (SID) is checked. Unique SIDs are the whole reason we’re using Sysprep. Then finish the wizard.

Generate New Security ID (SID) option checked

Add the Desktop Pool

In View Manager, add a desktop pool as usual. The only difference from QuickPrep is on the final Guest Customization page:

  • Select the Domain. This list (usually just one entry) comes from the domains you defined for View Composer when you configured vCenter in View Administrator. It controls which domain the linked clones join and which credentials are used.
  • Select the Active Directory container as normal.
  • Choose Use a customization specification (Sysprep) and select the spec you created.
View pool Guest Customization page using a Sysprep customization specification

Finish the wizard and the pool will deploy. Provisioning is a bit slower than with QuickPrep because each linked clone needs an extra reboot.

What Happens When View Customizes with Sysprep

  1. Once the linked clone disks are created, View Manager puts the VM into the Customizing state.
  2. View Manager calls the vCenter API customizeVM_Task to apply the customization specification.
  3. View Manager powers on the linked clone.
  4. Inside the guest, the View Composer Agent sees it’s starting for the first time and calls NetJoinDomain with the machine password cached on the internal disk.
  5. The machine is now joined to the domain.
  6. Sysprep runs inside the guest.
  7. The View Composer Agent waits for Sysprep to finish, then tells the View Agent customization is complete, and the View Agent notifies the View Manager server.
  8. View Manager powers off the clone and snapshots it in its customized state, which becomes the refresh point.
  9. View Manager marks the linked clone Provisioned. When powered on, it moves to Available.

How to Create a PKCS12 (.p12) Certificate for Sophos UTM 9 with OpenSSL

Sophos (formerly Astaro) UTM 9 imports certificates for its Web Application Firewall as PKCS12 (.p12) files. Here’s how to create one with OpenSSL, from private key to import.

Note: run these commands on a separate Linux or Windows machine with OpenSSL installed, not on the firewall itself.

1. Generate a Private Key

Pick an encryption algorithm and key length. Any of these work:

openssl genrsa -des3 -out <private key file name>.key 2048
openssl genrsa -aes128 -out <private key file name>.key 2048
openssl genrsa -aes256 -out <private key file name>.key 2048
openssl genrsa -aes256 -out <private key file name>.key 4096

2. Generate a Certificate Signing Request (CSR)

openssl req -new -key <private key file name>.key -out <csr file name>.csr

Follow your certificate authority’s requirements for the CSR fields. VeriSign, for example, wants no email address, challenge password, or optional company name.

3. Submit the CSR to Your Certificate Authority

If you copy and paste the CSR text, use Notepad or vi, never Microsoft Word, which can alter the formatting.

4. Create the PKCS12 File

openssl pkcs12 -export -in <certificate from your CA>.crt -inkey <private key file name>.key -out <your filename>.p12

If your certificate and key are PEM files instead:

openssl pkcs12 -export -in xxxx.pem -inkey xxxx.pem -out xxx.p12 -passout pass:newpassword -name "newname"

5. Import the PKCS12 File into Sophos UTM

  1. Go to Web Application Firewall → Certificate Management → New Certificate.
  2. Choose Upload, file type PKCS12, select your .p12 file, and save.

6. (Optional) Import the Intermediate CA

If your CA uses an intermediate certificate, go to Web Application Firewall → Certificate Management → Certificate Authority → Import CA and upload the verification CA as a PEM file.

Dell EqualLogic SAN Review: 5 Reasons I Trust It

I’ve used Dell EqualLogic PS Series storage for several years now. I’ve come to trust it completely, and its reliability lets me run a very relaxed shop. Here’s why I recommend it.

  1. Backward compatibility. All EqualLogic arrays work together, old and new.
  2. Easy replication. Setting up replication between arrays is a snap.
  3. Automatic load balancing. Mix and match different drive arrays in a group and the data levels itself out across them. You can’t beat that.
  4. Dual controllers in every array. It’s not cheap, but the redundancy and scalability are outstanding.
  5. Ease of use. The configuration interface is extremely intuitive. Anyone can manage it.

More EqualLogic tips: updating EqualLogic disk firmware with no downtime and installing the EqualLogic MEM on ESXi.

Dell PowerEdge R815 Review: Why It Makes a Great VMware vHost

The Dell PowerEdge R815 is my go-to 2U server for VMware virtualization hosts. Here’s why.

  1. Excellent airflow and serviceability. Between the redundant fans, the power supply layout, and the way the RAM is arranged, the whole chassis is laid out well and easy to work on.
  2. No spinning disks required. I order them with dual SD cards for ESXi and nothing else, and they’re good to go.
  3. Dual power supplies come standard.
  4. Expansion slots for extra network connectivity.
  5. Room to grow. You can order a “half RAM, half processor” configuration and expand later.
  6. AMD Opteron processors that, in my opinion, offer the best performance per watt on the market.

Running into iSCSI latency with the onboard Broadcom NICs? See my Broadcom driver fix for the R815.

SSH Slow to Log In? Fix the Reverse DNS Delay with UseDNS no

Ever SSH’d into a machine and waited far longer than you should for the session to start? It’s especially annoying with servers on your local network, or a VM on a virtual network, that should let you in instantly.

Why SSH Login Is Slow

The SSH server is trying to look up the hostname of the connecting client (a reverse DNS lookup), and that lookup is timing out, for example because the server can’t reach a nameserver or you’re offline.

Two Simple Fixes

Option 1: Turn off the DNS lookup. Add this line to /etc/ssh/sshd_config on the server, then restart sshd:

UseDNS no

Option 2: Add the client’s IP address and hostname to the server’s /etc/hosts file so the lookup resolves immediately.