spammers are using my server

I found an example, I did this:

$ttl 38400 @ IN SOA ( 1385376458 10800 3600 604800 38400 ) @ IN NS @ IN NS IN A IN A IN A IN A IN A IN A IN A IN A IN A IN A IN MX 5 IN TXT "v=spf1 a mx ip4: ?all" IN A

restarted bind, and now I could restart apache2 as well.

No luck on starting up virtualmin, but at least I can now create manually those hosts file for all the domains and get those up and running which seems now the most important thing.

All the info in /etc/apache2/sites-available/ seems all right:

SuexecUserGroup "#1004" "#1004" ServerName ServerAlias ServerAlias ServerAlias ServerAlias DocumentRoot /home/hn/public_html ErrorLog /var/log/virtualmin/hollandsenieuwe.com_error_log CustomLog /var/log/virtualmin/hollandsenieuwe.com_access_log combined ScriptAlias /cgi-bin/ /home/hn/cgi-bin/ ScriptAlias /awstats/ /home/hn/cgi-bin/ DirectoryIndex index.html index.htm index.php index.php4 index.php5 Options -Indexes +IncludesNOEXEC +SymLinksifOwnerMatch +ExecCGI allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch allow from all AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch RewriteEngine on RewriteCond %{HTTP_HOST} RewriteRule ^(.*) [R] RewriteCond %{HTTP_HOST} RewriteRule ^(.*) [R]


Take a look at the Apache error logs, to find out where the relative links point to. Without concrete example I can’t say much more.

I agree Lex, you might find this a bit easier to fix if you could access Virtualmin, and just re-generate some of those files, and/or access your backups.

After starting Webmin, do you see any errors in /var/webmin/miniserv.error?

Also, what is the output of this command:

netstat -an | grep :10000


Thanks people!

Here’s the output from netstat:

tcp 0 0* LISTEN udp 0 0*

I just restarted webmin now, and in the error log, I see:

[25/Nov/2013:14:39:50 +0000] started [25/Nov/2013:14:39:50 +0000] Using MD5 module Digest::MD5 [25/Nov/2013:14:39:50 +0000] PAM authentication enabled

This server, is supposed to be an alias of

There is nothing in this here telling everybody that that is the case:

$ttl 38400 IN SOA ( 1385376454 10800 3600 604800 38400 ) IN NS IN NS IN A IN A IN A IN A IN A IN A IN A IN A IN MX 5 IN TXT "v=spf1 a mx ip4: ip4: ?all" IN A

How is it supposed to work?

About not being able to see virtualmin:
over links (in a terminal) it does work and asks me to login.

Which got me thinking, and yes, I needed to do this:

iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 10000 -j ACCEPT
iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 20000 -j ACCEPT

Now I’m in.

Ok, if via virtualmin I ‘preview’ the website, I get to see the sitre that I’m supposed to see.

In the real world however, I still ge to see the ‘default domain for this ip’ ( which is a complete different website.

What what you guys and girls do now?

(out of ideas)

Alias-servers get their own BIND zone too, so it’s not incorrect that your “” has one. Are you seeing any problems with it? You need to be more specific in what problems you have precisely, as opposed to making post after post, telling us what stuff you do and try.

At some point, if you can’t get your machine working again, it might be easier to restore a backup. Trying to remotely fix all problems that arose due to your deleting part of /var is probably beyond the scope of this forum.

Ok thanks Locutus,

I don’t have a good backup, as I didn’t know what exactly to backup. I’ll learn that after this all working again.

By the way, I might be over-posting :), but I’m doing that so if somebody else ever has a similar problem they might find something they’re looking for.

Ok, so I’m left with this main problem:

servers that are aliases of other servers, are not showing the site they should but in stead they show the main server for that ip. If I change the main server for that ip, then that’s the site shown.

The same goes for sites, in which I created a custom username. For example, the site shows the default website for that ip address as well, and for that site I created the custom username: hn (what normally would have been hollandsenieuwe) when I set it up.

Sorry if I haven’t been very clear…

Easiest solution might be, if it’s not too many, to delete and re-create the alias servers. Since they don’t have many settings to configure, that should go quite quickly.

Good thinking, thanks!

Same thing happens. So the deleted stuff (early in the var partition) must have to do with it, but it became only obvious after restarting bind9, or at least, after rebooting.

Which is going to make this more complicated I guess.

In /var/bind I have now all the hosts files. Is there something near, that I’ve deleted too and that’s necessary for these aliases to work?

I really am sorry for all the help I’m asking. I’ll make sure I’ll start to learn about how to best backup this kind of stuff.

And here everything seems as it should be: the in /etc/apache2/sites-available looks as it should do to me, with the “hn” in stead of the “hollandsenieuwe”.

What is the output of this command:

grep -i virtualhost /etc/apache2/sites-enabled/*.conf

That will show the IP/port used for the various Apache configs… maybe something in there will stick out as a problem.


Thanks Eric, looks all pretty normal. Shows all the “real” domains (not the aliases), with either one of the two ip’s I use on the server, like this:

/etc/apache2/sites-enabled/ /etc/apache2/sites-enabled/

But then all of them…

Ok, I didn’t do anything, but everything works all of a sudden. I don’t know what caused that, some dns caching going on or so? (I did restart bind and apache all the time, but hey)

Anyway, I’m not complaining.

First of all, before going to bed: THANKS A LOT everybody! It really is good to know there’s a place where I can come with my silly server problems.

I was just checking up backing up in the cloud plans, and they are really cheap, but then they have little statements that if they find out you’re a business you have to take a business plan…

But if somebody wants 35% discount from justcloud, here you go:

Tomorrow I’ll try and see if I can do something about the original subject here, the spammers.