Archive for the ‘General’ Category

I R Mac

Sunday, May 11th, 2008

Well, after five years of being pretty anti-mac for various reasons, I decided to bite the bullet and give them another go…. I’m now £3k out of pocket and loving it!

Why did I go for a mac? Many designers have been surprised at the fact that I have stuck with Windows (lately Vista SP1) for my design and development. They have all attempted to convert me to the darkside. I have never relented as windows did everything I needed it to do and had a variety of browsers to test on. I went for the mac this time round out of curiosity really. When I last used a mac it was an old iMac in 2001/2, I found it clunky, slow and a pain to understand.

What is my experience so far? Overall very good, I’m still yet to be convinced by only having one dock/toolbar as I use two displays. At the very least I see great merit in having a toolbar at the top of each display for the application currently in focus on that display. My primary reason for that is that I tend not to have a “primary” display, I use my displays equally during development. I may have Photoshop open in one and Dreamweaver in another and jump between the two. It would be even worse if I get another display (having to jump over two other windows simply to change a setting).

Perhaps this will change as I get used to working with the mac and change my style a little.

One of the other reasons for never switching to a mac was that I felt that the software support just didn’t cut it - WOW has that changed! I have so far bought / installed the following software which has made a huge difference to my interoperability with customers/suppliers/colleagues:

Office 2008 - keeps the windows boys happy
iLife/iWork 08 - keeps the mac lot happy (and TBH it’s simple enough for the Linux chaps too)
A variety of FTP /BT/SSH applications to help administrating the servers
Many browsers for cross-browser testing (IE:mac, Firefox, Safari, Opera)
Creative Suite (Photoshop/Dreamweaver etc)

I have also kept my main Windows Vista machine (it was far too expensive to just sell/bin) and my two linux machines as the thing I have noticed most is that the browser may perform differently based on the OS, particularly with fonts.

So, I took it upon myself to spend the last week using nothing but the mac, to force me to get used to it a little. The biggest thing I miss really is my comfort factor. With using windows since 3.1/1 I know where EVERYTHING is, I know all the DOS commands and switches I need and I know exactly how to hack the OS to do what I want. I now feel like a little boy in a scary wood. I’m scared to edit the kext or applescript, I’m worried about not adding the right switch in the terminal (despite it being very similar to my nix boxes), that will come with time. Font support is a little different too and that’s highlighted on some websites which seem to have no appreciated for non-windows users (another reason I wanted the mac). As mentioned before, I’m going to investigate the possibility of another toolbar for the second display, there may be an app I can find which does it! The modular nature of apple applications is very strange to me as a windows user, of course I bought Dreamweaver/Photoshop etc for the mac and being able to move each part to another screen is a little weird (coupled with the fact that despite my high screen resolution, all fonts are a little large for my liking).

I can see why apple have been so successful of late, and to be honest I think that’s helped greatly in terms of the software support from 3rd parties. For example, I have a Windows mobile PDAPhone (HTC TytnII), I can sync it with all of my mac apps as well as the windows ones - I was very impressed at that.

Would I buy more apple hardware? Absolutely, although I don’t think I am a complete convert yet and rather than become a fan-boy who loves everything by a particular manufacturer simply because they made it, I would have to say that I can see many benefits and pitfalls of each OS depending on how it’s being used and the environment it’s in. Those lines are becoming a little more blurred and it will be interesting to see what the next five years holds.

….and one last thing - 2 updates since the OS CD was produced on the mac - 32 in a few weeks on the Vista box!

Change default SSH port

Sunday, April 27th, 2008

By default, SSH runs on port 22. This leads to thousands of automatic scans and scripted attacks being launched.

No reason not to change your port exists to the best of my knowledge. Get it changed!

Add a line in the file /etc/ssh/sshd_config:

Port 6969

Reload sshd

#/etc/rc.d/sshd reload
OR
service sshd restart

A couple of simple things here will ensure you of success:

  •  Check that whichever port you choose is not already in use
  • After restarting ssh, do not close that window. Instead, open a new connection leaving the existing connection open. If anything has gone wrong and you wish to revert your changes back, you can do so in your existing window.

Adding SSH welcome and warning messages

Sunday, April 27th, 2008

Using SSH as a login method for *NIX boxes is pretty common. One thing I am regularly asked by our dedicated server users is how to add messages that can be viewed when a user is accessing the system. Keep in mind that it would be well worth restricting root login and running SSH on a non-standard port

