Proxy access for cPanel/WHM/webmail.
With Linux Shared Hosting accounts, you have access to a control panel that contains the admin functions of your account. Generally you would access this using the following syntax:
http://yourdomain.com/cpanel
http://yourdomain.com:2082
This URL causes a problems for some owners, as it attempts to connect to port 2082. This is an uncommon port and may be blocked by corporate and public firewalls, thus preventing access.
If you are unable to access your cPanel using the above URL, you can access it using the following syntax:
http://cpanel.yourdomain.com
This syntax does not connect using an uncommon port, and will allow you access. The same rules apply for Webmail and WHM.
http://whm.yourdomain.com
http://webmail.yourdomain.com
Note: You will need to create A records for each subdomain above if not created by default during account creation process.
MySQL Proxy Server
The MySQL Proxy is an application that communicates over the network using the MySQL Network Protocol and provides communication between one or more MySQL servers and one or more MySQL clients. In the most basic configuration, MySQL Proxy simply passes on queries from the client to the MySQL Server and returns the responses from the MySQL Server to the client.
To install, unpack the archive into the desired directory, and then modify your PATH environment variable so that you can use the mysql-proxy command directly:
# cd /usr/local
# tar zxf mysql-proxy-0.7.2-osx10.5.tar.gz
# PATH=$PATH:/usr/local/mysql-proxy-0.7.2-osx10.5-x86/sbin
If you want to update the path globally on a system, you may need administrator privileges to modify the appropriate /etc/profile, /etc/bashrc, or other system configuration file.
Reference: http://dev.mysql.com/
Automatically create proxy subdomain DNS entries in WHM.
This can be enabled on the Tweak Settings page.
Enabling this option will allow WHM to automatically create DNS entries for the following 4 subdomains for every user’s account (where example.com stands for the user’s domain):
* cpanel.example.com
* webmail.example.com
* webdisk.example.com
* whm.example.com
These subdomains allow users to easily access the features included with a cPanel installation.
We can use /scripts/proxydomains to create DNS entries manually.
Reference: http://cpanel.net
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.
Redirect all HTTP traffic through the proxy.
If you would like to redirect all HTTP traffic through the proxy without needing to set up a proxy manually in all your applications you will need to add some rules
iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp –dport 80 -j DNAT –to-destination 10.0.0.1:3128
And
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp –dport 80 -j REDIRECT –to-ports 3128
Where eth1,eth0 are the LAN, WAN devices and 10.0.0.1 is the IP address of your LAN device.