Cara Aktivasi Windows Server 2012 R2 Non Core

Berikut adalah step by step untuk yang gagal aktivasi windos server 2012 menggunakan aplikasi atau software cark seperti KMS Pico KJ dan sebagaianya.

1. Buka CMD kemudian ketikkan perintah berikut :
slmgr.vbs -ipk XXXX-XXXX-XXXX-XXXX-XXXX
setelah anda memasukkan perintah tersebut dan muncul error, maka anda perlu melakukan langkah yang berikutnya.


2. Ketikkan perintah berikut : slmgr /dlv



3. Ketikkan perintah berikut : DISM /Online /Get-CurrentEdition
apabila berhasil akan muncul Current Edition : ServerStandardEval


4. Ketikkan perintah berikut : DISM /Online /Get-TargetEditions
apabila berhasil akan muncul Target Edition : ServerDatacenter & ServerStandard


5. Ketikkan perintah berikut : DISM /Online /Set-Edition:ServerStandard /ProductKey:D2N9P-3P6X9-2R39C-7RTCD-MDVJX /AcceptEula kemudian tekan enter. apabila berhasil anda akan di minta restart PC, kemudian ketik Y dan tekan ENTER



6. Setelah PC melakukan booting, masuk Control Panel kemudian cek Status Windows Activation sudah Active atau belum. Kalau belum gunakan aplikasi tambahan yaitu KMS Auto. Anda bisa mendowloadnya di bawah.

7. Setelah KMS Auto di download kemudian extrack dan klik 2x file KMS Auto.exe
klik Activation kemudian pilih Windows. Tara........ tidak perlu menunggu lama windows anda sudah aktif, silahkan lakukan restart dan cek status windows di control panel.

key :
AVMA keys

The following AVMA keys can be used for Windows Server 2012 R2.

Edition


AVMA key

Datacenter


Y4TGP-NPTV9-HTC2H-7MGQ3-DV4TW

Standard


DBGBW-NPF86-BJVTX-K3WKJ-MTB6V

Essentials


K2XGM-NMBT3-2R6Q8-WF2FK-P36R2

The following AVMA keys can be used for Windows Server 2016.

Edition


AVMA key

Datacenter


TMJ3Y-NTRTM-FJYXT-T22BY-CWG3J

Standard


C3RCX-M6NRP-6CXC9-TW2F2-4RHYD

Essentials


B4YNW-62DX9-W8V6M-82649-MHBKQ

Ubuntu 16.04 + Squid 3.5.5 Untuk Proxy HTTP Dan HTTPS

Ubuntu 14.04 + Squid 3.5.5 Untuk Proxy HTTP Dan HTTPS

Ada banyak sekali tutorial dengan berbagai pendekatan berbeda sesuai selera pribadi masing-masing "tukang masak" server proxy squid. Tutorial yang beragam tentu bisa anda dapat cari di google. Sama seperti yang saya racik dengan resep yang saya comot sana-sini. Karena tutorial berikut ini merupakan catatan saya agar tidak lupa, saya tidak berharap anda yang membaca bisa mengerti dengan cepat.

Belajar sendiri, trial dan error alias otodidak tentu lebih memperoleh kepuasan jika berhasil.
Saya juga demikian.

Banyak kombinasi sebetulnya antara OS Server dengan Squid sebagai proxy cache, namun saya lebih suka dengan Ubuntu.

Anda bisa mengunakan tutorial menginstall Ubuntu Server yang menurut anda lebih anda fahami. Videonya juga banyak di Youtube. Kalau saya belajarnya dari : Install Ubuntu Untuk Server Squid.

Sebenarnya pentingkah mencache HTTPS?
Bagi saya : Ya!, sangat penting.
Alasannya : Koneksi ADSL yang masih di bawah 10 Mb dan banyak web saat ini menggunakan port 443 alias SSL untuk transaksi data, termasuk media sosial seperti Facebook dan Twitter. Pada jam-jam sibuk Warnet yang saya kelola akan sangat lemot. Facebook loadingnya lama karena tiap PC mengaksesnya. Padahal jika dipikir-pikir orang yang sama akan mengakses halaman yang sama berulang kali tiap hari dan komputer client meminta data yang sama ke internet tiap hari. Menyia-nyakan bandwidth saja.

