~ overflow ~

Archive for July 18th, 2008

afd.sys – *** STOP 0×000000CB Nightmare Solved

by admin on Jul.18, 2008, under Tips & Hints

- this issue has been resolved check bottom of this posting if you only want to know what was it -

afd.sys, apparently, is a winsock helper, wich likes to crash, i’ve been doing some research on this matter, but so far, i haven’t found any answer, my hipothesis:

- Bad Network card Driver (x)
- MySQL issue ? (x)
- Bad Harddisk (corrupt drivers or afd.sys itself, or anything associated to it)

Measures taken so far:

- Netlimiter v2.0 was making server crash (tcpip.sys BSOD) – was removed and v1.3 was installed, afd.sys started to crash, Netlimiter v1.3 was disabled;
- There were 2 NIC on this machine, i removed one (off board one);

Server lasts for a day , a day and 1/2 then get BSOD by afd.sys, i if the measures don’t give results next steps:

- Disable onboard NIC (x)
- Put an offboard NIC (x)
- Replace Harddisk ?
- Remove one memory stick
- Remove other memory stick

So far i’ve only found lame answers on search engines, i believe that this is not a NIC or driver issue, but a HD issue, since it happens in many different windows versions, i’m running windows 2003 but i’ve seen people with the same issue on windows 2000, xp, vista and so on, lots of people been complaining about this issue happening on DELL machines, however, for those people this issue started to happen after a year or two, wich could state bad harddisk.

By experiencing, i’ve learnt this issue isen’t related to “how many ports you open”, not to Netlimiter v1.3, it happened with 3 p2p opened (+500 ports open) and it also happened with no downloads running.

One thing that i’ve noticed is that BEFORE the crash happens svchost.exe gets stuck, some programs start to fail, like firefox, those programs get stuck and can’t get killed. The svchost.exe that get stuck is ran by “SYSTEM” i could’t find what were the switches for it before server crashing.

Another thing that people been randonsly talking about this issue is that it happens when a port keeps open idleing for too long, this causes a memory overflow wich leads to trash on memory that ends into a DRIVER_LEFT_LOCKED_PAGES_IN_PROCESS at BSOD.

That’s all by now.

- 080719@13:14 Update -

So almost exactly after 24 hours the server crashed again, same issue same aspects and nothing new, i have disabled the on-board NIC, now let’s wait another 24 hours to see what happens.

- 080719@18:55 Update -

Machine has crashed again, now i’m going to replace the harddisk to know if it’s a hdd problem.

- 080720@18:51 Update -

I’ve got a new hdd, installed windows 2003 from zero on it , updated everything, now running perfect dark, emule, flashget, utorrent, netlimiter v1.3, vshield enterprise, eve, vidalia and rdc, uptime so far is 53m.

-080721@23:27 Update -

It’s been a day and nothing happened, with the new hdd it seems to be stable now – still running emule, flashget (torrent+http downloads), smartftp, perfect dark, mirc, netlimiter, tor and some other stuff 24/7

-080728@01:01 Update (Final)-

Server has stopped crashing the issue was the hard disk afterall. afd.sys has nothing to do with the reason of the crash, maybe this file in specific got corrupt or some other file that uses it got corrupt and generated that issue, since the old disk was too old and got no spare sectors left this would have caused the problem, having a low level format might fix the issue, however, since we talking about a 5 year old disk, it wouldn’t last for too long, i replaced the disk and now it’s working just fine.

1 Comment :, , , , more...

Configure Sendmail on Linux – Full Guide

by admin on Jul.18, 2008, under Linux Happyness, Tips & Hints

Configuring sendmail could be a real nightmare, not only because it depends on what linux distro you’re using but because there are many different terms that comes up when you do a search, so i’m keeping it simple. Before anything i’m configuring sendmail as MTA on a machine with fedora, i will be using dovecot to transfer the emails over pop3, so first all you gotta install this stuff on your machine, by using yum:

yum install dovecot sendmail system-switch-mail

to make sure you’re using sendmail as your MTA, run system-switch-mail and set it as the MTA, about dovecot, you need to start it by service dovecot start – i forgot if there’s any relevant configuration that you need to change on it, but i don’t think so.

