Tuesday, June 9, 2015

Tutorial host multiple website using Virtualmin

Now, i want to share my experienced in hosting multiple websites on your VPS that running Centos 6 64 Bit, using Virtualmin as web management. In previous tutorial, i have share how to install wordpress in VPS, and if you follow my tutorial from beginning (all tutorial are in this blog, just visit angelimus.blogspot.com) i have install many packages to my VPS and NOT Using Fresh Install to Install Virtualmin, so there are a few thing can cause trouble in future, but it's not a big deal, i believe that every problem has a way out.
Since installing Virtualmin, i use VPS from Evoburst.com, cause it have more than enough RAM and CPU Resource.


Now, after through the "boring part" (Tutorial Post-Installation Wizard Virtualmin) but maybe the important ones.

If in your VPS you install SSH Dropbear (Part 5 - Installing SSH Dropbear on Centos 6 64Bit), then you must follow this tutorial from Step 1, if you not installing SSH Dropbear, just skip this step, and go to Step 2

Step 1 : Solving conflict on Port 443 between SSH and SSL
Open your terminal
sed -i 's/OPTIONS="-p 443"/OPTIONS="-p 444"/g' /etc/init.d/dropbear
Now your port for SSH Dropbear is "444", conflict solved.

Step 2 : Register free domain at freenom.com
(If you already have registed domain you want to use, like mynewvps.com or mywebhost.com, etc, the point is it registered and still active, then you can skip this Step, go to Step 3)

  1. Open your browser, and go to http://www.frenom.com (why freenom? because it free, no cost at all, and this is for testing purpose).
  2. Find domain you like, then click check availability, choose from the list thats free, (see pic below)
  3. Click Checkout
  4. Click USE DNS, in type your VPS ip address there, type the same ip addpress on both. (see picture below)
  5. Click continue, and follow the instruction until finish.

Step 3 : Host Multiple Website
Open your browser, and go to Virtualmin by type
https://<vps ip address>:10000/
1. Login with username = root and password = (your root password)
2. i assume you already done step (Tutorial Post-Installation Wizard Virtualmin)
3. See on left panel, Click on Create Virtual Server (see image below)



4. After click it, see on right panel
Domain name (from freenom.com) = angelimusvps.tk
Description = (type anything you like, eq web1, etc)
Administration password = (type anything you like, eq passweb1, etc)
Administration username = Choose Custom Username and write (from freenom) angelimusvps.tk

Custom username is directory name where your public_html or your directory for website files.
eg: if you type angelimusvps on Custom username, and then in number 7 below, it must be

cd /home/angelimusvps/public_html/

I highly recomended that you using Custom Username same as your Domain name for beginning, so it will not confuse you in the future.


5. Open your browser, try input your domain from freenom (my domain is angelimusvps.tk)

6. It show Forbidden, because there are no website file
7. Now Open your terminal, type
cd /home/angelimusvps.tk/public_html/
echo "This is My First Website using Virtualmin - angelimus.blogpsot.com" >> index.html
Note : change angelimusvps.tk with your created domain

8. Try open your browser again, and type your domain
9. Now you're done,
10. To Create Multiple website, just go to Step 1
when you get stuck into trouble, just take a rest a while... because in the same time, you already resolve it without knowing it

Tutorial Post-Installation Wizard Virtualmin

Now we will configure Post-Installation of Virtualmin, there was a simple wizard provided by Virtualmin to setting Virtualmin based on your VPS resource.


Let's start Post-Installation Wizard
I assume, you already done installing Virtualmin ()
Open your browser.
https://<vps ip address>:10000/
you will see like this (see pic below)

Click Next
Memory Use
1. Preload Virtualmin libraries?
- if your VPS have low resource of memory and you have low frequency of visiting Virtualmin, Disable this option, but if you have more RAM, Enable this.
- Even you Disable this option, Virtualmin UI run stable.

2. Run email domain lookup server?
- if you have high activity in emailing, enable this.
- but if you have less memory, disable this, your email processing is bit slower.

