Cpanel Hosting

Thursday 11 July 2013

DNS cache problem on local machine !!!

DNS cache is most common problem in now a days and largely its create difficulty to web developer and technician who are working to solve the web issue.You can clear the DNS cache from your local machine by using following commands  as per your local machine operating system.

1) For Windows

- Start -> Run -> type cmd
-In command prompt, type

ipconfig /flushdns

2) For Linux

- To restart the nscd daemon, type

/etc/rc.d/init.d/nscd restart in your terminal
3) For Mac OS X

- type lookupd -flushcache in your terminal to flush the DNS resolver cache.
ex: bash-2.05a$ lookupd -flushcache

4) For WIN 7

Here is how to fix that corrupted DNS cache in WIN 7.

1. Click the Microsoft  Start logo in the bottom left corner of the screen
2. Click All Programs
3. Click Accessories
4. RIGHT-click on Command Prompt
5. Select Run As Administrator
6. In the command window type the following and then hit enter:

ipconfig /flushdns

Saturday 6 July 2013

WordPress Blog Brute Force Flood Underway !!

Recently we have seen on-going global attack on WordPress installations across every web host in existence. This attack is well organized and specially targets the file wp-login.php. Some of the ramifications of this attacks  are

1) Sites are loading extremely slow.
2) Unable to login to WordPress Admin Panel.
3) Website could even intermittently go down for undisclosed periods of time.

So what needs to bed one. Here are some tips we will let you know to protect your WordPress blog.

1) Make sure that you keep updated your WordPress blog with all the plugins ,themes to the most current WordPress version. WordPress team is constantly upgrading and patching the software for
inherent security.

2) We may recommend you to change your WordPress admin panel password as soon as possible. Make sure your password is atleast eight ten characters long and contain a random mixture of character as well as special symbols.

3) We may recommend you to allow access to wp-login.php file from only limited IP’s.


order deny,allow
Deny from all
allow from 1.2.3.4


Note: – Please replace 1.2.3.4 with your actual IP address. We do not guarantee a solution or fix for this issue, But with the above methods we managed to stopped the attacks atleatst temporarly. Try it at your own risk.

Tuesday 2 July 2013

Setup HAProxy on CentOS !!!

HAProxy stands for High Availability Proxy, for the High Performance TCP/HTTP load balancing.

Installation Steps :

# yum -y install wget gcc gcc-c++ autoconf automake make

# wget http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.20.tar.gz /download

# tar -zxf haproxy-1.4.20.tar.gz

# cd haproxy-1.4.20

# make TARGET=centos

# cp haproxy /usr/sbin/haproxy

Now take configuration files :

# wget http://layer1.rack911.com/haproxy/haproxy-standard.cfg -O /etc/haproxy.cfg

# wget http://layer1.rack911.com/haproxy/haproxy.init -O /etc/init.d/haproxy

================================================
Sample /etc/haproxy.conf file:

global
maxconn 4096
pidfile /var/run/haproxy.pid
daemon

defaults
mode http
retries 3
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000

listen server0 192.168.1.1:80
mode http
balance roundrobin
server server1 192.168.1.2:80 check ( Replace with your public IPs)
server server2 192.168.1.3:80 check
================================================
Start the load balancer now

Note : Just make sure you have set a proper data syncronization between your two web-servers