Hello. My name's Kate. I love Linux, WordPress - owned a WordPress dedicated design studio, a beginner entrepreneur who co-founded Asia software company. This is where i blog about Linux, WordPress, daily life and other interesting stuff
Status: -

You are on the Nineteen Labs weblog archives for June, 2007.

OUR ARCHIVES : June 2007

Disable Cache in Squid 2.5

Add/modify squid.conf :

#no local caching
maximum_object_size 0 KB
minimum_object_size 0 KB

# specify uncachable requests
acl all src 0.0.0.0/0.0.0.0
no_cache deny all

or
# caches nothing based on time
acl Working time 08:00-16:00
no_cache deny Working

# avoid having a cache directory
cache_dir null /tmp
or
cache_dir null /null

High Anonymous Proxy (squid 2.5) : header_replace User-Agent

UPDATED

We can’t see the latest yahoo pages if ‘header_replace User-Agent’ set to ‘unknown’ or anonymous User-Agent. To avoid this, change into :

header_replace User-Agent Mozilla/5.0 (en) Gecko/20070515 Firefox/2.0.0.4

or

header_access User-Agent allow all

before

header_access Deny deny all

High Anonymous Proxy (squid 2.5)

UPDATED

I manage squid 2.5 to become high anonymous proxy.

# cd /usr/local/etc/squid
# vi squid.conf

