October 27, 2009

WSUS is a pain in the back!

Filed under: Technical — george @ 4:36 pm

WSUS is a great concept! Deploy updates for windows workstations on a domain, save bandwidth, control which updates get deployed to which workstations and when!

It is all nice until you need to start debugging those workstations that never report back, never get updated or never even appear on the WSUS server.  And they keep getting more and more, and oh they do!

I ll try additing whatever tips and tricks i can find here in hopes of helping some other tortured souls out there.

http://www.wsuswiki.com/
http://blogs.technet.com/sus/archive/2008/10/16/cool-wsus-troubleshooting-tools-and-script-examples.aspx

Identify the location of an IP

Filed under: Technical — george @ 3:21 pm

For some of you out there who came across GeoIP you know useful it is to get the location information of an IP.  Why? Assuming you are hosting a website and you want some statistics as to where your visitors come from then knowing what IP ranges are assigned to what country will give you an insight as to where your users come from.

Other uses might be to  block users from accessing your website or server based on what country they are from.

So how does GeoIP do its magic?  Well somewhere on the Internet there are databases which store information about what country has what ranges of IPs assigned to it.  By making a request to such a service you can ask where the IP came from, and you might also be able to get other information such as what ISP that IP belongs to.

Databases containing this information appear to be maintained by various people/organizations, with some people, such as the company behind GeoIP offering their data for a fee.  Free alternatives are available though. The second contains a CSV file containing LongIP ranges each indicating the country those IPs belong to.

The following are of use
http://www.countryipblocks.net/

http://ip-to-country.webhosting.info/node/view/6?XID=95e1f61de9cd95ac5718c2e4d1193889

Now what i wanted to do is take a list of ip addresses, convert each one of the to a LongIP and check in the CSV file to see if that IP corresponds to one of the countries inside.

A longIp is an IP where a mathematical function is applied to it to turn it into a unique number.  Have numbers instead of IPs makes it easier to search through and compare.  The following function is applied:
For IP AAA.CCC.ZZZ.XXX
LongIP = AAA * 256 * 256 * 256 + CCC * 256 *256 + ZZZ * 256 + XXX

The CSV data file as i found out does not contain all addresses.  So i resorted to the for mentioned website http://www.countryipblocks.net/.  I found that there were IP ranges for Africa that were not included in the original CSV file.  I wrote another script which turned all the IPs in the list into LongIPs and create a file similar to the original CSV.  I then did some manual work with the help of a spreadsheet editor (added the country info for the IPs).  I then cat the 2 files into 1 file which i then used in my original script to do the checking.

All scripts were written in Perl.  One thing to make notice of is that the speed fo the searches for a 3000 IP list takes around one hour due to the fact that i am searching through a CSV file.  Had i used a database product to store the info this process would have been a lot quicker.

I am tired and just had lunch so if this doesn’t make sense let me know and i ll add anything i neglected mentioning! :)

http://ip-to-country.webhosting.info/node/view/6?XID=95e1f61de9cd95ac5718c2e4d1193889

October 19, 2009

Updating Software Packages

Filed under: Technical,Windows — george @ 1:32 pm

A common problem in a Windows IT environment is keeping your systems, and more specifically applications, updated at all times.  The same goes for your laptops and home PCs.  Having the most up to date applications is very important as newer versions will have security and bug fixes which will  make your system more secure and stable (plus you might get a new feature or two!!)

There best approach to this is to have a system that will notify you of updates and give you the option to deploy them to all workstations and tada! after some magic happens all systems are up to date!  Reality (as far as i have experienced it and know) is far from it!  I can identify the following stages during an update cycle / procedure:

  1. Determine that updates of applications are available (and download any available updates)
  2. Notify the systems administrator that updates are available for XYZ applications.
  3. The administrator checks what fixes and improvements the update brings
  4. If he decides that the update should take place (i.e. it is worth the time and effort due to security fixes) he will then proceed to install it on a test environment to check for any stability or compatibility issues
  5. If the test environment is showing no signs of problems he will the proceed to deploy it to the rest of the workstations/systems.

In this series of posts (this being the first) i will attempt to present solutions to this common problem by tackling stages 1 and 2.

