Archive for the ‘From the LAB’ Category

Apache logs and non-transparent load balancers

Typically, in a load balanced environment there are two types of modes that can be configured:

Transparent – Requests come into the load balancer and are transparently routed to the “real” servers behind it. In this setup, the real servers see the request as coming from the client IP address it was originally sent from. This typically requires all real servers to have it’s default gateway set as the load balancer.

Non-Transparent – In non-transparent mode, packets come into the load balancer, are re-written using NAT and then forwarded to the real servers behind it. In this scenario, all connections that come into the real servers appear to be originating from the load balancer.

If you are using any kind of analytics or stats software for your website, a load balancer in non-transparent mode will skew your data as all of your “hits” will appear to be coming from the same IP address (the load balancer). Fortunately, most load balancers have the ability to inject the “X-Fowarded-For” HTTP header into the request that makes it to the real server. This header will contain the original IP address which the request came from. We can use this information for more accurate website reporting.

Because of the flexibility of the Apache web server, we can alter what information goes into our log files. For example, if you wanted the client IP address field replaced with the X-Forwarded-For header data in your log files, you could add the following to your Apache configuration:

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy

SetEnvIf X-Forwarded-For “^.*\..*\..*\..*” forwarded
CustomLog “logs/access_log” combined env=!forwarded
CustomLog “logs/access_log” proxy env=forwarded

This basically says “if the X-Forwarded-For header exists, use that value as the first column in our log file…otherwise, use the remote host’s IP address”. RackWire now offers load balanced solutions. By default, we will setup our load balanced services in non-transparent mode. We recommend that all customers who use our load balancer follow the example above so their Apache log files reflect accurate data. If you have questions about our load balanced solutions, please contact us today!

Configure an interface for use with multiple VLANs in CentOS

Most network administrators are likely familiar with Virtual Local Area Network’s or VLANs.  VLANs allow several different networks to coexist on the same physical switch.  Let’s say you have two physical networks, one used for Internet traffic and an internal network used specifically for backup traffic.  In a non-VLANd environment, this setup would require two physical switches (one for the Internet and one of the backup network) and dual network cards on each host you wish to connect to both VLANs.

Using VLANs, one could setup a switch with multiple networks.  Typically a host would require one network interface for each network, or VLAN you wanted to connect it to.  In this article, I will describe how to configure a single network interface in CentOS to connect to multiple VLANs coming from a switch.

* Configuring your switch for VLANing is beyond the scope of this article and will not be covered here.  I would recommend checking the documentation provided by your hardware vendor for instructions on configuring your VLANs from a switch level.

Requirements

In order to configure your network adapter for VLAN, it is require your network driver supports VLAN.  If not, it may be necessary to patch your driver or upgrade your hardware.  You will also need to configure the interface on your switch to send tagged traffic (a trunk port) for each VLAN ID you want to connect to to the port that connects to your host.

Using vconfig to setup your VLANs

We have two networks we want to connect to:

VLAN ID 10:  Internet traffic
VLAN ID 20:  Backup network traffic

Add the VLANs:

vconfig add eth0 10
vconfig add eth0 20

This will create two virtual devices on eth0.  You can use ifconfig to see information on the device:

ifconfig eth0.10
ifconfig eth0.20

Now we can use ifconfig to set an IP address on our devices:

ifconfig eth0.10 1.2.3.4 netmask 255.255.255.0 broadcast 1.2.3.255 up
ifconfig eth0.20 192.168.1.11 netmask 255.255.255.0 broadcast 192.168.1.255 up

You can also view information on the virtual device / VLAN:

cat /proc/net/vlan/eth0.10
cat /proc/net/vlan/eth0.20

…and finally if you wish to remove the VLAN / bring down the virtual interface:

ifconfig eth0.10 down
vconfig rem eth0.10
ifconfig eth0.20 down
vconfig rem eth0.20

Windows 7 Backup Agent (Free 1GB Storage)

Microsoft Windows 7.0 comes with a robust built in backup agent.  The backup agent allows you to backup to multiple locations, and customize the files that you backup.  It even adds a built in Windows 7.0 Backup Scheduler utility.  It is a powerful backup tool that is well integrated into the Windows 7.0 Operating System.