Virus Scanning
Run ClamAV server scanner?
- if your server have high intense of receiving email, you better enable this option, because it lower your CPU Usage but consuming more memory (100Mb), so if you think your server will have activity in emailing, its better to rent vps with high ram
- if your server have low frequency of emailing, disable this.
Spam filteringRun SpamAssassin server filter?
- If your system is going to host domains that will receive a large amount of email, filtering incoming messages for spam can generate significant CPU load. This is due to CPU use by the SpamAssassin mail filter when it is started, so its better you enable this, because its only consume 30Mb,

Database Servers
1. Run MySQL database server
2. Run PostgreSQL database server
- If your server only run email server or DNS hosting, you not need both option above, but if you want to host website on your VPS, i recomend enable MySQL database server, its has more compatible with application nowadays.
Note : if you see >> MySQL has been enabled, but cannot be used by Virtualmin. Use the MySQL Database module to fix the problem.
It means you have not entering the mysql password, just click next, and you'll be asked for MySQL username and password. (check previous tutorial about mysql).
After that the wizard will ask if you want to change the password.

MySQL database sizeMySQL can be configured to trade off memory use for performance, depending on how much RAM your system has and how heavily you expect the database to be used.
The option is clearly explained about how often your mysql is used. If you not sure, just choose leave defaul settings

DNZ Zone
For this, just type server1.angelimus.com or serv1.example.com, etc, ant tick "Skip check for resolvability". I'll explain this in later tutorial.

Password
For this, read the explanation carefully, for me, i choose Store Plain text Password, but i strongly recomended you using Only Stored Hashed Password i'll create this tutorial later.

All Done. Click Next

Install Virtualmin on Centos 6 64 Bit

Hello, today i want to share how to install Virtualmin as Web Management for VPS. Virtualmin is a powerful and flexible web hosting control panel for Linux and UNIX systems based on the well-known Open Source web-based systems management GUI, Webmin. Manage your virtual domains, mailboxes, databases, applications, and the entire server, from one comprehensive and friendly interface.

Note : Because there are a lot of tutorial regarding Virtualmin, so in this tutorial i just share how to install virtual min and what requirement to run Virtualmin, another tutorial will be on diffrent page of tutorial, i will post it one by one, just wait for it, all tutorial about Virtualmin will be updated in this page.

Link my Tutorial about Virtualmin on Centos 6 :



Read this FAQ carefully (Link Source FAQ):

1. Should I install Webmin before I run install.sh?
- No. The install script runs best on a freshly installed Grade A supported Operating System.

2. Should I install Apache, Postfix, MySQL, Dovecot, etc. before I run install.sh?
- No. The install script runs best on a freshly installed Grade A supported Operating System.

3. What if I already installed Webmin on my system?
- If you installed from the standard package type for your system downloaded from Webmin.com or Virtualmin.com, everything should be fine. Running install.sh should work without any trouble.

- If you installed from a third party source, or you don't know where it came from (like it was provided on a dedicated server you've rented from your hosting provider), you should uninstall it, and make sure whatever software repository it came from has been disabled.

4. What if I already installed Apache, Postfic, MySQL, Dovecot, etc. on my system?
- If you installed from the OS standard repository for your OS, everything should be fine. If you installed from any third party sources, or from source, the installation will fail and things will go badly. The install script cannot accommodate packages installed from non-standard sources. It just isn't that smart.
- If you can re-install your OS, it is recommended that you start with a freshly installed Grade A supported Operating System.

Explanation about the FAQ.
In point 1 and 2, it mention about install.sh, it means a script to do an automate install of Virtualmin that officially provided by Virtualmin.com (here is the link)

