Things to do to a blank BlueQuartz install

After just rebuilding a BlueQuartz box I thought I would copy my install notes. This is an entirely personal list of things that I do to a vanilla install of CentOS/BlueQuartz.  I thought it may be useful to other people.

Contents

  • Change root passwords
  • Secure SSH
  • Apache Obscurity
  • Install ImageMagick
  • PHP upload settings
  • Add Mime Types
  • yum checker
  • Setup floppy drive
  • Majordomo logfile

Change root password

BQ is initially set with no root MySQL password and the systems root password is set the same as the admin user. These should be changed to something different!

  • Change MySQL password wth `/usr/bin/mysqladmin –user=root password NEW_PASSWORD`
  • Change root password with `passwd`

Secure SSH

SSH is obviously better than telnet but did you know that the SSH protocol v1 has been cracked for quite some time now. I lock all my boxes down to only use protocol v2 and haven’t had any come back on compatability issues.

  • Modify `/etc/ssh/sshd_config` to set `Protocol 2`
  • Run `/etc/rc.d/init.d/sshd reload`

Apache Obscurity

Yes, this is security through obscurity but everything helps. The following will remove the “signature” at the bottom of pages generated by Apache and will also only report the webserver as “Apache” instaed of the full version number and OS

  • Modify (and add if necessary) the following lines in `/etc/httpd/conf/httpd.conf` & `/etc/admserv/conf/httpd.conf`
ServerSignature Off
ServerTokens Prod
  • Run `/etc/rc.d/init.d/httpd reload`
  • Run `/etc/rc.d/init.d/admserv reload`

Install ImageMagick

A must for most hosting nowadays.  Simply run `yum install ImageMagick ImageMagick-perl` as root.

PHP upload settings

In this new broadband age people are uploading pictures and such to their sites so I change the PHP upload defaults.  Change lines in /etc/php.ini (or your own php.ini) and run `/etc/rc.d/init.d/httpd reload`

post_max_size = 20M
upload_max_filesize = 10M

Add Mime Types

There seem to be some common mime types missing from the default install.  Add the following to `/etc/mime.types` and run `/etc/rc.d/init.d/httpd reload`

application/x-ms-wmz wmz
application/x-ms-wmd wmd
audio/x-ms-wax wax
audio/x-ms-wma wma
image/x-icon ico
text/csv csv
video/x-ms-asf asf asx
video/x-ms-wm wm
video/x-ms-wmv wmv
video/x-ms-wmx wmx
video/x-ms-wvx wvx

yum checker

Now I love the Nuonce/Solarspeed automatic yum installer however I like to install patches on systems when I am there, that way if there are any problems I can fix them straight away.  I have this little script that mails me when there are packages to install.

  • touch /etc/cron.daily/yum-check
  • chmod 755 /etc/cron.daily/yum-check
  • vi /etc/cron.daily/yum-check
 #!/bin/sh 
SERVER=`hostname`
OUTPUT=`/usr/bin/yum check-update`
EXITCODE=$?
if [ ${EXITCODE} != 0 ]
then
echo "${OUTPUT}" | /bin/mail -s "${SERVER}: Yum Updater" root
fi

Setup floppy drive

If your system has a floppy disc drive you won’t be able to use it until you run `floppy –createrc > /etc/floppy`

Majordomo logfile

I know it’s silly but I like all my log files to be in one place….

  • cd /var/log/mail
  • ln -s /usr/local/majordomo/log majordomo

I hope this is of use to people

UT2003/UT2004 Map pictures

As you may have seen I have written my own server query script for my Unreal Tournament Server mainly because I wanted to learn how to code UDP packets in Perl. However, when the script was finished I wanted a good picture of each map to show which map was currently playing so, to cut a long story short, after much messing around I created animated GIF’s for all the maps that that I used using the screenshot images from the maps themselves.

I figure that these pictures may be of use to other people with server query scripts so I am making them available for people to use, all I would ask for is a link back to my page somewhere on your site (it’s not much to ask for). This thing has now ended up so huge and I have created 629 map pictures for UT2003 and now UT2004.

How to use
There are two ways to use these images, you can either download them and put them on your server for your script to use or you can call the images from my site. There are advantages and disadvantages to both…

  • You will have to script what happens if the map picture doesn’t exist. If requesting the image from my server and the map GIF doesn’t exist the Unreal logo will be sent automatically.
  • You will have to make sure the script that calls to the images are done in lower case.  Requests to my server can be made in any case ( dom-aphrodite, DOM-Aphrodite, DoM-aPHroDitE, etc.) and will return the correct image.
  • Uses YOUR disk space and bandwidth compared to using MY disk space and bandwidth.

