Posted: October 19th, 2012 | By: Chris_C | Filed under: Security, Security & Optimization | Tags: Mozilla FIrefox, MyIP, SOCKS connection, SOCKS host, SOCKS proxy, SSH, VNC | No Comments »
A lot of people ask this simple question and there’s about 3 easy options. The first one is a SOCKS proxy via the SSH command. This is executed through the following command:
ssh -ND (port) (username@IP/subdomain)
For example:
ssh -ND 8080 user@1.2.3.4
This would make SSH make a connection to user@1.2.3.4, if a password was accepted, and a SOCKS connection to listen on 8080/tcp.
If the password was accepted, you can open up Mozilla Firefox and access the Edit -> Preferences area. Click on the Network tab then Settings. Enable “Manual proxy configuration”.
SOCKS host: localhost
Port: 8080
To verify, go to MyIP.dk to see if your IP address on MyIP.dk is the same as your VPS IP address.
Another way is to install a VNC server on the virtual private server and to connect in with the VNC protocol to access the virtual private server like a desktop computer. I will write up a tutorial about how to do this at a later date!
Posted: October 6th, 2012 | By: Chris_C | Filed under: CentOS, Debian, Security, Security & Optimization, Ubuntu | Tags: apg, apg tutorial, Enable RPM Forge CentOS, random password generator, RPM Forge | No Comments »
This is a common question a lot of people are afraid to ask.
The easiest way I have found is through a utility called apg or automatic password generator. It’s available on most Debian and Ubuntu based operating systems by typing apt-get install apg -y and it will install for you.
If you have CentOS, you need to enable RPM Forge’s repositories.
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
CentOS 6 – 32 bit, download here.
CentOS 6 – 64 bit, download here.
CentOS 5 – 32 bit, download here.
CentOS 5 – 64 bit, download here.
You install your appropriate package with rpm -i rpmforge-release-*.rpm
Once installed, yum install apg should install apg for you as apg is maintained by RPM Forge.
When you want to create a random password, you type in apg into the Terminal screen of your computer or your SSH client into your server.
# apg
Please enter some random data (only first 8 are significant)
(eg. your old password):>
Cabnobaj9 (Cab-nob-aj-NINE)
Omodand2 (Om-od-and-TWO)
erlErrorl4 (erl-Err-orl-FOUR)
Tedd8Knil (Tedd-EIGHT-Knil)
nebViObobs1 (neb-Vi-Ob-obs-ONE)
WoossOnyax7 (Wooss-On-yax-SEVEN)
I just type in random keyboard gibberish when they prompt me for random data.
For maximum password security, I would normally combine two passwords together such as Cabnobaj9Omodand2, Omodand2erlErrorl4, or nebViObobs1WoossOnyax7.
Posted: June 22nd, 2012 | By: Rob_K | Filed under: Security & Optimization, Tutorials, Windows, Xen | Tags: GPLPV, PV-on-HVM, PVonHVM, Windows, Xen | No Comments »
The GPLPV package is a driver for Microsoft Windows, which allows Windows systems virtualised with Xen (such as VPS6.NET’s) access to the network and block drivers of the Xen dom0. These drivers provide a significant performance and reliability gain over the standard devices emulated by Xen, and are recommended for anyone using our Windows VPS service.
Installation of the package is simple, and has no known compatibility issues with any our systems.
- From the desktop of your Windows VPS, download the file matching your system:
- Run the .msi file and follow the on-screen directions to complete installation.
- Check the Device Manager for “Xen Net Device Driver” and “Xen Block Device Driver”, which indicate a successful installation.
- Reboot the VPS, either from within Windows or from SolusVM.
Your system should now experience enhanced network and disk speeds!
This article is also available in the VPS6.NET Knowledgebase: https://vps6.net/my/knowledgebase/68/How-to-Install-GPLPV-PV-on-HVM-Drivers-on-Windows-Server-2008-Systems.html
Posted: February 7th, 2012 | By: Rob_K | Filed under: Security & Optimization, Tutorials, Uncategorized | Tags: CPU, Tutorials | No Comments »
To check the CPU allocation and information on your VPS, simply log in to SSH as root, and run the following command:
# cat /proc/cpuinfo
This article is also available in the VPS6.NET Knowledgebase:
https://vps6.net/my/knowledgebase/63/How-to-Check-CPU-Info-with-SSH-on-Linux-VPS.html
Posted: January 9th, 2012 | By: Rob_K | Filed under: Security & Optimization, Tutorials | Tags: Timezone, Tutorials | No Comments »
You may find that your virtual server’s default timezone is not the timezone you (or your users) reside in. Updating your timezone is simple:
First, log in to your VPS as the root user via SSH, then run the following command to list all available timezones (there will be many):
# find /usr/share/zoneinfo/
You can use grep to refine the search:
# find /usr/share/zoneinfo/ | grep -i turkey
Once you have selected a timezone, create a symbolic link to /etc/localtime:
# ln -f -s /usr/share/zoneinfo/CST6CDT /etc/localtime
To verify the timezone change, use date:
# date
That’s it! Your new timezone should be set.
This article is also available in the VPS6.NET Knowledgebase:
https://vps6.net/my/knowledgebase/53/How-to-Update-VPS-Timezone-OpenVZ.html
Posted: January 8th, 2012 | By: Rob_K | Filed under: OpenVZ, Security & Optimization, Tutorials, Xen | Tags: Optimization, RAM, SSH | 1 Comment »
In the course of monitoring your VPS, one of the first things you will want to check is RAM (memory usage). Linux includes a few easy-to-use tools, including free and ps, described here:
The simplest memory reporting tool is free. To use it, simply run:
# free -m
You will see an output like this:
total used free shared buffers cached
Mem: 512 462 49 0 46 127
-/+ buffers/cache: 287 224
Swap: 2047 0 2047
The most important figure to look at is the value under “used” in the “buffers/cache” row. This will tell you how much RAM your processes are currently using, in megabytes. Memory fork errors will occur if the total amount of memory and swap space is lower than this number. To see how much RAM is free, check the “free” column in the “buffers/cache” row.
Another useful tool is ps, which will show you the percent of total RAM used by each running process:
# ps aux
Sample output:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 10368 632 ? Ss Jan07 0:00 init [3]
root 2 0.0 0.0 0 0 ? S< Jan07 0:00 [migration/0]
root 3 0.0 0.0 0 0 ? SN Jan07 0:00 [ksoftirqd/0]
This article is also available in the VPS6.NET Knowledgebase:
Posted: December 19th, 2011 | By: Rob_K | Filed under: Security & Optimization, Tutorials | Tags: CentOS, MySQL, Optimization, Tutorials | No Comments »
MySQLTuner is a script that will assess MySQL performance and recommend steps to maximize performance. To install and run MySQLTuner, log in to your VPS as the root user and follow these steps (for CentOS):
1. Download MySQLTuner:
# wget http://mysqltuner.com/mysqltuner.pl
# chmod 755 mysqltuner.pl
2. Run MySQLTuner:
# ./mysqltuner.pl
Configuration can be set in the /etc/my.cnf file.
This article is also available in the VPS6 Knowledgebase:
https://vps6.net/my/knowledgebase/26/How-to-Optimize-MySQL-with-MySQLTuner.html
Posted: December 19th, 2011 | By: Rob_K | Filed under: Security & Optimization, Tutorials | Tags: Security, Tutorials | No Comments »
ConfigServer Firewall, or CSF, is a common Linux security suite. Log in to your VPS as the root user and run the following commands to install CSF:
# rm -fv csf.tgz
# wget http://www.configserver.com/free/csf.tgz
# tar -xzf csf.tgz
# cd csf
# sh install.sh
If WHM/cPanel is installed on your server, you can configure CSF from WHM, otherwise edit the files in /etc/csf.
For more information, see: http://configserver.com/cp/csf.html
This article is also available in the VPS6 Knowledgebase:
https://vps6.net/my/knowledgebase/24/How-to-Install-ConfigServer-Firewall-CSF.html
Posted: December 19th, 2011 | By: Rob_K | Filed under: Security & Optimization, Tutorials | Tags: Security, SSH, Tutorials | No Comments »
A simple, but very effective, step you can take to enhance your server’s security is to update the port SSH uses to a port other than 22 (the default). To do this, login to your VPS as root and follow these steps:
1. Open the SSH config file with the vi editor:
# vi /etc/ssh/sshd_config
2. Press the “A” key to enter editing mode. Look for this line, near the top of the file:
#Port 22
3. Uncomment the line (remove the pound symbol) and change the port value to any number of your choosing:
Port 6486
4. Press ESC, then type :wq (colon-w-q) and press enter to save and exit the file.
5. If you are running a firewall, ensure that the port you selected is open.
6. Restart the SSH service:
(CentOS) # service sshd restart
(Debian) # /etc/init.d/ssh restart
You will now access SSH through the new port, like this:
# ssh root@127.0.0.1 -p 6486
This article is also available in the VPS6 Knowledgebase:
https://vps6.net/my/knowledgebase/23/How-to-Modify-SSH-to-Use-a-Port-Other-than-22-.html
Posted: December 19th, 2011 | By: Rob_K | Filed under: Security & Optimization | Tags: Linux, Optimization, Security | No Comments »
If you find yourself needing to check all open/listening ports that your server is using (a good idea for security), run the follow command via SSH:
# netstat -tulp
The command will print a list of all open ports, the programs using them, their PIDs, local addresses, and connection type (tcp/udp).
This article is also available in the VPS6 Knowledgebase:
https://vps6.net/my/knowledgebase/22/How-to-List-All-OpenorListening-Ports.html