In this post i will take look at installers and how we can make sure we always have the latest installer at our disposal!  Even though this solution does not update our systems, it is a great way for us to know that there is a new version available and, should we choose, we can update our systems.  This approach has a significant benefit:  It allows us to first test the updates and make sure they do not cause any unexpected compatibility issues with our systems.  After  Testing we can then deploy the updates ourselves.

This solution makes use of a freely available tool, ketarin, found at http://ketarin.canneverbe.com/ .  A tutorial on how to use this tool can be found at: http://cdburnerxp.se/help/kb/20 .  This solution offers us 2 alternative methods of verifying and retrieving updates.  The first is by checking at the http://www.filehippo.com/ and the second is by specifying the location yourself.  Keratin offers a very flexible way of doing so as it provides a lot of variables you can work with!

Testing it out and let me know what you think!!!

Links:

http://www.filehippo.com/
http://ketarin.canneverbe.com/
http://cdburnerxp.se/help/kb/20

October 15, 2009

Streaming music on demand online

Filed under: music,youtube — george @ 1:04 pm

Yet another site for streaming music on demand of the web.  Check out this site:

http://fizy.com/

October 14, 2009

Free Software offers!

Filed under: Technical — george @ 1:59 pm

A site i came across, http://www.giveawayoftheday.com/ , gives out a different software package for free everyday!  Check out the offers they have daily, and you might just come across something you need!!

Regular Expressions, Apache and mod_rewrite

Filed under: Interesting,Technical — george @ 1:18 pm

One of the most useful things in scripting and programing languages (as well as tools such as vim) are regular expressions.  They allow you to create complex expressions that can match to text that meets the criteria you wish (based on characters, size et cetera).

Apache also allows for the use of regular expressions with mod_rewrite Rewrite Rules.

The problem i had was the following:
1 host www.example.com, 1 directory inside the domain root, www.example.com/directory.
I need every request under example.com/ that doesn’t target example.com/directory/ to be redirected to the /directory.  For example www.example.com/test should take us to example.com/directory.  Anything under directory should remain unchanged (i.e. example.com/directory/1 is valid and should not redirect anywhere).  Request to example.com should be served though normally!

So
example.com    ->  example.com
example.com/(anything appart from directory) ->  example.com/directory
example.com/directory  -> example.com/directory

The configuration is the following, placed either under httpd.conf (or the virtual host file), or under the .htaccess file

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_URI} ^([/]?[^/]*/?)$ [NC]
RewriteCond %{REQUEST_URI} !^(/?directory/?)$ [NC]
RewriteRule (.*)  http://example.com/directory/

Please make note of the following:  On the second RewriteCond if you do not include the parenthesis, you will not be able to add the $ at the end, although the ^ at the start will be accepted.  What will happen if you do not include the parenthesis and place the $ at the end is that it will cause your regular expression not to be true when it should be!  It took me ages to figure this out!!!!! (no documentation on this as usual!!)

Also make sure you include Options +FollowSymLinks above the rewrite engine on clause!

Also to divert all traffic to https:
RewriteCond %{HTTPS} Off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Any comments? shoot!

October 12, 2009

Want to view websites similar to the ones you are viewing now?! Bored at the same time??

Filed under: Firefox,Technical — george @ 1:32 pm

This is an interesting plugin for firefox.  It will display sites that are similar to the one you are using, based on what other people with similar interests visited or recommended.  Albeit annoying at times, it can be useful when you are bored out of your mind!!!

https://addons.mozilla.org/en-US/firefox/addon/138

Want to send files over the web to someone directly?

Filed under: Interesting — george @ 1:03 pm

I haven’t really tested it out and there are probably more of these sites out there, but you might want to check out this website:

http://www.filesovermiles.com/

What you can do is send a file to someone over the web without a server in-between or without using programs such as msn messenger.  It will in theory allow you to send a file at your max upload speed since a lot of service providers put caps on file transfers on most things apart from web based services.

Test it out and leave a comment!!

October 9, 2009

Looking for subtitles for your downloaded films?

Filed under: fun and games,Interesting,Windows — george @ 5:06 pm

Tired of searching the net for subtitles? Tired of downloading the wrong subtitles after hours of search?

http://subdownloader.net/

This Windows/Linux application (possibly other O.S. too) checksums films in directories you specify, and goes on a popular subtitle page to search for any available subtitles for that specific video file.  You can filter results by language and you can even upload your own subtitles if you choose to do so!!


29 queries. 0.213 seconds. Powered by WordPress.