View all the maps currently in the collection

Download the map pictures for your site – utmaps.zip (44MB)

…and please remember to link back to my site, I don’t ask much.

Link to the images on my site.
This is easily done…

  • Prepend “https://www.dogsbody.org/utmaps/” to the beginning of the map file name.
  • Append “.gif” to the end of the map file name.
  • Call this URL as part of an image tag in your script.
  • All GIF’s have a width of 256 and a hight of 128, if you specify this in your image tag the image will load faster.

If your script calls a map that doesn’t exist the Unreal logo will be returned.

Examples of the GIF’s
br-skyline ctf-face3 dm-antalus dom-ruination

Adding to the collection
I’m afraid I am no longer creating these map pictures.

Thanks
I owe a big thank you to Lance (Throckmorton) and Konstantin (Inf*klarissa_(rus)) who have both created a bumber of new map pics that were perfect for the collection.

Feedback
If you have any questions or problem with these GIF’s then please don’t hesitate to contact me.

I would also love to hear any comments you have, good or bad.

Raq Site Bandwidth Script

This script is for the Cobalt Raq4 (although I would love to know if it works with the Raq3 too??). It uses the internally generated /home/.cobalt/report/stats.tab file to display the bandwith used by each virtual site on the server even if your virtual sites are on the same IP address. The stats.tab file is generated by the Raq when it splits the log files up for each site. A total is kept for Web, FTP & E-mail by month showing the number of hits, transfers & mails as well as the total amount of bandwidth used for each one. This script displays that data with some nifty additions…

What it does

At it’s basic level this script displays the data in the stats.tab file in a webpage but it also…

  • The script is password protected by default. If “admin” logs in they will see a summary for all sites. If a standard user logs in they will only see details of their own site. This means you can publish the URL and siteadmins can check their own sites usage.
  • Add extra data to the stats. e.g. I run a Helix streaming server and split the logs in the same way to create my own stats.tab file for helix. This script will merge data from both.
  • Two warning levels. If the usage for a site is over a two bandwidth levels it will be highlighted. These levels can be configured by you.
  • Easy control over look and feel

Screenshots

Download

raq-bandwidth.tar.gz

Installation

The setup should be pretty easy…

  • Download the script from the site (‘wget URL’).
  • Put the download where you want it.
  • Extract the compressed tar using ‘tar zxvf raq-bandwidth.tar.gz’.
  • Check the file permissions for the directory & files
  • Check that the script runs first by browsing to the …./bandwidth/ directory.
  • If it works the change any setup you wish to change in the top if the index.cgi script.

Feedback

I would love feedback on this script, good and bad. Thank you.

Changelog

  • 1.04 – 30 Sep 2004
    • Release to public
  • Pre 1.04
    • Beta Testing. Thank you Thom LaCosta & Florian Arzberger

Simply download the file, change the directory path at the top of the file if required and execute.

Things to do before I’m *cough* 30

Having originally written this in my 20’s I’m now updating this for the later years in my life.  Strange how I actually feel younger now than I have in a long time.

Well I’m now in my 2030’s and half way though a mid youth crisis, I have a house and a car and a job with responsibilities and can no longer do the fun things that I used to (like I did anything before anyway!!). So, I have decided to make ‘the list’, a list of things to do before I’m 3040, I need your help here, I need suggestions, send them to me and I will see what I can do.

The List
Idea Date
Parachuting Done: 23-24 Sep 2003
Learn to ski & go skiing on real snow Done
Go on a proper ghost watch Not planned yet
Dye my hair blue Not planned yet
Go to New York for New Years Not planned yet
Suggested by people visiting this page!!
Idea Date
Abseil from a tall building Not planned yet
Have a threesome!! Not planned yet (strangely)
Drive across America Not planned yet
Visit each of the continents Not planned yet
Scuba dive Maybe soon!
Learn to sign language Not planned yet
Walk on the great wall of China Not planned yet
Experience a weekend at the Streetrod Nationals Not planned yet
Write a poem or fifty Done: 28 Feb 2004 (just the one)
Appear on TV Done: 26 May 2004
Go to Brazil and eat a fruit pizza Not planned yet
Try not to think about Polar Bears for an entire day Done: straight away :-p
See the northern lights Not planned yet
Go and see a proper Opera Not planned yet

