Thursday, June 13, 2013

Blacklisting

Steps to Be Followed When Your IP Address Is Blacklisted


If your Domain-Name or IP Address is blacklisted at any ISP, you need to send them a request to remove it from their blacklist database(de-listed).

Here are the basic steps that you should follow for the whitelisting/de-listing procedure at the ISP in question: 
a) You should follow the URL links & apply for whitelisting/de-listing using their online form
and/or 
b) You should send an email to the mentioned email address.
List of ISP's:
Comcast:
Follow this URL: www.comcastsupport.com/rbl
Fill out the online form & submit.
Cox:
Follow this URL: http://postmaster.cox.net/confluence/display/postmaster/Error+Codes
On the page, search the listed error codes to match the one you received when you were blacklisted. Click the URL suggested to get to the appropriate online form. Then submit.
EarthLink:
Send an email to: blockedbyearthlink@abuse.earthlink.net
Use the subject line (example: Blocked 255.255.255.2555)
More details are given on these pages:
http://earthlink.net/block
http://support.earthlink.net/articles/email/email-blocked-by-earthlink.php
Gmail:
Read Gmail's Bulk Senders Guidelines here: http://www.google.com/mail/help/bulk_mail.html
Then follow this URL for the Bulk Sender Contact Form: http://mail.google.com/support/bin/request.py?contact_type=bulk_send&hl=en
Fill out & submit.
Hotmail:
Follow this URL: https://support.msn.com/eform.aspx?productKey=edfsmsbl&ct=eformts
Fill out the online form & submit.
AT&T/SBC Global/Bellsouth:
Follow this URL: http://rbl.att.net/cgi-bin/rbl/block_admin.cgi
Fill out the online form & submit.
For questions related to a request, please contact them at: abuse@rbl@abuse-att.net
Juno/NetZero/Bluelight (United Online):
Follow this URL: http://www.unitedonline.net/postmaster/blocked.html
Fill out the online form & submit.
Roadrunner/Adelphia:
Follow this URL: http://security.rr.com/mail_blocks.htm
Follow this URL to find whether your IP is blacklisted: http://security.rr.com/cgi-bin/block-lookup
USA.NET:
Follow this URL to find whether your IP is blacklisted: http://postmaster.usa.net/html/error.html
Verizon:
Follow this URL: http://www2.verizon.net/micro/whitelist/request_form.asp?id=isp
Fill out the online form & submit.
Yahoo:
Follow this URL: http://help.yahoo.com/l/us/yahoo/mail/postmaster/bulkv2.html
Fill out the online form & submit.
Mail.ru:
Follow this URL for the Google page translator tool: http://translate.google.com
Check "Translate from Russian" and "Translate to English"
Enter this link in the form: mail.ru/notspam/ Then and hit Enter or Return.
Read and follow the directions on the newly translated page.
AOL.com:
If you have been blacklisted, visit AOL Postmaster
You will need to open a Postmaster Support Request to put yourself on AOL's whitelist
(*The AOL whitelist is meant for permission-based bulk senders. Bear in mind that if you are on their blacklist, you may have done something to violate their technical guidelines or best practices)
You can also apply for Whitelist Status immediately.
List of Blacklist's [RBL/DNSBL]:
Lashback:
Follow this URL to find whether your IP is blacklisted:
http://www.lashback.com/support/UBLQuery.aspx
Fill out the online box and follow the links.
BarracudaCentral:
Follow this URL to find whether your IP is blacklisted: http://www.barracudacentral.org/lookups
Then follow this URL: http://www.barracudacentral.org/rbl/removal-request Fill out the online form & submit
Spamhaus:
Follow this URL to find whether your IP is blacklisted: http://www.spamhaus.org/lookup.lasso
Fill out the online form, submit and follow appropriate links.
Surbl:
Follow this URL to find whether your IP is blacklisted: http://george.surbl.org/lookup.html
Fill out the online form & submit.
Invaluement.com:
Follow this URL to find whether your IP is blacklisted: http://dnsbl.invaluement.com/lookup/
Fill out the online form & submit.
DNSBL Manitu:
Follow this URL to find whether your IP is blacklisted: http://www.dnsbl.manitu.net/
Fill out the online form & submit. You can also send an email to the link provided.
Uribl:
Follow this URL to find whether your IP is blacklisted: http://lookup.uribl.com/
Hostkarma blacklist:
http://ipadmin.junkemailfilter.com/remove.php Fill out the online form & submit.
Spamcop:
http://www.spamcop.net/fom-serve/cache/298.html For network and server administers.
http://www.spamcop.net/fom-serve/cache/405.html For bounce message recipients and end-users.
http://www.spamcop.net/bl.shtml Blacklist IP look-up