How about my experienced?
  • I Have successfully install Virtualmin without re-install my OS, Before i install Virtualmin in my VPS, i have do several package instalation from my own tutorial in this blog including MySQL, SSH Dropbear, PPTP VPN, Wordpress, and KDE.
  • I'M NOT SAID that my installation of Virtualmin, there are no problem in future because i'm not re-install the OS.
  • Point 4 in FAQ, encourage me to NOT re-install the OS, because all my packages are from standard repository of Centos 6, you maybe seen my previous tutorial not like the ordinary tutorial, many source i used from github, actually what i grab from github (my own account zaq111 for storing code) is my own code that i create to automate the installation, so people can simple remember.

Okay, lets Start, hope there are not much trouble in Future

Open your terminal and type this (or just copy and paste it on your terminal)
wget http://software.virtualmin.com/gpl/scripts/install.sh
sh ./install.sh
Just wait and follow the instruction, this process may takes about 10 - 20 Minutes or maybe less (i not sure about this, because when i install, i go for about 1 hour to the market :P) After installation complete.
Open your browser, and add your VPS IP or domain in browser.
https://<vps ip address>:10000/

Username = root
Password = your root password

Until this step, i will stop the tutorial, it means you have install successfully Virtualmin, but its not over yet, there are a few configuration to make Virtualmin running smoothly on your VPS and not overload the CPU or Memory. See you in next tutorial about Virtualmin.

Tutorial Install KDE on Centos 6 64Bit

Hello, now i'm gonna share how to install KDE on Centos 6, a lot of tutorial like this before, many of them are good, no much trick available in this tutorial, so its generally same.
Why KDE, i prefer KDE, because i use less memory than GNOME, maybe i wrong, but this is what i feel, maybe for some other, they prefer GNOME, its like taste, diffrent people with diffrent taste :P
For now, i will not include explanation from wikipedia, maybe you can search by yourself :P


FYI : In this tutorial i using my VPS from Evoburst.com, (Low Price VPS) because it have 4GB of Memory, and SSD Support, but if you using another VPS Host, there are no problem at all.

Okay, lets start installing KDE.

Part 1 - Installing KDE on Centos 6
wget https://raw.githubusercontent.com/zaq111/bash/master/angelimus-install-kde.sh
chmod +x angelimus-install-kde.sh && ./angelimus-install-kde.sh

this maybe take a while, about 3-10 minute, depend on your VPS internet speed and your VPS processor performance, and you will see this (see pic below)

Input Password and Verify

Now you have done install KDE on your Centos 6, and then, the next step is accessing your KDE from Windows using Real VNC.

Part 2 - Accessing KDE from Windows using RealVNC
Install it, and open it.

Type your VPS IP Address with port 1
eg: 104.231.18.119:1

You will see this warning
- tick on "Don't warn me about this again"
- Click Continue
- and then input your password.


-updated june 26, 2015-
Part 3 - Problem after installing KDE
- Case 1 : After installing KDE, try reboot, and type :

ping www.google.com
if you got reply

unknown host

visit this page for troubleshooting

- Case 2 : After reboot, if you type 

ping www.google,com 
and you got reply

64 bytes from yyz08s14-in-f17.1e100.net (74.125.226.145): icmp_seq=1 ttl=54 time=2.39 ms
64 bytes from yyz08s14-in-f17.1e100.net (74.125.226.145): icmp_seq=2 ttl=54 time=2.45 ms

but you can't connect using VNC in windows, try turn on vnc server on terminal by type :

vncserver

It's all done, here a reference about installing KDE on Centos 6

See you in next tutorial.

Monday, June 8, 2015

Tutorial Install PPTP VPN on Centos 6 64Bit

Hello, today i want to share how to install PPTP VPN on Centos 6 64Bit. First we must know what is PPTP and how it works, below is a little information about PPTP that i found on wikipedia.com
The Point-to-Point Tunneling Protocol (PPTP) is a method for implementing virtual private networks. PPTP uses a control channel over TCP and a GRE tunnel operating to encapsulate PPP packets.


A PPTP tunnel is instantiated by communication to the peer on TCP port 1723. This TCP connection is then used to initiate and manage a second GRE tunnel to the same peer.