after that you need to configure your hostname,

hostname yourhappyhostname.com

and edit the file /etc/sysconfig/network and change the hostname there too,
now we’re going to edit sendmail config file, at /etc/mail/sendmail.mc

enable this:

FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN(localhost)dnl
MASQUERADE_DOMAIN(localhost.localdomain)dnl

* if you want more info about configuring and masquerading stuff on sendmail, search for man sendmail

and for EACH domain you want to have emails into, add those weird lines on the same sendmail.mc file:

Cwyourdomain.com
Cwmail.yourdomain.com

note that it’s Cwyourdomain.com and Cwmail.yourdomain.com — ALSO note, that you need to ask your DNS provider, probably your host, to add the mx record for you, it should be:

domain.com. IN MX 10 mail.domain.com.

you can’t do that unless you run the DNS server, there are some hosts that set it automatically, to know if your mx record is right, you should do this command on shell:

dig domain.com mx +noall +answer

so continuing configuring sendmail, after saving the file, you need to compile it, by this command:

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

after that we need to do a new user for the email (no you can’t use your email as root you stupid!) to do that so you need to have root access to the server, you add a new user :

useradd -d /path/to/user/home/dir username;passwd username

this will add and prompt for the new user password, and then you can add aliases for that user at /etc/aliases wich could help you to address multiple emails with the same name, like webmaster@site1.com , webmaster@dumbfuck.com, webmaster@yomama.com and so on, basically you will put this:

alias: user,user2,userx

where alias is the email name, in that example it would be webmaster: site1,dumbfuck,yomama (if the users were site1, dumbfuck and yomama). Now that you’re done with the aliases, you need to update them on the system by:

newaliases

Now, you need to setup the emails in here: /etc/mail/virtusertable this is very simple, you just add the email you want and the username for example:

webmaster@site1.com site1
webmaster@dumbfuck.com dumbfuck
webmaster@yomama.com yomama
@idiotic.com idiotic

note that the last entry has nothing before @, wich means that anything@idiotic.com will fall into the same login, wich is very helpfull when only you own the domain and stupid people can’t type your username right. After editing this file you need to update the .db one by:

makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable

and THEN… THEN!!!! you restart sendmail by:

service sendmail restart

now you’re ready, you can put on your happy email client the user login and password you did with useradd and as server you will use mail.yourdomain.com (this depends on your mx record, set by your host as explained).

you can even build a little .sh script to setup emails quickly for you, the commands you will need to give are the following:


useradd -d /home $1;passwd $1;
vi /etc/mail/sendmail.mc;m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf;
vi /etc/aliases;newaliases;vi /etc/mail/virtusertable;makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable;service sendmail restart;

and that’s it (not really a full .sh script cuz i’m tired of you) – so that’s how you configure a mail server WITHOUT Exim or CPanel gayness, all hail the holy bash!

Note: After configuring the emails you need to setup a Reverse DNS, due the spam, some big servers, like yahoo, do a reverse dns check to know if your server is really a server or just some spammy script kid, to know if your server has a reverse DNS working, give a:

nslookup 1.1.1.1

where 1.1.1.1 is obviously your server ip — don’t use a domain or it will not work — if you get an error here you will need to setup a reverse dns by named or contact your host to set it for you – it’s best contact your host first so you don’t loose time configuing named for nothing.

Usefull links:
http://cbl.abuseat.org/lookup.cgi – a place to know if your server is black listed due misconfig or malusage and how to remove it
http://www.linuxselfhelp.com/quick/sendmail.html – the only relevant page on the many searchs i did on this.
http://www.linuxmail.info/ – a spammy site with a little usefull info about mail servers and postfix.
http://www.google.com – a useless place to go when you have no answers and seek for more questions and confusion about this matter.

— 080813 Update —
You might want to change the line at sendmail.cf :
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1,Name=MTA’)dnl

replacing 127.0.0.1 with your machine’s ip that way sendmail will work right (this fix the issue of not being able to receive emails due connection refused, you can also test if it’s working by telnet mail.yourserver.com 25 or by netstat -nl to list the listening connections)

Leave a Comment :, , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!