There are two methods for doing this, you can use just one or both depending on the desired effect.

Firstly (in time order) there is the banner which appears after a username has been typed. This is normally used to provide a warning against unauthorised access as follows:

login as: user
************************NOTICE***********************
This system is optimised and configured with security and logging as a
priority. All user activity is logged and streamed offsite. Individuals
or groups using this system in excess of their authorisation will have
all access terminated. Illegal access of this system or attempts to
limit or restrict access to authorised users (such as DoS attacks) will
be reported to national and international law enforcement bodies. We
will prosecute to the fullest extent of the law regardless of the funds
required. Anyone using this system consents to these terms and the laws
of the United Kingdom and United States respectively.
************************NOTICE***********************

To add this to your server, you will need to edit your ssh config file (/etc/ssh/sshd_config) and uncomment/add the following line: Banner /etc/banner

You will then want to create/edit the banner you have just referenced: ( pico /etc/banner)

You will need to restart the ssh daemon for this to work: ( service sshd restart)

When you login, you should now see your message displayed after you have entered a username.

The second method is MOTD (Message of the day). The difference here is that this is displayed after login has completed. Some of the most common uses depending of the numbers of users with access:
Rules for accessing files/services
A message for the next sysadmin due to monitor the box
A list of common commands and how to execute them
Anything else of use

To add a MOTD, you will need to edit the motd file : ( pico /etc/motd ), add your message and save the file, it should now be displayed on successful login. If you were to use both it would display something like this:

login as: user

************************NOTICE***********************
This system is optimised and configured with security and logging as a
priority. All user activity is logged and streamed offsite. Individuals
or groups using this system in excess of their authorisation will have
all access terminated. Illegal access of this system or attempts to
limit or restrict access to authorised users (such as DoS attacks) will
be reported to national and international law enforcement bodies. We
will prosecute to the fullest extent of the law regardless of the funds
required. Anyone using this system consents to these terms and the laws
of the United Kingdom and United States respectively.
************************NOTICE***********************

user@domain.com’s password:
Last login: Sun Apr 27 14:37:24 2008 from user-22222222.domain.com

You have somehow managed to login….We are now monitoring your access,
our systems administrators have received a page to alert them of your
presense. If you are not a fully authorised user acting within your
rights then logoff immediately to prevent further action.

2007 Roundup

Friday, January 4th, 2008

The blog was started in June 2007, personally, I think these numbers are pretty good for a site which emerged from obscurity. Finding the time (and thinking of the content) is actually far more difficult than I imagined and thinking of unique content is much more difficult than leaching it like a lot of others do:

Page views : 8581
Unique visits: 3702
Posts: 44
Comments: 6

Equally, here are the month by month stats since the root domain became live:
Feb-07 300
Mar-07 6532
Apr-07 1075
May-07 1865
Jun-07 6284
Jul-07 22147
Aug-07 9802
Sep-07 6329
Oct-07 11878
Nov-07 13118
Dec-07 6288

Merry Christmas

Wednesday, December 19th, 2007

We Break up for Christmas tomorrow. I’d like to wish you all a very Merry Christmas and a Happy New Year.

Here’s to 2008

I am back

Sunday, October 21st, 2007

I have been away for a while working on a number of projects but I have cleared the diary to add some more value here. If you have anything you would like to discuss or you would like some advice on any of the topics we cover here, please contact me.

Using htaccess to password protect your site the easy way

Sunday, July 29th, 2007

The scenario is that you have a group of files within a folder that you want to password protect. You want to keep them secure from prying eyes.

I did write huge tutorial on this using the shell but then a)wordpress decided to have a fit and lose the work (que: Anger) and then I thought b) a lot of people may not have shell access and c) a lot of people probably don’t care so here is the short version using our .htpasswd creator tool.

(more…)

Basic Linux and UNIX commands

Tuesday, July 3rd, 2007

Many people are now using either dedicated boxes or virtual dedicated hosting. Knowing your way around the filesystem and how to manipulate it is key to running a good, stable, secure service. It also makes takes as a website owner much easier and quicker.

Here is a list of common Linux and/or UNIX commands which may come in handy:

(more…)

From bin man to web developer in one blog

Saturday, June 30th, 2007

Do you consider yourself to be a Web Designer or a Web Developer?

If you ‘create’ websites, what do you call yourself? A common misconception nowadays is that if you have created a page in frontpage you know how to make websites. Is this valid? I don’t know!

(more…)