The PPTP GRE packet format is non standard, including an additional acknowledgement field replacing the typical routing field in the GRE header. However, as in a normal GRE connection, those modified GRE packets are directly encapsulated into IP packets, and seen as IP protocol number 47.

The GRE tunnel is used to carry encapsulated PPP packets, allowing the tunnelling of any protocols that can be carried within PPP, including IP, NetBEUI and IPX.

In the Microsoft implementation, the tunneled PPP traffic can be authenticated with PAP, CHAP, MS-CHAP v1/v2 .

Terms of Using VPN From Ryan B @Evoburst.com

Next will checking requirement of installing PPTP VPN

Part 1 - Check Requirement PPTP VPN and Installing PPTP VPN

1. Check if TUN/TAP is enabled (you can enabled it in Control Panel)
For this tutorial, i'm using VPS Host from EvoBurst.com (Low price VPS)
Here is some feature that provided by EvoBurst.com

Note : in some VPS Host, there are no Feature of Enabled TUN/TAP and PPP, but dont worry, you can try send ticket to your host, to request for enabling TUN/TAP and PPP for VPN Purpose, there will process your ticket and enabled it, i have experienced that matter in interserver.net. In some VPS Server, maybe it take about at least 1 Hours till your ticket processed but sometimes it takes only 5 minutes or less, depend how busy your customer service of your VPS Host.
Ok, after TUN/TAP and PPP enabled, open PuTTY and check by type
cat /dev/net/tun
if the result is cat: /dev/net/tun: File descriptor in bad state, it means TUN/TAP is enabled (see pic below)
TUN/TAP is enabled
 type
cat /dev/ppp
if the result is cat: /dev/ppp: No such device or address,  it means PPP is enabled (see pic below)

PPP is enabled

Now, you are ready installing PPTP VPN, just code below, and it will do all what your server need.
wget https://raw.githubusercontent.com/zaq111/bash/master/angelimus-install-pptpd-VPN.sh 
chmod +x angelimus-install-pptpd-VPN.sh && ./angelimus-install-pptpd-VPN.sh
While installing, you will be prompt 2 times, just answer with "y"

1st prompt answer with "y"

2nd prompt answer with "y"

After done installing you will see 
This is your IP to connect
Your Username and Password to connect to VPN

Until this step, you're done Installing PPTP VPN on your Centos 6, Now, time to check if your VPN Works, i test my VPN using Windows OS,
1. Go to Control Panel > Network and Sharing Center
2. Click on Set up a new connection or network
3. Click on Connect to a workplace
4. Click on Use my Internet Connection (VPN)
5. See dialog box
Internet address = (your given ip when finish installing your VPN or usually your VPS IP)
Destination Name = Choose whatever you like eg : My Personal VPN
6. Click Next
Username = angelimusVPN01
Password = pass001
7. Click Next and Wait until you see you are connected.
8. Done, try open browser and goto myipaddress.com

NOTE : (Ignore this when you can browse the internet using VPN)
Why i can't connect to Internet using VPN,
In some VPS Host, using this tutorial will works fine, BUT now i using my VPS from Evoburst.com, and why i use evoburst? because i know the VPN will Connect Smoothly, BUT WITH NO INTERNET ACCESS don't worry, i'll show how to.
1. Open PuTTY and Check your network interface
ifconfig eth0
it will return 
eth0: error fetching interface information: Device not found
this is the problem since in my auto install script, i use :

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

that is means to add rule for eth0, because common VPS Host use eth0,
if we see from ifconfig eth0 there is no device found, so what is my device? type
ifconfig -s

in my VPS Host (Evoburst.com) you will see like this (see pic below) the result may vary on other VPS Host