UT2k Query Script

This is only the second script that I have actually published so I hope you like it. This script came about due to the huge interest in the script I wrote for my website that queried my UT2003 server and returned as much information as possible about the game to a page. Lots of people e-mailed me asking for the source so I tidied it up and that is what you see here.

This script works fine with UT2004 I just haven’t removed all the references to UT2003 yet 🙂

I never claimed to be a professional Perl programmer and as such I would class this script as permanently in BETA. I am always looking for comments on my work so if you see an improvement that can be made to the code, have an idea for another project or just like the script then please take a moment to contact me .

What it does
This script queries the game server on the GameSpy query port (usually +10 from the base port), the results are then parsed and cleaned up to make them easier to understand (e.g. True/False is turned into Yes/No) before being output to an HTML page. The resulting page also includes the meta tag to refresh and so the browser window can be kept open and the page will automatically update itself. There are a number of configuration settings that allow you to tweak the timeout, refresh & title as well as page colour settings and as an optional setting you can include your own HTML before and after the query which allows you to keep the same look and feel of your site.

Screenshot

Download

ut2003-query.tar.gz

Dependancies
This script requires the following things…

  • Perl – It’s a perl script!! You will require v5.003 or above.
  • A webserver – Anything that can cope with with CGI scripts written in Perl.

Installation
The setup should be pretty easy…

  • Download the script from this site.
  • Put the download where you want it.
  • Uncompress the file using ‘gunzip ut2003-query.tar.gz’.
  • Extract the tar using ‘tar xvf ut2003-query.tar’.
  • Run ‘chmod 755 ut2003-query.cgi’
  • Edit the path to perl in the first line of ut2003-query.cgi.
  • Try running the script without changing any of the configuration, by default it should query my UT2003 server as long a your webserver can ‘see’ my UT2003 server ‘gamer.dogsbody.org’ e.g. your not on a LAN.
  • Edit the configuration lines at the top of ut2003-query.cgi for your details…
    • $server – Server hostname or IP address.
    • $port – Server’s main game port.
    • $queryport – The Gamespy query port offset, this should be “+10”.
    • $timeout – How many seconds to wait for a response from the server.
    • $refresh – How often to refresh the results page in seconds.
    • $title – The title of the page returned which will be used in the header and at the top of the page.
    • $bgcolour – The background colour of the page returned.
    • $fgcolour – The text colour for the page returned.
    • $lncolour – The colour of hyperlinks on the page returned.
    • $headerfile – Optional: You can leave this field blank which will return the results in a generic page however you can set this to the path of an HTML file that can be included before the results page, this allows you to include whatever else you like on the results page to fit in with the rest of your site. Be warned the “” tags are returned at the top of all pages so your HTML should carry on from there. If you use this $bgcolour, $fgcolour & $lncolour will not be used as you can specify your own tag and $title will only be used for the text at the top of the page.
    • $footerfile – Optional: As with the headerfile, this is the path to an HTML file that can be used to close off any tables used in the headerfile. This file SHOULD include the & tags.
    • $pictureurl – Enter a URL or relational path to images of maps that this query should use. The text “MATCHTHIS” will be replaced with the map filename in lowercase. The default for this links to the images in my site which you are welcome to use, more details.
    • $script – This should be set to the filename of the script (yes the file you are editing), this is used to call the script back and refresh the HTML page. If you set this to “$ENV{SCRIPT_URI}” it will automatically be set to the correct name on most web servers (tested on Apache, iPlanet & Netscape Web servers).
  • And hopefully it will all work 🙂 Happy Fragging

Notes / Known Bugs
The numbers of players on the server is returned twice, once as a player count which is reported in the bottom left table and also as each individual player statistic. Sometimes these two counts don’t tally up with the player count reporting a higher number. As far as I can tell this is correct as the player count reports on the number of connections to the server which does not necessarily mean they are playing the game (e.g. they are downloading the map or haven’t pressed fire to join the game)

The translocator field doesn’t work, data should be returned to show is the translocator can be used on the server however the data is empty each time. This seems to be a bug in UT2003, If anyone sees that this is fixed in a patch or something I will see if I can query that and turn this back on.

Changelog

  • 3.00 – 04 Jun 2003
    • First public release of code – removed all site specific stuff and tidied up.
  • 2.xx – Various Dates
    • Complete re-write of code using own UDP query to UT2003 server.
  • 1.xx – Various Dates
    • First write of a query script that used qstat to get details from server.