Lalu bukankah HTTPS itu diciptakan untuk keamanan?
Pada dasarnya Squid melakukan SSL bump sebagai tindakan pembajakan. Sertifikat asli milik (misalnya) facebook ditimpa dengan milik Squid agar Squid bisa mencache file-file grafis yang menguras bandwith itu ke dalam hardisk server. Terpaksa. Kalau mode HTTP biasa sih normal saja.

Spesifikasi Komputer yang saya gunakan:
Core2Duo 2,0 GHz, RAM 2 GB DDR2, HDD SATA 500 GB
Pembagian Hardisk yang saya gunakan sbb :

Harddisk 500GB (saya pakai kapasitas segini)

 Primary Root (/) 100 GB EXT4  
 Logical Swap 4 GB (2X Jumlah RAM)  
 Logical mount point : /Cache1 50 GB btrfs journaling, mount option noatime+nodiratime  
 Logical mount point : /Cache2 50 GB  btrfs journaling, mount option noatime+nodiratime
 Logical mount point : /Cache3 50 GB  btrfs journaling, mount option noatime+nodiratime
 Logical mount point : /Cache4 50 GB  btrfs journaling, mount option noatime+nodiratime
 Logical mount point : /Cache5 50 GB  btrfs journaling, mount option noatime+nodiratime
Untuk masalah pemasangan Ubuntu di PC Server, diluar pembahasan atau sudah dianggap selesai.

Setelah kita menyelesaikan instalasi Ubuntu, ada beberapa hal yang perlu di seting. Pertama adalah mengeset SSH di Ubuntu agar Putty (Remote Command) bisa login sebagai root (Karena saya capek sudo su mulu).

Kita bekerja selalu di modus Terminal, karena ini server bung! Bukan Desktop dengan GUI.
Langkahnya :

 #nano /etc/ssh/sshd_config [enter]
Carilah baris :

 # Authentication:  
 LoginGraceTime 120  
 PermitRootLogin without-password  
 StrictModes yes  
Ubahlah menjadi :

 # Authentication:  
 LoginGraceTime 120  
 #PermitRootLogin without-password  
 PermitRootLogin yes  
 StrictModes yes  
Simpan dengan tombol ctrl+x lalu y [enter]

 #service ssh restart  [enter]
 #ssh stop/waiting
 #ssh start/running, process 1588
Lalu buat password root yang baru

 #passwd [enter]  
 #masukkanpassword [enter]
 #masukkansekalilagi [enter]  
Selesai.

Kita akan pindah ke PC Windows (Kita tidak lagi main langsung di PC Server)
Download aplikasi Putty dari : Putty download untuk akses remote terminal dan WinSCP di WinSCP download untuk Remote File Managernya. Silahkan rujuk masing-masing program bagaimana cara pakainya.

Saya anggap anda sudah faham menggunakan kedua program tersebut dan sudah berada di terminal Putty dan login sebagai root.
Update dulu Ubuntunya

 #apt-get update [enter]  
Lalu Install Aplikasi pendukung Squidnya

 # apt-get install devscripts build-essential openssl libssl-dev fakeroot libcppunit-dev libsasl2-dev cdbs ccze libfile-readbackwards-perl libcap2 libcap-dev libcap2-dev -y [enter]  

  # apt-get install sysv-rc-conf -y [enter]  
Setelah selesai, kita masuk ke proses download master source Squidnya.

# cd [enter]  
# wget http://www.squid-cache.org/Versions/v3/3.5/squid-3.5.5.tar.gz [enter]  

 # tar xzvf squid-3.5.5.tar.gz  [enter]

 # cd squid-3.5.5  [enter]
Copas kode di bawah ke terminal tanpa kurang atau lebih