Sunday, April 4, 2010

How to block users from accessing your site based on their IP address

How to block users from accessing your site based on their IP address

Blocking users by IP address is pretty simple with .htaccess.
So here it is the example:

Order allow, deny
Deny from 192.168.0.10
Deny from 212.155.
Deny from 1.2.3.4 5.6.7.8 127.0.0.1
Allow from all

Let’s take a look at the code line by line:
The first line “Order allow, deny” tells the web server the “Order” in which the Allow and Deny directive will be evaluated. It simply says: Give access to all hosts that are not present in the Deny from list and are present in the Allow from list. With allow, deny order Allow list is looked up first and then the web server checks the deny from list. So as we have allow from all – all access is allowed. Then the allowed access is filtered based on the Deny lists. With allow,deny access is disabled by default.

If we change the order to “deny, allow” then all access is enabled by default and only users in the deny lists are blocked. However as the deny is being processed first allow directives will override any maching settings set in deny directives.

The default Apache order is deny,allow. So you can skip the first line in your .htaccess file if you do not need to change the order in which the Deny and Allow rules are being evaluated by the web server.

So to keep the .htaccess simple you can just use:

Deny from 192.168.0.10
Deny from 212.155.

Basically you can use such rules in your .htaccess file to block a particular user, or a network from accessing your site.
You can put several IP address in a Deny or Allow rule. For example:

Deny from 1.2.3.4   5.6.7.9

The IP addresses must be separated by a space or tab.

You can put entire networks as

Deny from 212.155.

This will block all users which IP addresses start with 212.155

Or to block all access to your site:

Deny from all

And then add another line to enable access only for yourself:

Allow from 1.2.3.4

Where “1.2.3.4” should be replaced with your computer IP address.

Force SSL/https using .htaccess and mod_rewrite

Sometimes you may need to make sure that the user is browsing your site over securte connection. An easy to way to always redirect the user to secure connection (https://) can be accomplished with a .htaccess file containing the following lines:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]

Please, note that the .htaccess should be located in the web site main folder.

In case you wish to force HTTPS for a particular folder you can use:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} somefolder
RewriteRule ^(.*)$ https://www.domain.com/somefolder/$1 [R,L]

Zero database size

When we login to any clients cpanel , it is not showing actual database size , instead it is showing zero. With phpmyadmin we can see correct size but as you login to capnel >> click on database >> and see the size , it will show O mb db size.

sol-

Edit line
disk_usage_include_sqldbs=1 ( you need to set it to '1' if '0' )

in /var/cpanel/cpanel.config

OR

If you are using 11.25 stable, check the following option in Tweak Settings:

"When displaying disk usage in cPanel/WHM include Postgresql and MySQL® disk usage. [Requires MySQL® 5+] (SQL disk usage is only updated every four hours)"

The mysql usage will be updated shortly.

then run:

#/scripts/update_db_cache


Virtuozzo administration.

Commands to monitor load and memory for hardware node -virtuozzo

1) vzlist -o laverage,veid

2) vzlist -o ctid,name,laverage,kmemsize -s laverage
This one gives a good overview of the load and memory usage
this comes back to tells you
123 vpsname.com 12.02/7.76/7.07 21272584


3) vcalc -v (vpsid)

4) vmstat vpsid

5) cat /var/log/messages | grep OOM | grep ve=661 | wc -l

here 661 is your vps id.

If there are number of customers complaining for dead services like ftp, http, named and so on
You need to check through this script and ask them to INCREASE the RAM.




Friday, April 2, 2010

server setup + directadmin

1)First install yum

This is for x86_64 Bit centos -5.3.

http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/

rpm --import http://mirror.centos.org/centos-5/5.3/os/x86_64/RPM-GPG-KEY-CentOS-5
rpm -ihv http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/python-elementtree-1.2.6-5.x86_64.rpm
rpm -ihv http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm
rpm -ihv http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/python-sqlite-1.1.7-1.2.1.x86_64.rpm
rpm -ihv http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/m2crypto-0.16-6.el5.3.x86_64.rpm
rpm -ihv http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/python-urlgrabber-3.1.0-5.el5.noarch.rpm
rpm -ihv http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/sqlite-3.3.6-2.x86_64.rpm
rpm -ivh http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/rpm-python-4.4.2.3-9.el5.x86_64.rpm
rpm --nodeps -ihv http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm
rpm -ihv http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/libxml2-2.6.26-2.1.2.7.x86_64.rpm