Change this in #Miscellanous
forwarded_for off
[client ip won't recognize]

Add this to #Miscellanous
header_access Allow allow all
header_access Authorization allow all
header_access Cache-Control allow all
header_access Content-Encoding allow all
header_access Content-Length allow all
header_access Content-Type allow all
header_acccess Date allow all
header_access Expires allow all
header_access Host allow all
header_access If-Modified-Since allow all
header_access Last-Modified allow all
header_access Location allow all
header_access Pragma allow all
header_access Accept allow all
header_access Accept-Enncoding allow all
header_access Accept-Language allow all
header_access Content-Language allow all
header_access Mime-Version allow all
header_access Cookie allow all
header_access Set_Cookie allow all
header_access Retry-After allow all
header_access Title allow all
header_access Connection allow all
header_access Proxy-Connection allow all
header_access All deny all

header_replace User-Agent anonymous
[browser will be identify as anonymous]

Save and reboot server
# reboot

or Re-read squid.conf without restarting
# squid -k reconfigure

Restore proxy to previous setting
add # besides header_replace to turn off.

Visit Proxy Blind to check proxy results

They will identify as no proxy or highly anonymous.
Proxy types according to Proxy Blind (description from their site)

No proxy : In this case (the majority of internet users), http requests are sent directly from your machine to the server. There is no privacy or caching benefits. A non-proxied system will display the following information:
REMOTE_ADDR = Your IP
HTTP_VIA = blank
HTTP_X_FORWARDED_FOR = blank

Transparent Proxy : A transparent proxy anounces to the world that it’s a proxy, and passes on your information. It provides no privacy improvements (except against poorly coded sites that only look at REMOTE_ADDR and not HTTP_X_FORWARDED_FOR). It can provide a benefit by caching frequently accessed pages; many companies also use this system for filtering purposes. A transparent proxy will display the following information:
REMOTE_ADDR = Proxy’s IP
HTTP_VIA = Proxy’s IP
HTTP_X_FORWARDED_FOR = Your IP

Anonymous Proxy :An anonymous proxy offers the caching benefits of a transparent proxy, while hiding your IP address (by replacing with either the proxies IP, or a random address. The downside to this approach is that sites that use address detection to establish unique users (online games, voting, some logins) will not be able to distinguish you from others in your domain. Of course, that might be a bonus sometimes. An anonymous proxy will display the following information:
REMOTE_ADDR = Proxy’s IP
HTTP_VIA = Proxy’s IP
HTTP_X_FORWARDED_FOR = Proxy’s IP, or random

Highly Anonymous : A highly anonymous (often known as an elite proxy) makes your system look the same as a non-proxied system (with the proxy servers IP address). This provides the best security; however, all the caveats of an anonymous proxy are still present. In addition, an anonymous proxy’s existance can be detected, and the server can suggest workarounds, but there’s no way to detect an elite proxy. Again, that may be your goal. A highly anonymous proxy will display the following information:
REMOTE_ADDR = Proxy’s IP
HTTP_VIA = blank
HTTP_X_FORWARDED_FOR = blank

Production Line Built From Legos Builds Lego Cars

an autonomous production line capable of building Lego cars

Failed to stop mysqld services

Running services mysqld stop or /etc/rc.d/init.d/mysqld stop [failed]

First, do this : # ps -ef | grep mysqld
If showing up :
# /usr/libexec/mysqld --defaults-f lib/mysql --user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-locking

Look in to /var/run/mysqld to find mysqld.pid
# cd /var/run/mysqld
# ll

If there’s no mysqld.pid inside /var/run/mysqld directory, create mysqld.pid
# touch mysqld.pid

Assign chown to a mysqld.pid file
# chown -R mysql:mysql mysqld.pid
Why do we assign mysql:mysql to the file?
Because the warning shows –user=mysql

Assign chmod to a mysqld.pid file
# chmod g=rw mysqld.pid
# chmod o= mysqld.pid

It changes permission to a format : -rw-rw----

Assign chown to the directory, /var/run/mysqld. Why? because the owner permission for this directory isn’t mysql.
# chown mysql:mysql /var/run/mysqld

Restart Server
# reboot

Stop mysqld
# /etc/rc.d/init.d/mysqld stop
Result : [ok]

Start mysqld
# /etc/rc.d/init.d/mysqld start
Result : [ok]

Check log
# vi /var/log/mysqld.log

Another Way to shutdown FTP

Related to FTP ‘connection timed out’ and ‘a command to shutdown proftpd’, (other) easy way to Shut Down FTP is by using a firewall, close ftp ports!. :-)

FTP ‘connection timed out’

Ftp suddenly goes off and got ‘connection timed out’ before even connected
To determine what’s wrong with FTP :

  • take a look /var/log/messages file for detailed error reports.
  • the server hostname may not be resolved. In this case you should put the record like “SERVER_IP SERVER_HOSTNAME” into /etc/hosts.
  • Make sure that inetd/xinetd is running.If inetd/xinetd is not running you also may be experiencing problems with sending mail (SMTP). Easy checking by sending mail. Or do :
    ps -aux | grep inetd
    or
    ps -aux | grep xinetd
  • Check following configuration in /etc/proftpd.conf :

    IdentLookups Off
    UseReverseDNS Off

No problem found in the log, the server hostname resolved, i don’t have a problem sending email so i’m pretty sure that inetd/xinetd is running, proftpd.conf is correct. Something must blocked out FTP.
Last solution : Check firewall settings to be sure that ftp ports are opened.

Note : this can be tricky in plesk, since its firewall modules says it’s opened. Check a system firewall.

Important! Backup Part 1 : in Virtuozzo

Backup is an important thing to do before updating or upgrading Plesk (also important if we’re going to update or upgrade CentOS/RHEL). We can restore system to a previous state, if something goes wrong.

There are many ways to do backups. Here is a series of Backups :
I’m starting with Virtuozzo. Virtuozzo backups all system, files and databases

Make Backup
VPS Management > Maintenance > New Backup

Restore Backup
VPS Management > Maintenance > Check Backup Data, Then Restore Backup

Renew Backup/Replace Old Backup with New One
VPS Management > Maintenance > Check Backup Data, Then Renew Backup

Delete Backup
VPS Management > Maintenance > Check Backup Data, Then Delete Backup

This site powered : WordPress. Made with PC (sorry, MAC), Coffee and Tofu