WebHSP Community Forums
May 21, 2012, 06:08:41 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: SMF - Just Installed!
 
   Home   Help Search Members Login Register  
Pages: [1]
  Print  
Author Topic: Best Practices - You Can Help!!  (Read 7633 times)
Pat
Administrator
Full Member
*****
Offline Offline

Posts: 152


85595191
WWW Email
« on: April 24, 2005, 10:39:46 AM »

To ensure a secure and high performance server, there are many security and processing tips that we would like to share.   These are what we call 'Best Practices' for users on a shared hosting environment.  Of course VPS and Dedicated server owners will also benefit from following these tips.

We hope you find them helpful and informative.
[ol type=\'1\'][li]Passwords

Many sites are compromised due to using insecure passwords. It is important that you use passwords that are more difficult for the script kiddies to hack.

  • no shorter than 8 characters
  • should be a mix of alpha and numeric characters
  • should include upper and lower case alpha characters
  • should not spell a word in the dictionary
  • change your password on a regular basis
[/li][li]Scripts and Programs

Customers should keep their scripts and programs updated to the most recent secure release from the Vendor.  Many of the scripts are compromised because they are using older versions, have set their directories to world-writable (chmod 777) and/or easy admin passwords.

Insecure scripts are easily compromised. vBulletin, PHP Nuke, PHPBB and Formmail are the most common scripts compromised. Also, some scripts are just insecure.  PHP Nuke falls into that category in our opinion.  Evil doers are able to access the forums and formmail to send out large volumes of email or instigate outgoing DOS attacks, which puts the servers at risk from a performance and a spam block standpoint.

  • Scripts installed via cPanel or Fantastico can easily be kept up-to-date through your cPanel.
  • Scripts installed via Plesk can be kept updated through your Plesk control panel.
  • Ask your webmaster to ensure the 3rd party scripts they install are kept up-to-date.
[/li][li]Use :fail: instead of :blackhole:

Many customers do not want to receive all the junk email that comes through and set their email to :blackhole:.  Blackhole is much more server intensive than :fail:, so if you have any :blackhole: settings in your email settings, we recommend you change these too :fail: and always use :fail: for future use.

[/li][li]Scripts and email settings

When setting up 3rd party PHP scripts that require outgoing email, such as forums, for example, set a valid email address from the domain the script is installed on and make sure "SMTP authentication is required" setting is set to 'yes'.  Without these settings, your emails may fail.

[/li][li] Do not chmod Directories to 777

Do not set your directories to be world-writable (chmod 777). Those directories open the server up for abuse and compromise because anyone can write to those directories, including uploading malicious scripts.[/li][/ol]
« Last Edit: April 24, 2005, 12:50:20 PM by Pat » Logged

Pat  Smiley
Web HSP
Mark
Newbie
*
Offline Offline

Posts: 2


WWW
« Reply #1 on: May 04, 2005, 12:04:52 PM »

Quote
  • Use :fail: instead of :blackhole:
I'd been using :blackhole: for years, and never noticed any problem. After reading this, I changed it to :fail:. But now I'm getting bounce messages for emails addressed to invalid addresses on my domains, which is bothersome. So I'm thinking of going back to :blackhole:

Any comments?
Logged

Trish
Newbie
*
Offline Offline

Posts: 13


WWW Email
« Reply #2 on: May 04, 2005, 04:00:39 PM »

I've never gotten that with :fail:. I screen email for one client and it got to the point of almost complete saturation with spam, so I set up a couple of boxes and had all unrouted email (i.e. anything address to other than those specific boxes) set to ":fail: no such address here". I know the spammers sure didn't stop but I didn't get a single bounce message after that, and what a delight to check email with not one piece of spam ever coming through Cheesy

Maybe double-check your settings, Mark?

Just for those who might need the guidance - you do this in your CPanel under Mail --> Default Address -->Set Default Address. Any mail not addressed to a specific existing mailbox will then bounce back to the sender.

Thanks for all the useful info, Pat. I'll be checking into some things on my accounts Smiley
Logged
Pat
Administrator
Full Member
*****
Offline Offline

Posts: 152


85595191
WWW Email
« Reply #3 on: May 04, 2005, 07:47:06 PM »

Hi,

Trish, thanks for the great response.  Howard (one of our techs) was going to respond to this post for me and informed me you beat him to it and were right on.

You did a nice job of explaining 'how to' which I'm sure many folks will appreciate.

Mark, if you continue to have problems, feel free to open a ticket so one of our techs can review your setup for you.  :fail: is so much easier on the server that we'd really prefer everyone to use it.

Sincerely,

Pat Smiley
Logged

Pat  Smiley
Web HSP
Trish
Newbie
*
Offline Offline

Posts: 13


WWW Email
« Reply #4 on: May 05, 2005, 08:04:40 AM »

Thanks for the kind words Smiley

Here's an anti-spam measure I have used on some websites, just a small bit of javascript which will hide your email address from the spambots despite it being displayed on your site.  I am no programmer and don't know if this is the best method (maybe someone with more knowledge can back this up or show a better way), but it's been working for me. I never get spam at the addresses I've cloaked with this. If you're already getting spam, you might want to set up a new email address first and then cloak it like this on your site.

Just insert this script in the HTML of the web page where you want the address to show. This example uses joesmith@yourdomain.com as the email address we want to cloak:


Code:
<script type="text/javascript">
<!--    
addy2='yourdomain.com'
addy1='joe'  
addy=('smith' + '@' + addy1 + addy2)
document.write('<A href="mailto:'
+ addy + '">' + addy + '</a>')
//-->
</script>

You just change the parts in bold to your own information:

addy2='yourdomain.com'
addy1='joe'
addy=('smith' + '@' + addy1 + addy2)

Basically you are splitting the 'joesmith' part of the address into 2 parts (you can split it any way you like - 'j' and 'oesmith', for example), then the script combines all the parts. The end result is a normal clickable email link to your visitors, but not readable by the spambots.
Logged
Pat
Administrator
Full Member
*****
Offline Offline

Posts: 152


85595191
WWW Email
« Reply #5 on: May 05, 2005, 08:22:19 AM »

Hi Trish,

This is awesome information.  I'm sure professional designers know this, but I edit a lot of our website information myself and if you notice, have not posted any email addresses because of this reason.

Thanks for the tip!!!

Pat Smiley
Logged

Pat  Smiley
Web HSP
Mark
Newbie
*
Offline Offline

Posts: 2


WWW
« Reply #6 on: May 05, 2005, 10:26:46 AM »

I'm only getting a few of the emails I called "bounce" messages in my prior post, and looking at them more carefully I don't think they are what I said before. I think they are just spam addressed to a non-existant address in my domain with probably also in bcc an address that I don't publicize, but that has gotten out a little bit.

So never mind what I said.

It's a good discussion though.
Logged

Pat
Administrator
Full Member
*****
Offline Offline

Posts: 152


85595191
WWW Email
« Reply #7 on: May 05, 2005, 11:44:25 AM »

Quote
It's a good discussion though.
[snapback]222[/snapback]

Wow, see how informative of a discussion a misunderstanding created?  Cool!

 
Logged

Pat  Smiley
Web HSP
WHSP-Jarrod
Guest


Email
« Reply #8 on: May 09, 2005, 05:27:07 AM »

Here are a few resources that may be useful:

http://www.randpass.com/cgi-bin/randpass

The above is a random password generator that will create 10 passwords that conform to Pat's suggestions above.

Just a note of warning, however, when creating passwords for MySQL database users, avoid using the @ symbol, as certain web applications will get confused by this, as that symbol usually indicates the start of the server name where the MySQL database resides.

http://automaticlabs.com/products/enkoderform

This tool will also hide e-mail addresses from spambots with an extremely high degree of succcess.  Some spambots are able to read the source of a webpage to pick out e-mail addresses, but the Enkoder form here even prevents that.

Hope these help!
« Last Edit: May 09, 2005, 05:27:32 AM by WHSP-Jarrod » Logged
Notawiz
Newbie
*
Offline Offline

Posts: 19


WWW
« Reply #9 on: August 29, 2005, 10:20:16 AM »

Hi,

There are also some other ways:

- use the escape() and unescape() functions of JavaScript (see code complete sample);
- use PHP or Perl to turn the email address into a graphic inside an <img> tag.

But if you can, use a form, because the biggest flaw of a "mailto" link is that you loose the occasion of storing the message content directly into your database for later use.

But hey, I've seen forms like this:
Code:
<form action="mailto:mymail@mydomain.com" method="post">
...
</form>
and that is REALLY silly !

Hope this also helps.
Logged

Jan Van Aerschot
Xquisitus Technical Director
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!