Revolving head

I had this idea ages ago, I have absolutely no idea where it came from but I suddenly realised that instead of the normal picture of me I should do something special. Then I came up with the idea of a rotating head!! Tell me if you like it, I think its rather cool, it certainly took me long enough to do!

For those of you sad enough to want to know how I did it. The effect was done by me repositioning my PC camera to in front of my window, there is plenty of light there and also a lot more room. I then positioned myself on my swivel chair and tried to line my head and back up on the central spindle of the chair (This is a lot harder than you think). I captured a 30 second avi file of me spinning around and around. I then edited the file to pick the best 360 degrees and to try and line up my head position in the start frame with the end frame. Paint Shop Pro v5 has this great utility for converting avi files into animated gifs, then with a bit of trimming and editing of the timing, the file was created!!! Easy as that!!!

IT ‘nerds’ get more bedroom action

With a title like that I just had to put this on my site!! 🙂

The archetypal image of the IT professional is of a nerdy bloke who spends most of his time by the computer. But Downtime can now explode that myth by revealing that “adult male nerds” have sex far more often than the average man.

This is the findings of a survey of more than 7,500 such individuals carried out in the US by IT recruitment Web site JustTechJobs.com. It discovered that these IT-focused lotharios have sex an average of 108 times a year, compared to the average of 79 times a year for non-ITers.

Russ Curtis, JustTechJobs’ chief executive said, “If these guys were anything like I was, they were picked on as kids, and probably didn’t kiss a girl until they were 23 years old. Now they have money and power and members of the opposite sex find them very alluring.”

Computer Weekly – 26 April 2001

The Conscience of a Hacker

This was taken from Phrack Volume One, Issue 7, Phile 3 of 10. It is a poem by a hacker that was arrested back in 1986, funny how it still seems to be appropriate so many years on. Incidentally, bits of this file made it into the movie “Hackers” (I sense Emmanuel Goldsteins influence there!!) I know it’s kinda sad but in some ways I like this, if nothing else but that it’s a nice bit of poetry. Anyway, here it is in its original format:

The Conscience of a Hacker

by

+++The Mentor+++

Written on January 8, 1986


Another one got caught today, it’s all over the papers. “Teenager Arrested in Computer Crime Scandal”, “Hacker Arrested after Bank Tampering”…

Damn kids. They’re all alike.

But did you, in your three-piece psychology and 1950’s technobrain, ever take a look behind the eyes of the hacker? Did you ever wonder what made him tick, what forces shaped him, what may have molded him?

I am a hacker, enter my world…

Mine is a world that begins with school… I’m smarter than most of the other kids, this crap they teach us bores me…

Damn underachiever. They’re all alike.

I’m in junior high or high school. I’ve listened to teachers explain for the fifteenth time how to reduce a fraction. I understand it. “No, Ms. Smith, I didn’t show my work. I did it in my head…”

Damn kid. Probably copied it. They’re all alike.

I made a discovery today. I found a computer. Wait a second, this is cool. It does what I want it to. If it makes a mistake, it’s because I screwed it up. Not because it doesn’t like me…

Or feels threatened by me…

Or thinks I’m a smart ass…

Or doesn’t like teaching and shouldn’t be here…

Damn kid. All he does is play games. They’re all alike.

And then it happened… a door opened to a world… rushing through the phone line like heroin through an addict’s veins, an electronic pulse is sent out, a refuge from the day-to-day incompetencies is sought… a board is found.

“This is it… this is where I belong…”

I know everyone here… even if I’ve never met them, never talked to them, may never hear from them again… I know you all…

Damn kid. Tying up the phone line again. They’re all alike…

You bet your ass we’re all alike… we’ve been spoon-fed baby food at school when we hungered for steak… the bits of meat that you did let slip through were pre-chewed and tasteless. We’ve been dominated by sadists, or ignored by the apathetic. The few that had something to teach found us will- ing pupils, but those few are like drops of water in the desert.

This is our world now… the world of the electron and the switch, the beauty of the baud. We make use of a service already existing without paying for what could be dirt-cheap if it wasn’t run by profiteering gluttons, and you call us criminals. We explore… and you call us criminals. We seek after knowledge… and you call us criminals. We exist without skin color, without nationality, without religious bias… and you call us criminals. You build atomic bombs, you wage wars, you murder, cheat, and lie to us and try to make us believe it’s for our own good, yet we’re the criminals.

Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like. My crime is that of outsmarting you, something that you will never forgive me for.