./configure \
--prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/lib/squid \
--sysconfdir=/etc/squid \
--localstatedir=/var \
--libdir=/usr/lib \
--includedir=/usr/include \
--datadir=/usr/share/squid \
--infodir=/usr/share/info \
--mandir=/usr/share/man \
--disable-dependency-tracking \
--disable-strict-error-checking \
--enable-async-io=32 \
--with-aufs-threads=32 \
--with-pthreads \
--enable-storeio=ufs,aufs,diskd \
--enable-removal-policies=lru,heap \
--with-aio \
--with-dl \
--enable-icmp \
--enable-esi \
--enable-icap-client \
--disable-wccp \
--disable-wccpv2 \
--enable-kill-parent-hack \
--enable-cache-digests \
--disable-select \
--enable-http-violations \
--enable-linux-netfilter \
--enable-follow-x-forwarded-for \
--disable-ident-lookups \
--enable-x-accelerator-vary \
--enable-zph-qos \
--with-default-user=proxy \
--with-logdir=/var/log/squid \
--with-pidfile=/var/run/squid.pid \
--with-swapdir=/var/spool/squid \
--with-large-files \
--with-openssl \
--enable-ltdl-convenience \
--with-filedescriptors=65536 \
--enable-ssl \
--enable-ssl-crtd \
--disable-auth

Lalu tekan Enter.

Kemudian kita mulai compile...

 #make && make install && make install-pinger [enter]  
Proses ini mungkin akan memakan waktu 10 sampai 30 menit, santai saja.
Setelah proses ini selesai, silahkan download file squid.zip lalu ekstrak ke folder komputer anda.
Akan ada 3 file yang diperlukan : squid, squid.conf dan store-id.pl
Jalankan WinSCP dan login sebagai root

Copy file squid ke direktori /etc/init.d/
Copy file squid.conf dan store-id.pl ke /etc/squid/

Kembali ke Terminal Putty dan ketikkan perintah berikut

 #chmod 755 /etc/init.d/squid [enter]  
 #update-rc.d squid defaults [enter]  
 #/etc/init.d/squid stop [enter]  
Pastikan direktori-direktori yang diperlukan sudah ada
Misalnya direktori /var/log/squid.
Jika belum ada, buat dengan perintah : md nama_direktori

Ubah owner direktori /var/log/squid

 # chown -R proxy:proxy /var/log/squid [enter]  
Masuk ke direktori /var/log/squid

 # cd /var/log/squid [enter]  
Ciptakan dua buah file baru untuk log

 # touch access.log [enter]  
 # touch cache.log [enter]  
Kembali ke direktori root

 # cd [enter]  
Ubah owner dua file yang diciptakan tadi

 Ketik # chown -R proxy:proxy /var/log/squid/access.log [enter]  
 Ketik # chown -R proxy:proxy /var/log/squid/cache.log [enter]  
Ubah owner partisi mount point cache yang kita buat saat install server Ubuntu

 # chown -R proxy:proxy /cache1 [enter]
 # chown -R proxy:proxy /cache2 [enter]
 # chown -R proxy:proxy /cache3 [enter]
 # chown -R proxy:proxy /cache4 [enter]
 # chown -R proxy:proxy /cache5 [enter]
Ubah owner file store-id.pl

 # chown -R proxy:proxy /etc/squid/store-id.pl [enter]  
Ubah mode direktori cache

 # chmod 777 /cache1 [enter]
 # chmod 777 /cache2 [enter]
 # chmod 777 /cache3 [enter]
 # chmod 777 /cache4 [enter]
 # chmod 777 /cache5 [enter]
Ubah mode file store-id.pl

 # chmod 777 /etc/squid/store-id.pl [enter]  
Masuk direktori squid

 # cd /etc/squid [enter]  
Buat direktori sertificate

 # mkdir ssl_cert [enter]  

 # cd ssl_cert [enter]  
Di sinilah rahasia mengapa Squid 3.5 bisa mencache file terenkripsi alias mode port https.

 # openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout myCA.pem -out myCA.pem [enter]  
File hasil generate ini nantinya akan kita import ke dalam browser misalnya Mozilla Firefox atau Chrome. Squid https tidak akan bisa berkomunikasi dengan browser menggunakan port https jika sertifikat keamanan milik squid tidak dikenali.
Cara import sertifikat ke dalam browser boleh ikuti langkah di Youtube ini

 # openssl x509 -in myCA.pem -outform DER -out myCA.der [enter]  

  # cd / [enter]  

  # mkdir /var/squid [enter]  

 # cd /var/squid [enter]  

 # mkdir ssl_db [enter]  

 # cd ssl_db [enter]  

 # chown -R nobody /var/squid/ssl_db/ [enter]  