rpm -ihv http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/yum-metadata-parser-1.1.2-2.el5.x86_64.rpm
rpm -ihv http://mirror.centos.org/centos-5/5.3/os/x86_64/CentOS/yum-3.2.19-18.el5.centos.noarch.rpm

yum update
-----------------
2) yum install gcc g++ gcc-c++ flex

---------------------
3) wget http://www.directadmin.com/setup.sh
---------
4)chmod 755 setup.sh
-------------

5)[root@server~]# ./setup.sh
*** 64-bit OS ***
*** that being said, this should be a CentOS system. ***
*** We do not support any other OS in 64-bit. ***
*** If this is not CentOS, install a 32-bit OS (i386)***
Please enter your Client ID : xxxxx
Please enter your License ID : yyyyy
Please enter your hostname \(server.domain.com\)
It must be a Fully Qualified Domain Name
Do *not* use a domain you plan on using for the hostname:
eg. don't use domain.com. Use server.domain.com instead.
Do not enter http:// or www

Enter your hostname (FQDN) : host.domain-name
Client ID: xxxxx
License ID: yyyyy
Hostname: host.domain-name
Is this correct? (y,n) : y


Is eth0 your network adaptor with the license IP? (y,n) : n
Enter the name of the ethernet device you wish to use : venet0:0

Is 174.34.162.60 the IP in your license? (y,n) : y
DirectAdmin will now be installed on: Enterprise 5.3
Is this correct? (must match license) (y,n) :y

You now have 2 options for your apache/php setup.

1: customapache: older software. Includes Apache 1.3, php 4 and frontpage.
2: custombuild 1.1: newer software (recommended). Includes any Apache version, php 4, 5, or both in cli and/or suphp. Frontpage not available.
Post any issues with custombuild to the forum: http://www.directadmin.com/forum/forumdisplay.php?f=61

Enter your choice (1 or 2): 2

Would you like the default settings of apache 2.2 and php 5 cli? (y/n): y
-----------------

NOTE: if you are installing directadmin on vps server then

Is eth0 your network adaptor with the license IP? (y,n) : n and put "venet0:0" for name of the ethernet device
other wise enter the opting "yes" for
Is eth0 your network adaptor with the license IP? (y,n) : y
=============================================


Thursday, March 18, 2010

htacces: Invalid command 'SecFilterEngine' + 500 Internal server error

We are getting 500 Internal Server Error on the site.

All the file permissions and ownerships are correct.
-----------------
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@the-landscape-design-site.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
----------------------------------------------------
As I checked the apache error logs, it is showing-
----------------------------------------------------------------------------------------------
[Wed Mar 17 02:25:40 2010] [alert] [client xx.xx.x.xxx] /home/USER/public_html/.htaccess: Invalid command 'SecFilterEngine', perhaps mis-spelled or defined by a module not included in the server configuration, referer: http://www.websitename.com/
---------------------------------------------------------------------------------------------

Fix:

vi /home/USER/public_html/.htaccess

and search for the line containing words "SecFilterEngine" and "SecFilterScanPOST" and make comment for these lines and you can add following 4 lines(without number) proper code to disable mod security for this particular site.

--------------------------------

SecFilterEngine Off

SecFilterScanPOST Off


--------------------------------
save your .htaccess and restart apache on server. Your site should work now.

**********************************************

You can also disable mod security for a domain through virtual entry in httpd.conf.

First you should login to your server via SSH as the ‘root’ user.
You should then use nano or your favorite text editor (ie. pico, vi etc…)
to open the /etc/httpd/conf/httpd.conf (sometimes /usr/local/apache/conf/httpd.conf or /etc/apache2/httpd.conf) file.

Notice: You may have to edit a different file such as
/etc/httpd.conf/conf.d/vhosts.conf if your server is setup to use a separate vhost configuration file.

You should then locate the vhost for the domain in question and paste the following code into the vhost:
--------------------------

SecFilterEngine Off

SecFilterScanPOST Off

-------------------------
Now you just have to save, exit and restart apache. Run service httpd restart or /etc/init.d/httpd restart or whatever script you have to restart Apache.

You can manage most of the main mod_security settings from a .htaccess file, so you can control it down to a per-domain, per-directory and/or per-file basis, switching off individuals rules, added new ones and just turning it off.

*********************