Super-Networking

09 May

Backup DFS Files with Backup Exec

I found out an interesting quirk when backing up DFS (Distributed File System) files using Symantec Backup Exec 11D. I have a full backup setup, basically selected the entire drive to backup, finishes every night with no errors.

You go back into the job in Backup Exec and try to do a restore, what do you find? The folders that contain the DFS files are empty, 0 bytes. My first thought is what the hell is this all about. Was scared for a minute or two thinking I have no backups on tape of any of my DFS files.

I looked into it more and found that starting in Backup Exec 10d SP2 and continuing through 11d you cannot performance a backup of DFS files directly like you would normally do. You need to use the "DFSR Writer" which means using the Shadow Copy Components backup.

If you go into your server selection in Backup Exec, drill down into Shadow Copy Components -> User Data you will see the DFS info. Make sure to select these to backup your DFS files.

Things to keep in mind about backing up DFS in this manner:

-Backup Performance is greatly affected, could double the time needed for backing up those files.

-DFS Backups in this manner cannot be redirected to another location on restored like a lot of people including myself like to do when restoring files.

One workaround for the speed issue I have found but not tested is to run a Net Stop command for the DFS Replication service before the backup starts then a Net Start for that service when done.


WordpressTags: , , , , , , ,
42 views
09 Apr

Search for Word Strings in IIS Log Files

What do you do if you want to look for combinations of word strings in Gigabytes of IIS log files but don’t want to spend any money?

You download a program called Strings.

This is a SysInternals program now owned by Microsoft that will search through text files for word strings and kick them out to you.

So I will go through an example of how you can use it and you can modify it from there.

So copy all of the IIS log files to a location, for example c:\logs

Then open up a command prompt, go to the directory where you have the strings program.

Type the command: strings.exe -s c:\logs | findstr "Your Search Text"

This will dump all the lines it finds with that search text to your command prompt window. Now take it further.

Type the command: strings.exe -s c:\logs | findstr "Your Search Text" > c:\output\log.txt

That will dump the found lines to a new text file. Either you can use that text file for whatever you want or parse it down further with the following.

Type the command: strings.exe -s c:\output | findstr "Your Search Text 2"

That will allow you to search through huge directories of IIS logs for combinations of things. If you do the same search often try dumping it into a batch file.

Thanks Goes to Steve For the Idea to Look Into Strings


WordpressTags: , , , , , ,
81 views
09 Apr

PPTP VPN Through Cisco Pix

Do you want your workstations to connect to PPTP VPNs through a Cisco Pix firewall without having to setup a static NAT for each one.

Are you getting the following error in your syslogs when you try:

"regular translation creation failed for protocol 47"

All you should have to do is add a new fixup protocol entry.

"fixup protocol pptp 1723"

Now assuming that you have a PAT for all traffic from inside to outside you PPTP connections should work.

There are other factors that could cause this to fail, make sure that you are on at least version 6.3 of the Pix software.

If you still have problems check your syslogs.

Technorati Tags: , , , ,

WordpressTags: , , , , , , ,
84 views
03 Apr

Install .EXE as a Service in Windows Server 2003

First thing you are going to need is the Windows 2003 Resource Kit Tools

You then are going to want to find two programs, instsrv.exe and srvany.exe, I would recommend making a new folder on the root of your drive and pulling over a copy of those two files. So say a folder called myservice you really could name is anything you want.

Next what you need to do is register a service to run srvany.exe with the name of your choosing. Open a command prompt and go into the folder myservice.

Command would be:

instsrv.exe "My Service" c:\myservice\srvany.exe

-Switch "My Service" with name you want the service to have.

Next you need to tell srvany.exe what program you want it to run as a service.

Go into the registry using regedit find this key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\My Service

-Add a new sub-key call Parameters under My Service

-In the Parameters key create a new string value named Application

-Set the value of it to the full path of the executable file location. Be sure you use "" around the path.

That should be it, you might have to reboot otherwise go into services.msc and start your service. You should be good to go.


WordpressTags: , , ,
167 views
31 Mar

Wireshark 1.0.0

Holy cow! Can you believe that finally the developers of Wireshark have reached 1.0.0 of their product. I have been running 0.9X versions of this software for what seems like forever.

Wireshark for you who haven’t looked for a long time used to be the packet sniffer called Ethereal. This is a great free packet sniffer that every Network Admin worth his salt should have on his laptop and or Thumb Drive.

Download it here

Older Post on Wireshark/Ethereal:

Wireshark aka Ethereal


WordpressTags: , , , ,
75 views
28 Mar

CPU Spikes with WinHTTP Web Proxy Service

Ran across something interesting this week. I was looking into performance on some of our webservers and noticed that there would be unexplained CPU spikes every once in a while. No real spikes in traffic, no additional tasks going on.

In the event logs I did find something that correlated with the CPU spikes:

Event ID: 7036

"The WinHTTP Web Proxy Auto-Discovery Service service entered the running state."

Event ID: 7036

"The WinHTTP Web Proxy Auto-Discovery Service service entered the stopped state."

This happens many times a day, starting and stopping. When in transition it seemed to spike the CPU for a little while.

Service Description is the following:

Implements the Web Proxy Auto-Discovery (WPAD) protocol for Windows HTTP Services (WinHTTP). WPAD is a protocol to enable an HTTP client to automatically discover a proxy configuration. If this service is stopped or disabled, the WPAD protocol will be executed within the HTTP client’s process instead of an external service process; there would be no loss of functionality as a result.

In looking into this more I found this is not needed to run IIS or anything else on your server. Only needed for your browser on your server to detect a proxy for Internet browsing. So do yourself a favor and disable this service, you will see it most likely set as manual and stopped but don’t let this fool you. Check out your event logs and if you see it starting and stopping disable it.