see, there are only : (see pic above)
lo (loopback)
ppp (point to point protocol)
venet0 (virtual ethernet network, i'm guessing it :P) which is act as phisycal adapter

now, we found the device, which is venet0
so, dont take it to long, just type 
iptables -t nat -A POSTROUTING -o venet0 -j MASQUERADE
service iptables save
service iptables restart

Now try to connect again your VPN, i hope it works. (if you experience another error, post it on comment section, maybe i can help to find out.)

Part 2 - Add or Remove VPN user

This part is very simple, just add this code (edit chap-secret)
vi /etc/ppp/chap-secrets

to edit this file, press insert

to Remove User angelimusVPN01, just delete that line until *
to Add User, type
<VPN Username> <pptpd> <VPN Password> <*>
eg: VPN001 pptpd Pass001 *
It means, VPN001 is the username, pptpd is the type of VPN, Pass001 is the password, * is wildcard for all ip address.
saving the file press ESC on keyboard, then type :wq

All Done, hope you can install VPN on your VPS without trouble, if you have reference about VPS, you can post it on comment section.

Here's a few link for reference installing PPTP VPN

"Patient is power"

Evoburst.com VPS Host Review - Low Cost VPS

Hello Again, have you heard about evoburst.com ? for you the one who not know about that, it's a VPS Hosting that offering a good VPS Plan with high specification, but in low price.
I dont know for sure how it works, and what limitation in that, but one thing for sure, it's not scam :P, that is the most important things of all, lets we dig more about Evoburst.com.


Benchmark Result (by geekbench.com)

CPU model :  Intel(R) Xeon(R) CPU  X5650  @ 2.67GHz
Number of cores : 24
CPU frequency :  2659.966 MHz
Total amount of ram : 4096 MB
Total amount of swap : 0 MB
System uptime :   8 days, 18:31,
Download speed from CacheFly: 99.5MB/s
Download speed from Coloat, Atlanta GA: 19.6MB/s
Download speed from Softlayer, Dallas, TX: 53.6MB/s
Download speed from Linode, Tokyo, JP: 11.1MB/s
Download speed from i3d.net, Rotterdam, NL: 7.57MB/s
Download speed from Leaseweb, Haarlem, NL: 6.49MB/s
Download speed from Softlayer, Singapore: 11.5MB/s
Download speed from Softlayer, Seattle, WA: 70.8MB/s
Download speed from Softlayer, San Jose, CA: 95.5MB/s
Download speed from Softlayer, Washington, DC: 4.67MB/s
I/O speed :  227 MB/s

Geekbench.com Score
Single-Core Score 1839 - Multi-Core Score 11688

Angelimus Score
397.86
(Based on Plan 4G)

Updated Info and Promo Code

EVOBURST.COM
10% off EvoBurst1G (Any Billing Term) - Coupon Code: EB1GJuly
20% off EvoBurst2G (Any Billing Term) - Coupon Code: EB2GJuly
25% off EvoBurst4G (Any Billing Term) - Coupon Code: EB4GJuly
30% off EvoBurst6G (Any Billing Term) - Coupon Code: EB5GJuly
30% off EvoBurst8G (Any Billing Term) - Coupon Code: EB8GJuly
50% off EvoBurst8G (Annually Billing) - Coupon Code: EB8GYJuly

BUDGETVZ.COM
20% off ANY BudgetVZ Product - Coupon Code: BVZJuly

MEGAVZ.COM
20% off ANY MegaVZ Products - Coupon Code: MEGAJuly

New Payment Method : Alipay
Last Update : July 16, 2015

First, READ the TOS (http://evoburst.com/terms.html), the TOS is really scary, so beware, you'll get banned if you break it. See below!!! Read Carefully

EvoBurst VPS Servers
  1. Spamming (including search engine spam, doorways, form spamming, etc.)
  2. Mass mailing of any type (including double opt-in)
  3. DoS or other attacks (either outgoing or incoming)
  4. Hacking (including situations when your VPS was hacked)
  5. Distribution of malware/viruses - with or without knowledge
  6. Port scanning
  7. Copyrighted content/mp3/movies/cracked software or links to such content
  8. Nested virtualization (running Qemu, etc)
  9. Traffic Exchanges (Hitleap/AutoSurf/etc)
  10. Open Proxies (Web etc due to High Abuse Rates)
  11. Data mining (due to heavy I/O usage)


NanoVZ/MegaVZ & BudgetVZ VPS Servers
  1. Spamming (including search engine spam, doorways, form spamming, etc.)
  2. Mass mailing of any type (including double opt-in)
  3. DoS or other attacks (either outgoing or incoming)
  4. Hacking (including situations when your VPS was hacked)
  5. Distribution of malware/viruses - with or without knowledge
  6. Port scanning
  7. Copyrighted content/mp3/movies/cracked software or links to such content
  8. Torrents (Clients, Trackers or Indexers)
  9. Nested virtualization (running Qemu, etc)
  10. Traffic Exchanges (Hitleap/AutoSurf/etc)
  11. @home Software (Seti, Hentai etc due to heavy I/O Usage)
  12. Data mining (due to heavy I/O usage)
  13. Open Proxies (Web etc due to High Abuse Rates)
  14. TOR entry nodes, relays and exit nodes (ie. TOR is not allowed in ANY way)

With the very strict TOS, i can tell you, this server is for legal activity only, or in other word "Don't mess with this VPS Host"
Why? First, the price is very low, comparing to another competitor, Second, it's limited, Third i bet you cant find this offer again. Now, lets review some of EvoBurst VPS Plan (see below)

Evoburst4G
CPU : Fair Share 24+ Cores
Memory : 4GB RAM
HDD : 30GB SSD/SAS Disk Space
Bandwidth : 3TB Bandwidth
IP Address : 2 Dedicated IPv4
IPv6 : /64 IPv6 Subnet
Max VPS : 2 VPS Limit
Location : Seattle, Washington - Dronten, The Netherlands - Los Angeles, California
Price : €6.00
See Another VPS Plan : https://www.evobilling.com/cart.php

I already bought EvoBurst4G, first i test the connection speed (see pic below)
this is from location : Los Angeles, California

Now, lets go to Client Area
Let's go more detail
I use all resource into 1 VPS (EvoBurst4G Plan), but you can split it with equal resouce and create max 2 VPS, and you can create 4 VPS with EvoBurst6G (€10.00 EUR Monthly) and 8 VPS with EvoBurst8G (€20.00 EUR Monthly).
Note, you can create multiple VPS, as long you have enough resource, eg : You buy EvoBurst4G with 4GB Memory, in EvoBurst4G you can create 2 VPS, 1st VPS using 3GB memory, so your memory for 2nd VPS is just 1GB, it apply to Disk Space, Bandwidth, and IP Address.

There are Feature to Enable or Disable TUN/TAP

What is TUN/TAP
TUN (namely network TUNnel) simulates a network layer device and it operates with layer 3 packets like IP packets. TAP (namely network tap) simulates a link layer device and it operates with layer 2 packets like Ethernet frames. TUN is used with routing, while TAP is used for creating a network bridge.
Packets sent by an operating system via a TUN/TAP device are delivered to a user-space program which attaches itself to the device. A user-space program may also pass packets into a TUN/TAP device. In this case the TUN/TAP device delivers (or "injects") these packets to the operating-system network stack thus emulating their reception from an external source.

So far, what i know from tun / tap is its related into VPN PPTP (dont worry, will try installing later, just wait), Next,

Graphs about resource usage

Second, Control Panel.

Eq : you setup 2 VPS using Evoburst4G, and then you can manage it in here (see pic above)
all your VPS will listed there

Click on Manage
In this panel, you can Reboot, Shutdown, Boot, Reinstall OS, Enable TUN/TAP, Enable PPP, Configure Network, ETC.

Third, what can this VPS do???
In this part, i will test installing and using tutorial from part 2 to part 5 and do another tutorial with this VPS.

  (see pic below)

PuTTY

  (see pic below)


  (see pic below)

  (see pic below)

connect using bitvise

whatismyip.com

Until this time (June,13,2015), i have test all my tutorial in evoburst.com without deleting anything, and without stopping unused process, so far the VPS is still running smoothly, and memory usage is 900-1500mb. Good Server.