Setting up the Linux terminal to use proxy servers
If you are running proxy at IP 192.168.1.1 with the proxy port as 3128 and wish to use wget, lynx and other utilities from a shell prompt then export the following variables on the command line.
export http_proxy=http://192.168.1.1:3128/
export ftp_proxy=http://192.168.1.1:3128/
export ftps_proxy=http://192.168.1.1:3128/
export https_proxy=http://192.168.1.1:3128/
Now your will be able to use the update commands from the command line.
Preventing Graphics Hotlinking on a Web Site
Bandwidth theft or hotlinking is a direct linking to web site’s files (images, video, etc.). It can be prevented with the mod_rewrite module.
Place rules like below into the vhost.conf or .htaccess files for the domain (for example www.example.com):
RewriteEngine on
RewriteCond % !^$
RewriteCond % !^http://(www\.)?example\.com(/)?.*$ [NC]
RewriteRule \.(gif|jpg|jpeg|png|swf)$ - [NC,F]
Sender Policy Framework (SPF) is a relatively new method of fighting spam. As more time passes, this protocol will be used as one of the standard methods of fighting spam on the internet. Essentially, an SPF record is a type TXT record placed into a domain’s DNS zone. The string placed within the TXT record specifies a list of authorized host names/IP addresses that mail can originate from for a given domain name. Once this entry is placed within the DNS zone, no further configuration is necessary to take advantage of servers that incorporate SPF checking into their anti-spam systems. These are added the same way as a regular A, MX, or CNAME record would be.
A typical example TXT record for SPF looks like this:
serverbuddies.com. IN TXT v=spf1 a:mail.serverbuddies.com ~all
serverbuddies.com. IN TXT “v=spf1 a mx ~all”
source for this information can be found here: http://www.openspf.org/SPF_Record_Syntax
SPF Record Testing Tools
http://www.kitterman.com/spf/validate.html
Setting up the Tunnel
The most common methods of setting up a tunnel are through putty or through command-line SSH.
To open an SSH tunnel via the command line, run:
ssh -L3307:127.0.0.1:3306 -p 22 -N -t -x user@myhost.com
Connecting with MySQL
You can connect to the MySQL server!
You want to choose 3307 for your local port so that it does not conflict with your existing local copy of MySQL.
mysql -u username -ppassword -h 127.0.0.1 -P 3307
How to configure to use RPMforge ?
Reference: http://dag.wieers.com/rpm/FAQ.php#B2
It’s very easy. Just install the latest rpmforge-release package for your distribution and architecture.
This will automatically install the configuration and GPG keys that are for safely installing RPMforge packages.
The configuration of Yum is inside the rpmforge-release package.
You need to install it yourself.
If you’ve done that, the rest is simple. Upgrade your system by doing:
yum update
You can add new software by typing:
yum install [name of package]
Or update installed software:
yum update [name of package]
Or search for software in the local repository meta-data:
yum search [keyword]
Or simply list all available software:
yum list available
From time to time you may want to save some diskspace:
yum clean