Here is a How To Guide on using Windows 7.0 Backup Agent, with Screenshots.  You can even sign up for a FREE 1GB Windows 7.0 BackupSpace Account today!

Step 1. Go to Start -> Programs -> Maintenance -> Run “Backup & Restore”

 

Step 2. Once you Launch the Windows 7 Backup Agent, Click on the “Setup Backup”.

 

Step 3. Enter the Remote Storage Location, Username and Password.  This information can be found in your welcome e-mail or in the Service Details area of RackWire.com.

 

Step 4.  Next Step Choose your Backup Plan if you want to do a Custom Backup.

 

Step 5. Choose any Custom File Location that you might have setup on your PC, for Example C:/TurboTaxReturns, etc.

 

Step 6. Choose your Backup Schedule, I personally run my Backups every Sunday night or once a week.

 

Step 7.  I would manually run the backup process the first time and let it do a full backup of your PC, and confirm a sucessfull backup. 

 

And that is it!  Because Backing up your important files is so important, RackWire.com is offering 1GB of Free Windows 7.0 Backup Services for life with a $1.00 Setup Fee.  To get the Free Windows 7.0 BackupSpace, click here.

How to Access MS SQL on your Server 2008 VPS

If you have installed MS SQL or MS SQL Express on your Server 2008 VPS access to the Database is blocked by default on the Server 2008 Firewall.

To do this you need to do the two main steps:

Step 1. Configure the Database Engine to use a specific TCP/IP port. The default instance of the Database Engine uses port 1433, but that can be changed. Instances of SQL Server Express, SQL Server Compact 3.5 SP1, and named instances of the Database Engine use dynamic ports. To configure these instances to use a specific port, see How to: Configure a Server to Listen on a Specific TCP Port (SQL Server Configuration Manager).

Step 2. Configure the firewall to allow access to that port for authorized users or computers.

Microsoft has a Guide on Opening the Port on the Server 2008 Firewall (Port 1433 / 1434) for TCP Access: How to: Configure a Windows Firewall for Database Engine Access

Step 1. In Control Panel, open Network Connections, right-click the active connection, and then click Properties.

Step 2. Click the Advanced tab, and then click Windows Firewall Settings.

Step 3. In the Windows Firewall dialog box, click the Exceptions tab, and then click Add Port.

Step 4. In the Add a Port dialog box, in the Name text box, type SQL Server <instance name>.

Step 5. In the Port number text box, type the port number of the instance of the Database Engine, such as 1433 for the default instance.

Step 6. Verify that TCP is selected, and then click OK.

Step 7. To open the port to expose the SQL Server Browser service, click Add Port, type SQL Server Browser in the Name text box, type 1434 in the Port Number text box, select UDP, and then click OK.

PrestaShop eCommerce Shopping Cart Setup

PrestaShop is a great ecommerce Shopping cart for any online retail website.  It is a fully functioning shopping cart, with multi-currency ability, multiple out of the box payment gateways and plug-in modules.  With our Linux Hosting there is a 1-click installer that allows you to install the application.  Here are some of the key features, besides an intuitive user interface:

  • Dynamic Ordering Cart Update
  • Google™ Checkout module
  • SMS/Text-message alerts
  • PDF customer invoice
  • Customer product reviews
  • Payment by bank wire / COD
  • Bar codes
  • Tax by state, country, both, zones, or no taxes
  • 100% modifiable graphic themes
  • Search Engine Optimization (SEO)
  • Friendly URLs / Permalinks

 Here are some of the included Payment Modules:

These are some of the Included ecommerce tools, notice the 1-click install:

To start your online store, or to upgrade your current retail website go here for  1-click PrestaShop install hosting.

Installing Web Apps, PHP, MySQL on Hyper-V Server 2008

Are you running a Hyper-V Server, or a Standalone Dedicated Server 2008, and want to utilize an use to use and install Web App, or Web Application?  Microsoft has leveraged the following Web Apps for easy Download/Install on your Web Server:

  • PHP 5.2.11
  • MySQL 5.1
  • URL ReWrite 1.1
  • SQL Server 2008 Express
  • Streaming Media Services
  • Joomla! , SugarCRM, WordPress, Textcube, nopCommerce, Moodle, SilverStripe CMS, DotNetNuke, Umbraco, Drupal, nService. Amplifeeder
  • And Many More