Mengaitkan library ke sertifikat database

 # /usr/lib/squid/ssl_crtd -c -s /var/squid/ssl_db/certs [enter]  

 # chown -R proxy:proxy /var/squid/ssl_db/ [enter]  
Selanjutnya kita periksa apakah semua proses di atas sudah benar, lalu kita parsing konfigurasi squid

 # squid -k parse [enter]  
Jika semua aman maka kita lanjut membuat direktori squid dalam partisi cache (yang lima buah tadi),
mengikuti pengaturan konfigurasi squid.conf

 # squid -z [enter]  
Kemudian restart service squidnya

 # /etc/init.d/squid restart [enter]  
Terakhir adalah mengatur mangle di IP Table milik Ubuntu, untuk mengarahkan permintaan client ke port yang benar.

Buka WinSCP lalu buka file /etc/rc.local
Copy lalu paste semua script di bawah ini di atas baris "exit.0" dalam file rc.local

 modprobe xt_TPROXY  
 modprobe xt_socket  
 modprobe nf_tproxy_core  
 modprobe xt_mark  
 modprobe nf_nat  
 modprobe nf_conntrack_ipv4  
 modprobe nf_conntrack  
 modprobe nf_defrag_ipv4  
 modprobe ipt_REDIRECT  
 modprobe iptable_nat  
 iptables -t mangle -F  
 iptables -t mangle -X  
 iptables -t mangle -N DIVERT  
 iptables -t mangle -A DIVERT -j MARK --set-mark 1  
 iptables -t mangle -A DIVERT -j ACCEPT  
 iptables -t mangle -A INPUT -j ACCEPT  
 iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT  
 iptables -t mangle -A PREROUTING ! -d 192.168.0.50/24 -p tcp --dport 80 -j TPROXY --tproxy-mark 0x1/0x1 --on-port 3129  
 iptables -t mangle -A PREROUTING ! -d 192.168.0.50/24 -p tcp --dport 443 -j TPROXY --tproxy-mark 0x1/0x1 --on-port 3127  
 /sbin/ip rule add fwmark 1 lookup 100  
 /sbin/ip route add local 0.0.0.0/0 dev lo table 100  
 echo 0 > /proc/sys/net/ipv4/conf/lo/rp_filter  
 echo 1 > /proc/sys/net/ipv4/ip_forward  

Informasi : alamat IP yang berwarna merah, sesuaikan dengan IP PC Server Ubuntu+Squid anda.

Restart PC Server

 # reboot [enter]  
Lalu coba uji apakah ada muncul kesalahan

 # squid –k reconfigure [enter]  
Error yang mungkin muncul terkait dengan store-id.pl
Coba atasi dengan menghapus atau menimpa store-id.pl yang ada di /etc/squid/ dengan yang baru (hasil download). Lakukan lagi chown seperti proses di atas khusus untuk file store-id.pl saja.
Dan lakukan perintah di bawah kembali

Installing and Configuring Freeradius + MySQL and Daloradius + MySQL on Ubuntu Server 12.04 for Mikrotik Hotspot/PPoE/PPTP (updated)

Installing and Configuring Freeradius
The first step is to Install Freeradius (ensure you already update your apt with apt-update)
$sudo apt-get install freeradius
 * Starting FreeRADIUS daemon freeradius                                 [ OK ] 
Setting up freeradius-utils (2.1.10+dfsg-3build2) ...
Then prepare the database for freeradius. Create database radius and assign username and password for accessing it. 
# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 51
Server version: 5.5.24-0ubuntu0.12.04.1 (Ubuntu)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database radius; 
mysql> grant all on radius.* to radius@localhost identified by "thepassword";
Query OK, 0 rows affected (0.00 sec)
The next step was to insert the database schema and I realized that I could not find the database scheme in /etc/freeradius.
Obviously I should install freeradius-mysql package first. 
#apt-get install freeradius-mysql
Setting up freeradius-mysql (2.1.10+dfsg-3build2) ...
 * Reloading FreeRADIUS daemon freeradius                                [ OK ] 
Then insert the database scheme 

# mysql -u root -p radius < /etc/freeradius/sql/mysql/schema.sql 
Enter password:
# mysql -u root -p radius < /etc/freeradius/sql/mysql/nas.sql 
Enter password: 

