≡ Menu

vps

FreeBSD Jail Access Private Network Via NAT and PF

I've FreeBSD 7.x server with 3 jails are configured to run a mail, web and MySQL services. My FreeBSD box has two network interfaces. First, interface is connected to LAN and other is directly connected to the Internet via public IP. My DNS servers are hosted on private network (LAN). FreeBSD 7.x jail only support one interface and one IP address. How do I configure jail (FreeBSD vps) to access my DNS servers hosted inside my LAN using PF firewall?
[click to continue…]

Turn on telnet server on Debian Linux

Q. How do I install and turn on telnet server on Debian Linux VPS Server?

A. I don't recommend using telnet at all on VPS or any other Linux / UNIX server. Telnet transfers all data including passwords in clear text format. It is recommended that you use ssh which is installed by default.

Use ssh and connect to remote server called boo.myvps.com, enter:
ssh user@boo.myvps.com
ssh root@boo.myvps.com
ssh root@server-ip-address

In case you still need telnet, type the following two commands (not recommended
# apt-get install telnetd
# /etc/init.d/inetd restart
$ telnet server-ip-address

Q. I’m using OpenBSD as VPS os (guest os) under VMWARE server. However OpenBSD pauses for a few seconds to give me a chance to provide parameters to the kernel at boot> prompt. I'd like to force boot loader to wait for 30 seconds instead of default timeout. How do I setup bootloader timeout?

A. OpenBSD uses boot program. The main purpose of this program is to load the system kernel while dealing with the downfalls of the PC BIOS architecture. This program acts as an enhanced boot monitor for PC systems, pro viding a common interface for the kernel to start from. By default, boot attempts to load the kernel executable /bsd. If it fails to find the kernel and no alternative kernel image has been specified, the system will be unable to boot.

/etc/boot.conf file and timeout parameter

/etc/boot.conf is configuration file for bootloader. Open file using text editor:
$ sudo vi /etc/boot.conf
Append / modify timeout parameter as follows:
set timeout 30
Save and close the file. Above line set the 30 second pause at boot-time.

Can I use tape drive with XEN VPS / Guest oses?

Q. I’ve CentOS 5.0 server running XEN kernel. VPS Guest is Linux distribution. How do I use tape drive with XEP Guest os?

A. You can’t use character devices such as tape drives in Xen guests. This is limitation of Xen. It doesn't have the ability to export character devices to multiple guests oses.

However for backup you can use rsync or ftp server or NAS server.

Apache redirect domain.com to www.domain.com

Q. What's the best way to redirect domain.com to www.domain.com on the url address bar whenever someone omits or skip the www from domain.com? My site can be reached by two different URLs. For example http://domain.com/about/us.html and http://www.domain.com/about/us.html

How do I do configure Apache web sever vps for this task?

A. Apache (web server) 301 redirect is the most efficient and search engine friendly method for webpage redirection. You can place following code Apache’s httpd.conf vhost section or in .htaccess file.

$ vi .htaccess
Append following config code:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=permanent,L] 

Save and close the file. Above code will redirect users to www.domain.com url.

OpenVZ Virtual Machine (VPS) Management

Now, my VPS is up and running. How do I manage my hardware node and VPS? How do I see a list of all running VPSes? How do I see memory usage and other stuff?
[click to continue…]