It is kind of hard to believe that Microsoft is leveraging all these Open Source tools on thier Platform, like SugarCRM a competing CRM product as well as MySQL.  But in my opinion, it is great!   Here is a Step by Step Guide on getting your Web Applications up and Running on MySQL/PHP:

1. First Step, go to Microsoft and install the Microsoft Web Platform.  The Installation is pretty straight forward and takes under a Minute.

2. Run the Web Platform Installer.  You can then Choose Three Catagories: What’s New, Web Platform and Web Applications.

3. Select the Applications you want to Install, such as WordPress on Windows.

4. The installer will require some dependacies for WordPress such as a MySQL Database, PHP 5.2.  It will ask for a Database user/password:

5. The installer will then ask for the Web Site Settings for the new web application, and even allow you to add new directories.

6. The Installer will complete with all the applications that were installed on your server.  Next, run the WordPress Easy Web Setup and you are up and running!

As an added bonus, there are even additional Database tools and .NET Framework 4 Beta 2.  Nice!

Well that is it, really easy to get PHP Apps up and running fast on Windows Server.  To get your own Windows Hyper-V Virtual Machine to Install Applicaitons on Server2008 Here.

Free fix for Windows Black Screen

Many people have been experiencing the windows Black Screen issue with Windows 7.0 where you start windows and it goes to a black screen and just stays there.  It will look something like this:

WindowsBlackScreenFix

With a lot of time trying different things and looking for solutions we ran across this posting from Prevx which will easily fix this issue.

Prevx offers a free fix for Windows Black Screen

Firstly, there appears to be many causes of the black screen issue. The symptoms are very distinctive and troublesome. After starting your Windows 7, Vista, XP, NT, W2K, W2K3 or W2K8 PC or server the system appears normal. However, after logging on there is no desktop, task bar, system tray or side bar. Instead you are left with a totally black screen and a single My Computer Explorer window. Even this window might be minimized making it hard to see.

If you have these symptoms you can safely try our free Black Screen Fix. It will fix the most common cause we have seen of this issue. Running the fix program is easy under normal circumstances, simply download with your browser using the link above and run the program. However, if you are trying to do this from the PC which has the black screen it is a bit more tricky. In these circumstances follow the procedure below:

1. Restart your PC

2. Logon and wait for the black screen to appear

3. Make sure your PC should be able to connect to the internet (black screen does not appear to affect this)

4. Press the CTRL, ALT and DEL keys simultaneously

5. When prompted, Click Start Task Manager

6. In Task Manager Click on the Application Tab

7. Next Click New Task

8. Now enter the command:

C:\Program Files\Internet Explorer\iexplore.exe” “http://info.prevx.com/download.asp?GRAB=BLACKSCREENFIX

Note this command assumes that you are using internet explorer as your browser, if not substitute your browser path and file details for those of iexplore.exe or use the Browser option of Task manager to locate it.

9. Click OK and your browser should start up and begin the download process

10. When prompted for the download Click run, the black screen fix program will download and run to automatically fix the issue.

11. Now restart your PC and the black screen problem will hopefully be gone.

I must stress that this tool will not fix all black screen issues. There can be many causes. But if your black screen woes began in the last 2 weeks after a Windows update or after running any security program (including Prevx) to remove malware during this time then this fix will have a high probability of working.

If you Google Black Screen then you will find a whopping 80Million plus results, mostly dominated by people searching for a fix to this problem. Thousands of users have resorted to reloading Windows as a last ditch effort to fix the problem, avoid that at all cost. We hope we can help a good many of you avoid the need to reload.

By the way – the cause of this recent crop of Black Screen appears to be a change in the Windows Operating Systems lock down of registry keys. This change has the effect of invalidating several key registry entries if they are updated without consideration of the new ACL rules being applied. For reference the rule change does not appear to have been publicised adequately, if at all, with the recent Windows updates.

In researching this issue we have identified at least 10 different scenarios which will trigger the same black screen conditions. These appear to have been around for years now. But our advice is try our tool first. If it works great. If it doesn’t you are no worse off.

Good luck.
Dave Kennerley
Prevx Support