Now we try to insert new user for testing purpose in database. 
# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 72
Server version: 5.5.24-0ubuntu0.12.04.1 (Ubuntu)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use radius;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> INSERT INTO radcheck (UserName, Attribute, Value) VALUES ('sqltest', 'Password', 'testpwd');
Query OK, 1 row affected (0.04 sec)
mysql> exit
Bye
The next step is we need to configure the Freeradius files. 
Edit /etc/freeradius/sql.conf file. Setting database type, login and password that we already setup before.
# vim /etc/freeradius/sql.conf
  
  database = mysql
  login = radius
  password = thepassword

  readclients = yes
Then edit the /etc/freeradius/sites-enabled/default file
# vim /etc/freeradius/sites-enabled/default 
    Uncomment sql on authorize{}
    # See “Authorization Queries” in sql.conf
    sql

    Uncomment sql on accounting{}
    # See “Accounting queries” in sql.conf
    sql

    Uncomment sql on session{}
    # See “Simultaneous Use Checking Queries” in sql.conf
    sql

    Uncomment sql on post-auth{}
    # See “Authentication Logging Queries” in sql.conf
    sql 
      
Then we edit /etc/freeradius/radiusd.conf file
# vim /etc/freeradius/radiusd.conf 

  #Uncomment #$INCLUDE sql.conf
  $INCLUDE sql.conf
To test our configuration, first we must stop the freeradius service (if already running) 
# /etc/init.d/freeradius stop
 * Stopping FreeRADIUS daemon freeradius                                 [ OK ]
Then run this command to run freeradius in debugging mode. If there is no error, you are good to go.
#freeradius -X
On a new shell or window we tested the connection
$ radtest sqltest testpwd localhost 18128 testing123
Sending Access-Request of id 65 to 127.0.0.1 port 1812
User-Name = "sqltest"
User-Password = "testpwd"
NAS-IP-Address = 127.0.1.1
NAS-Port = 18128
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=65, length=20
The test running well with Accept response from the server.
To enable Mikrotik device to access our server we need to add client in clients.conf file.
#vim /etc/freeradius/clients.conf

client 10.0.0.0/8 {

        secret = testingpassword
        shortname = testing
        nastype= mikrotik
}
*note: we need to stop freeradius -X and then running it again to test our configuration

Update (Jan 27, 2013):  If we want to add specific value for Mikrotik, we need to add mikrotik dictionary

#vim /etc/freeradius/dictionary 


Then add this line below


$INCLUDE  /usr/share/freeradius/dictionary.mikrotik

Mikrotik Configuration
We need to configure our Mikrotik devices to use our new radius server.  We need to login to Mikrotik device and configure the radius in Radius menu. 
Below image is an example of our configuration. 
*Note: we increase timeout settting to 3000ms to enable invalid login notifications. (not working with default 300ms)
Daloradius Installation 
First, we need to download daloradius file 
$wget http://downloads.sourceforge.net/project/daloradius/daloradius/daloradius0.9-9/daloradius-0.9-9.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fdaloradius%2Ffiles%2F&ts=1345296201&use_mirror=nchc
Rename and extract the file 
# tar xvfz daloradius-0.9-9.tar.gz
# mv daloradius-0.9-9 daloradius
Move the file to the web server directory. In this case I use apache on Ubuntu so the location is at /var/www
# mv daloradius-0.9-9 daloradius
# mv daloradius /var/www
Then we need to setup the database. Because already setup the freeradius using MySQL, so we don't need new database. All we need to do is to import the daloradius scheme into our existing radius database.
# cd /var/www/daloradius/contrib/db
# mysql -u root -p radius < mysql-daloradius.sql
After database successfully altered, we need to configure the daloradius setting.
#vim /var/www/daloradius/library/daloradius.conf.php
Change the database password 
$configValues['CONFIG_DB_PASS'] = 'thepassword';
Then we can try to access daloradius using http://ipaddressoftheserver/daloradius
*Note: In my installation, i had a problem because I didn't have php5-gd php-pear and php-db packages installed on my Ubuntu server. 
To deal with this problem you can install the packages using
# apt-get install php5-gd php-pear php-db 


References, 
Mastaqim (2012), http://www.mastaqim.web.id/2012/08/install-freeradius-mysql-ubuntu-server.html
Daud (2012), http://daud.rasadigital.com/install-daloradius-di-ubuntu-server/