Tuesday, June 9, 2015

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.








Friday, June 5, 2015

Part 5 - Installing SSH Dropbear on Centos 6 64Bit

Hello, today i want to share about how to install SSH Dropbear into Centos 6 64Bit, but, as usually, before we install, we must knowing first, what and how SSH Dropbear is.
Dropbear is a software package written by Matt Johnston that provides a Secure Shell-compatible server and client. It is designed as a replacement for standard OpenSSH for environments with low memory and processor resources, such as embedded systems. It is a core component of OpenWrt and other router distributions, that is according to wikipedia.
Honestly, this is the first time i read explanation about Dropbear :P, confuse?? yes me too, no idea about that explanation, maybe its too theoritically, but to implement dropbear, its not that hard, i have used it :P, okay, dont ask about what is dropbear is, just follow the instruction, and you will know how to use dropbear.


Step 1. Download and Set Permission for auto install
Open your terminal using PuTTY or your favourite SSH Client, and type below per line
wget https://raw.githubusercontent.com/zaq111/bash/master/angelimus-ssh-dropbear.sh
chmod +x angelimus-ssh-dropbear.sh && ./angelimus-ssh-dropbear.sh

you will be prompt 3 times, when prompted, type "y" and press enter.

 First prompt

 Second prompt

Third prompt
after it done, you will see [Failed]
don't panic, i'll explain in step 2

Step 2. Editing  /etc/init.d/dropbear
Now we will editing dropbear. Type
vim /etc/init.d/dropbear

find :
# pidfile: /var/run/dropbear.pid

below # pidfile: /var/run/dropbear.pid, add this (see pic above )
OPTIONS="-p 443"
and then press ESC and type :wq

in step 1, we see failed when starting dropbear, why? because before dropbear start, it read all configuration in /etc/init.d/dropbear and, there are no setting at all in what port that dropbear must running?? thats why, we must add OPTIONS="-p 443"it tell dropbear to run in port 443, simple right :P ok, lets continue.
Now we will try starting dropbear again.
service dropbear start

see??? no problem at all, it smoothly running :P
now, we want to dropbear start automatically each time VPS restart or start, type this
chkconfig dropbear on

Step 3. Create SSH user
Now we will create user that will used SSH
Open terminal and type 
adduser mynewssh
passwd mynewssh

you will be prompted to enter password for user mynewssh.
ATTENTION!!! Since user SSH Dropbear can access terminal, there are a few thing you must remember.
1. If you gave to your friend your SSH User and Password, he/she can access your terminal, ftp and do whatever he/she like
2. For better security, you must make SSH user that you create can't login to your terminal
3. If you use for yourself or personal use only, not for sharing to other people, ignore this attention, and ignore below part about Disable User SSH from accessing SHELL/FTP

Disable User SSH from accessing terminal
For security reason, i personally support you to disable SSH user to access shell/terminal or ftp
type below
usermod -s /sbin/nologin mynewssh

Step 4. Using SSH
In this step i recomend you to using bitvise as client
Download bitvise first from http://dl.bitvise.com/BvSshClient-Inst.exe
Install it then open.
Hostname : <your ip VPS> eg: 31.291.42.10 or mynewserver.com
Port : 443 (For free service in VPS.me see Step 5)
Username = mynewssh
Password = (insert password when you create user mynewssh)

Go to option tab
See on login section, if you disable user from accessing terminal, then make sure Open terminal is untick (see pic above)

Now click on login, you will see set of information about your ssh show up.
- after you click login, you will see a certificate, just click ok or yes.
- after that, you will see similar like pic above.

Now, our SSH is running, but how to use it?? lets try.
- After login in bitvise, open tab Service
Your SOCKS/HTTP Proxy Forwarding must ticked
Listen interface = 127.0.0.1
Listen port = 1080 (this what is use) or 1081 or 9090 or 6642, input port as you like
Bind IPv4 interface = 0.0.0.0

Next :
- Open Mozilla Firefox
- Check your IP (whatismyip.com) remember it
- Go to Tools > Option > Advanced > Network Tab
- Click on Settings...
SOCKS Host = 127.0.0.1
Port = 1080 (must same with port in bitvise service tab)

- Click OK, and then Check your IP (whatismyip.com) again.
- I hope you understand capability of SSH, it will use VPS network on your Firefox browser, and it use your VPS bandwidth quota too, so be carefull when you downloading, because it will consume VPS bandwidth (free service in VPS.me only provided 10GB Part 1 - Let's Start VPS).

Now you are done Installing SSH Dropbear, Add user, and using Dropbear, but i'm sure there lot of function od dropbear beside my example above, just googling, you will find answer there.

Step 5. IPv4 Mapping (For VPS.me only)
If you using paid service in VPS.me or in other VPS Host, ignore this step. This step only for user that using free service in VPS.me

- Login to your VPS.me control panel
- Click manage
- Find IPv4 Mapping and click it
Input Port name = ss1
Source Port = (add port that hasn't been used by other, ex : 8721 or 4221 or 1128, etc, this need patient, because maybe port has been taken by other, so keep trying) 
Destination Port = 443
then click Add New

- Open your bitvise
- Change Port to port number that you assign in control panel VPS.me (see pic above in Source Port)
- If you still confuse about IPv4, see previous tutorial (Part 4 - Installing Wordpress To Centos 6, in section Step 5)

Ex : i assume you get Source Port = 7238 in VPS.me IPv4 Mapping (see pic below)

so, in bitvise, the port is must 7238 (see pic below)


Thats all, thanks for reading my tutorial, see you in next tutorial
For reference about What is SSH, Installing SSH Dropbear on Centos 6, Function of SSH

If you have more reference about installing SSH Dropbear or about SSH, post it on comment section.
I will add it to this artice, thanks.

If you can't explain it to a six year old, you don't understand it yourself. - Albert Einstein