This seemed to work like a Charm. We would like to offer our Thanks to the people at Prevx



Email Spooling – ETRN – Backup MX

Have you ever had your mail server crash and have mail messages bouce back to the senders?  Yes it is a horrible thing when your mail server crashes. The scramble begins for the IT department. All incoming email is bouncing.

Your IT department is trying to correct the problem and rushing to fix it. This can lead to many fast desicions and sometimes wrong desicions are made when rushing to fix the problem.

If your email is critical to you and your business you should have a backup email server that spools all incoming email when your server is down. This is known by a few names backup MX, store&forward, ETRN.

Email Spooling – This is a highly scalable and efficient service for customers with an internal messaging system (such as Microsoft Exchange, Novell GroupWise, Lotus Notes, etc.) that is connected to the Internet.

A simple modification of the MX records in the DNS of your domain name (so as to reference the backup server) will direct your mail to the backup server until your server comes back online.

Record FQDN Record Type Record Value MX Pref
domain.com MX mail.domain.com 10
domain.com MX backup.domain.com 100

When the primary mail server is not available the mail is delivered to the backup mail server. Once your primary server comes back online, the backup server sends the stored email to the primary server

Below is the normal config

email1This is what will happen if you have a backup in place and your server is unavailable.

email2

Implementing this type of back up is very easy to do and will give all IT people the peace of mind they need to do there jobs better.

RackWire.com has teamed with NeverBounce to offer e-mail backup and message spooling.  Try our NeverBounce e-mail Spooling Today!

Installing Microsoft Office 2010 Beta

As a Microsoft Partner we were invited to Install and Microsoft Office 2010 Beta Release.  First thing we did was start the Download Manager by getting Office 2010 Beta Here.  In order to Install Office 2010 you need the following:

  • 500 MHz 32-bit or 64-bit processor or higher, 256 MB of system memory or more, 3.5 GB of available disk space
  • Windows XP SP3, Windows Vista with SP1, Windows Server 2003 R2, Windows Server 2008 with SP2 or Windows 7 (32-bit or 64-bit).
  • After downloading and running the 684 Mb Office 2010 Professional Plus Beta Installer.  It is nice you get to Beta the Professional Plus Version.  The Setup Was surpringly faster than previous version, and took under 10 minutes total.  I guess this is not a good thing if you are an hourly consultant. 

    2InstallBeta

     

    Outlook 2010 Impressions: Seeing how e-mail consumes most of my corporate career as of lately, I am most excited about some of the new features in Outlook 2010. 

    1. Outlook 2010 Setup.  Setup was a snap hands down for an Exchange server, which was always easy in previous versions.  An internet IMAP/POP account was also automated, configured my RackWire e-mail server automatically, but defaulted to POP mail servers by default.  There is even a setting to set up a Text Messaging Account. 

    OutLook2010_RackWire2

    2. Threaded Messaging is a huge plus after a few hours of use.  It groups messages from the same sender/subject under one expandable group.  The Conversation Grouping is similar to Google Mails threaded Messaging…..but not as savvy.

    OutLook2010_RackWire6_ThreadedMessages

    OutLook2010_RackWire5_ThreadedMessages

    3. The ability to ignore conversations.  This allows you to ignore that big CC: chain that is going around the office about what size Font we should standardize on for footers. 

    Word 2010: Some of the intial benefits are the added Formating and Screen Capture Options, as well as the improvfed layout.  After using Office 2010 for a couple hours, I already like the menu layouts much better than the previous versions.

    Office2010

    Tomorrow when my expenses are due I will be exploring Excel 2010 in Depth.  For now the biggest features I see are some intelligent scorecarding and charting, and it no longer Speeds past the last cell when you are highlighting or scrolling multiple rows.

    Backblaze Storage on Motherboard #2

    For the Backblaze Motherboard we went with a Intel DG43NB ATX Motherboard.  About an hour after getting the first one up and running it failed and would not boot to the bios.  This is before we even managed to put the drives in.  With electronics, they say if something is going to fail, it will fail within the first few days.  So we are now on Motherboard number two.  With success we are up to loading the 2.0 TB Hitachi Hard Drives, should not take long to Format 45 Drives Right?

    RackWire_BackBlaze_Cloud