WordpressTags: , , , ,
205 views
27 Mar

Unregister .Net 1.1 from IIS

So if you are running Windows 2003 with IIS 6 and all of your web applications are running ASP .Net 2.0 you might want to get rid of .Net 1.1.

Well with Windows 2003 it isn’t easy or advisable to completely remove .Net 1.1 but you can unregister is from IIS having the same affect as far as your websites are concerned.

You need to open up the command prompt and go to the path .Net is installed in. Typically is C:\Windows\Microsoft.NET\Framework\v1.1.4322\

If you have other versions of .net installed you will see all the versions under Framework as well, be sure to go into the 1.1 directory.

From the command prompt in that directory type the command "aspnet_regiis.exe -u"

This will unregister this version of the framework with IIS and in turn IIS will not see it. You will want to do a reboot to make sure everything comes up clean afterwards.

Also make sure that you do not have any websites using .Net 1.1 because you will most likely mess it up when it is forced over to .Net 2.0

Technorati Tags: , , ,

WordpressTags: , , ,
121 views
21 Mar

Robots.txt Http and Https - Part II

So I posted earlier on splitting up the robots.txt you are showing based on if the bot was connecting on http or https here. I commented at the end that if this is an existing site and Google has already indexed your https content you need to be careful. Once you block Google from reindexing your https content using the robots.txt file Google will ignore changes, but it will keep the old indexed pages.

You cannot use the URL removal tool because you can’t tell it to only remove https urls. The way you get around this is to remove the robots.txt restrictions from https and put meta tags for Google to remove the content only on our https content.

Tags you are going to want to user are:

<meta name="ROBOTS" CONTENT="NONE">

and

<meta name="GOOGLEBOT" content="NOARCHIVE">

This will tell Google to not index the pages and remove any old caches and indexes. This could take some time for Google to crawl all of your https content. Once everything you want out of their index is gone you can go ahead and change over to the easier https robots.txt file restrictions.

I do not have the code that allows you to set different meta tag info based on http or https. If someone has that please comment on this post. This should help out the SEO on your site. Thanks

Resource Page for You

Technorati Tags: , , ,

WordpressTags: , , , , , , , ,
107 views
17 Mar

Monitor Bandwidth Usage on Single Machine

Do you need something to monitor the bandwidth usage on one server? For instance if you have a hosted server that has limited total usage. Well if you want a simple free tool download NetMeter.

You can get real time statistics, totals including day, week and month. It will also project your usage over the day, week or month based off what you have already used. It is easy to use and best of all FREE!

Technorati Tags: ,

WordpressTags: ,
97 views
16 Mar

Robots.txt Http and Https

One of the big things a lot of people are doing these days is SEO or search engine optimization. I am not planning on going over a comprehensive guide for SEO right now but as I run into them in my own job I will post them here.

One of the more recent tasks I had was setting up a different robots.txt for our http site vs our https site. It is the same content but Google indexes them as two different copies of the content. Google then penalizes your site for duplicate content. Well you setup your robots.txt file to exclude the files and directories you want from the bots but it doesn’t help the http vs http. Both protocols will use the same robots.txt file and so you will end up with duplicate content in Google’s index.

Here is how to solve this problem when you are running IIS 6.0 on a Windows 2003 server. You will need to also be running ASP .Net 2.0 for this solution to work. You might be able to get this to work on other platforms but I have not tested them. What we will be doing here is creating a dynamic robots.txt file, it is only one file but it will display different results depending on if you connect with http or https.

1) Create your robots.txt file:


<%@ WebHandler Language="C#" Class="MyNamespace.robotshandler" %>

using System;
using System.Web;

namespace MyNamespace {

    public class robotshandler: IHttpHandler {

        public void ProcessRequest (HttpContext context) {

            context.Response.ContentType = "text/plain";
            context.Response.Write("User-agent: *\n");

            if (context.Request.ServerVariables["Https"]=="off"){
                // HTTP
                context.Response.Write("Allow: /\n");
                context.Response.Write("Disallow: /MyDisallowedDirectory/\n");
            } else {
                // HTTPS
                context.Response.Write("Disallow: /");
            }
        }

        public bool IsReusable {
            get {return false;}
        }
    }
}

2) IIS needs to have .txt files passed through ASP .Net

- Open IIS and right click on your website and bring up the properties screen

- Go to Home Directory > Configuration. You will be on the Mappings Tab.

- Locate the ASPX item and click Edit - Copy the path in the Executable Field and cancel out of that window.

-Cancel

-Click “Add"

-Populate the Executable path with the value you copied in the last section

-Extension ".txt"

-Enter “GET” in the “Limit To” field

-Save and Exit

3) Need to modify web.config to process the .txt correctly

-Add the following under system.web:  (Look for these sections in your web.config, most likely don’t have to add the httphandler tags because they will be in there already then just add the lines inside them.)

<httpHandlers>

    <add path="/robots.txt" verb="GET" type="System.Web.UI.SimpleHandlerFactory" />

    <add path="*.txt" verb="GET" type="System.Web.StaticFileHandler" />

</httpHandlers>

<buildProviders>

    <add extension=".txt" type="System.Web.Compilation.WebHandlerBuildProvider" />

</buildProviders>

Make sure your new robots.txt file is in your root folder for your website and everything should be good to go. Try your website out with http then https and it should be different. You will have to modify the robots.txt file to exclude what folders and files you want.

Technorati Tags: , , ,

WordpressTags: , , , , , , , ,
166 views
Your Ad Here

© 2008 Super-Networking | Entries (RSS) and Comments (RSS)

Global Positioning System Gazettewordpress logo