I am a hacker, and this is my manifesto. You may stop this individual, but you can’t stop us all… after all, we’re all alike.

+++The Mentor+++

Meltdown – The Maths

Originally posted on this site before Y2K (now just a distant memory) it is true to say that everyone got very worked up about this. If you want my opinion (and you probably don’t) I’m still surprised there weren’t more public incidents although let me assure you there were a number of major corporations that had major issues, it’s not in their best interests to tell you that they had problems!!

The Millennium bug raises real possibilities of serious safety incidents around the world. Just consider the figures.

There are between 20 billion and 40 billion microprocessors in use worldwide, of which 20 per cent are in commercial systems. Taking the lower estimate, this means there are about four billion industrial or commercial chips in use.

If 95 per cent of these are either located or bug-free, this still leaves 200 million industrial chips that will fail – or about 10 million an hour as each time zone passes into the Millennium.

Taking an optimistic view that 99.9 per cent of these malfunctioning chips have no impact, this leaves 200,000 safety-critical chips to fail.

Assuming that the worst never happens, let us accept that luck, quick-thinking or some other agency averts 90 per cent of the potential safety-critical incidents caused by the failure of these remaining chips. That still leaves 20,000 serious safety incidents worldwide, all of them likely to occur around the same time.

Assuming the best again, let us say the hand of God thwarts 99.9 per cent of these disasters: this still leaves 20 serious safety incidents worldwide – roughly one per time zone.

By comparison, on the day of Britain’s 1987 hurricane, not a single chip in Britain failed. It is no wonder that the Government has prepared contingency plans to deal with civil unrest, collapse of the national infrastructure, a breakdown of the NHS and a series of allied disasters.

Beyond Infinity

I’ve always had a fascination with mathematics and this news article about numbers larger than infinity has always enthralled me, I used to have it pinned to my bedroom wall when I was a kid (insert scary comment about posters on walls here), Now that I don’t have a bedroom wall that I can pin things to I thought I would put it up here!!

How can you be sure that truly insoluble problems actually exist, and that they’re not just waiting for a clever solution to be found? It was the British mathematician and computer pioneer Alan Turing who established that there are some things that computers will never be able to do.

Turing based his discovery on an extraordinary piece of work by the 19th century German mathematician Georg Cantor, who discovered that there are numbers greater than infinity. Cantor’s proof can be stated in many different ways, but one simple form is this: imagine that you could write down a table showing the binary form of every integer from zero to infinity. Each number appears as an endless string of ones and zeros. Now, mark a diagonal across the table so that it joins the first bit of the first number, second bit of the second number and so on, all the way to infinity. Next, flip every one of those bits on the diagonal, changing one to zero and zero to one.

The diagonal string of binary bits you now have clearly represents a whole number. And because your original table included every whole number, it has to be one of those. Or does it? It can’t be the first number because it differs in the first bit. It can’t be the second, because the second bit is different. It can’t be the nth, because the nth bits don’t match. So you’ve just created a number that isn’t present in the list of all numbers. The only way out of this paradox is to accept that the number of integers is actually greater that infinity.

Cantor established that there was a distinction between infinity which is countable, and so-called transfinite numbers which are even bigger and can’t be counted. Transfinite numbers are important in many areas of mathematics and computer theory. Turing applied them in a particularly ingenious way. He was able to show that the number of possible algorithms, or computer programs, is infinite, but that the number of possible problems is transfinite. Hence, some problems can never be solved by a computer.

Before
0 0 1 0 0 1 1 0 1 0 0 1 0 1
1 0 1 0 0 1 1 0 1 0 0 1 0 1
0 1 1 0 0 1 1 0 1 0 0 1 0 1
1 1 1 0 0 1 1 0 1 0 0 1 0 1
0 0 0 1 0 1 1 0 1 0 0 1 0 1
1 0 0 1 0 1 1 0 1 0 0 1 0 1
After
1 0 1 0 0 1 1 0 1 0 0 1 0 1
1 1 1 0 0 1 1 0 1 0 0 1 0 1
0 1 0 0 0 1 1 0 1 0 0 1 0 1
1 1 1 1 0 1 1 0 1 0 0 1 0 1
0 0 0 1 1 1 1 0 1 0 0 1 0 1
1 0 0 1 0 0 1 0 1 0 0 1 0 1