Pages

Sunday, July 20, 2014

Install / dropbear dropbear-2014.63 pada debian atau ubuntu

### Langkah-langkah berikut ini sudah Saya tes di Debian 7 dan Ubuntu 12.04.
### Langkah 1 : Install Zlib
apt-get install gcc zlib1g-dev build-essential

### Langkah 2 : Download Dropbear Source
wget https://matt.ucc.asn.au/dropbear/releases/dropbear-2014.63.tar.bz2 

### Langkah 3 : Extract Dropbear Source
tar xjvf dropbear-2014.63.tar.bz2

### Langkah 4 : Membuat Paket Instalasi
cd dropbear-2014.63
dpkg-buildpackage

### Langkah 5 : remove dropbear lama dan Instalasi Dropbear dengan Paket Instalasi yang sudah dibuat
apt-get purge --remove dropbear
cd .. 
dpkg -i dropbear_2014.63-0.1*deb

### Langkah 6 : Edit port
nano /etc/default/dropbear

### Langkah 7 : Restart Service
service dropbear restart
READ MORE - Install / dropbear dropbear-2014.63 pada debian atau ubuntu

Monday, June 30, 2014

Getting and building the Entity Framework 7 alpha bits – step by step

The Entity Framework version 7 bits are slowly coming together, for a demo of some features, look at the presentation by Rowan Miller from the Entity Framework Team at the recent dotNetConf.

This blog post will show you how to get the source code and build it on your own machine, in order to better understand EF 7, and maybe give it a early run. Keep in mind that a number of features are still broken/not implemented, keep an eye on the list: https://github.com/aspnet/EntityFramework/wiki/Getting-Started-with-Nightly-Builds

There are instructions on Getting and Building the Code available on the EF7 Wiki: https://github.com/aspnet/EntityFramework/wiki/Getting-and-Building-the-Code

But I have stumbled upon a few issues, that might also hit you.

1: Get the code

You can either do this as clone of the repository as stated in the link above, you you can simply download a .zip file via the Download .zip button on this page.

If you download a .zip, DO use a tool like 7Zip to unpack the file to a folder, do NOT use the built-in Windows zip extractor, in order to avoid files being marked as “Blocked”.

Either way, you will now have a folder called “EntityFramework” on your system, with contents like this:

image

2: Initialize

This will download all the required NuGet packages that EF7 depends on, and reference them from the projects.

Before you do this, launch Visual Studio 2013 and verify that:

You are running VS 2013 Update 2 (check Help, About):

image

In Package Manager Settings, check that the official NuGet feed is configured and enabled (the AspNetVNext feed is added by the build process)

image

Now launch a VS 2013 Developer Command Prompt as Administrator:

image

Now navigate to the “EntityFramework” folder and run:

build initialize

If the build initialize process succeeds, you will see this message:

Build succeeded.

image

If the message does not appear, double check the VS 2013 required settings.

3: Build and run tests

The next step will build the EntityFramework projects, and run all the tests in the solution. Before today, running unit tests were not possible on non-US systems, but I and MrJingle have had a few pull requests accepted to enable this (this, this and this).

Let me know if you encounter any related issues, and I will be happy to submit a pull request to get it fixed.

Again, from a VS 2013 Administrator command prompt, run:

build

If the build process succeeds, you will see this message:

image

4: Work in Visual Studio

You can of course also open the solution in Visual Studio and build there.

In order to run tests in Visual Studio, I found that the built-in Test Window did not detect any tests on my PC, but TestDriven.NET worked well.

You can now add some unit tests of your own in order to give EF7 a run!

Hope you manage to build, and good luck exploring the EF7 source.

READ MORE - Getting and building the Entity Framework 7 alpha bits – step by step

Sunday, June 22, 2014

Cara Install PPTP VPN di CentOS 5 VPS

Tutorial Cara Install PPTP VPN server di vps CentOS 5 32bit XEN
  1. Cek dan pastikan PPP aktif
    cat /dev/ppp
    Jika output seperti dibawah ini berarti sudah aktif
    cat: /dev/ppp: No such device or address
    Cara Install PPTP VPN di CentOS 5 VPS 1
  2. Install PPTPD VPN Server
    yum install ppp
    wget http://poptop.sourceforge.net/yum/stable/rhel5/i386/pptpd-1.3.4-2.rhel5.i386.rpm
    rpm -ivh pptpd-1.3.4-2.rhel5.i386.rpm
  3. Edit IP setttings
    nano /etc/pptpd.conf
    tambahkan berikut dibawah sendiri
    localip 192.168.0.1
    remoteip 192.168.0.101-200
    Cara Install PPTP VPN di CentOS 5 VPS 4
    Simpan dan exit
  4. Menambahkan DNS servers
    nano /etc/ppp/options.pptpd
    ms-dns 8.8.8.8
    ms-dns 4.2.2.1
    Cara Install PPTP VPN di CentOS 5 VPS 5
    Uncomment ‘ms-dns’ dan ganti dns sesuai selera
    lalu simpan dan exit
  5. Menambahkan user account untuk menentukan username and password
    nano /etc/ppp/chap-secrets
    # Secrets for authentication using CHAP
    # client server secret IP addresses
    tes1 pptpd password *
    Cara Install PPTP VPN di CentOS 5 VPS 6
    Simpan dan exit
  6. Setup Forwarding (Enable network forwarding)
    nano /etc/sysctl.conf
    Ganti ‘net.ipv4.ip_forward’ dari 0 jadi 1
    net.ipv4.ip_forward = 1
    Cara Install PPTP VPN di CentOS 5 VPS 7
    Untuk merubahnya bisa juga dengan:
    sysctl -p
  7. Untuk Configure iptables to do NAT
    Untuk XEN/Dedicate:
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    Untuk OpenVZ:
    iptables -t nat -A POSTROUTING -o venet0 -j SNAT –to-source x.x.x.x
    Ganti x.x.x.x dengan IP Server
  8. Membuat NAT rule untuk iptables to configure firewall
    iptables -A INPUT -i eth0 -p tcp –dport 1723 -j ACCEPT
    iptables -A INPUT -i eth0 -p gre -j ACCEPT
    iptables -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT
    iptables -A FORWARD -i ppp+ -o eth0 -j ACCEPT
    iptables -A FORWARD -i eth0 -o ppp+ -j ACCEPT
    service iptables save
    service iptables restart
  9. Start PPTP VPN server
    service pptpd start
Untuk log pptp server ada di /var/log/messages

READ MORE - Cara Install PPTP VPN di CentOS 5 VPS

Wednesday, June 18, 2014

SQL Server Compact Toolbox 3.7.3 – Visual Guide of new features

After nearly 290.000 downloads, version 3.7.3 of my SQL Server Compact Toolbox extension for Visual Studio  “14”, 2013, 2012 and 2010 is now available for download. This blog post is a visual guide to the new features included in this release, many suggested by users of the tool via the CodePlex issue tracker.


New features

Export SQL Server database to SQLite script (beta)

This feature enables you to create a script of all tables and data in an existing SQL Server database, that can be run using the SQLite3.exe tool as described in my blog post here, allowing you to quickly migrate to SQLite, for example for use in Windows Store/Phone Apps.

SQLIteExport

“Set Password” option added to Maintenance menu

This feature enables you to set or change the password of an existing database.

setpw

Enable entry of multiline text in DataGridView

This feature allows you to enter multi line text in the data edit grid, by pressing Shift+Enter to get to a new line.

Support for VS “14” CTP

Support for VS “14” was actually already enabled, but there was a minor issue with registration of the simple DDEX providers, that has now been fixed.

UPDATE: Microsoft has blocked add-ins that claim to support VS 14 from VS 2013, so in the meantime you can download a build for VS “14” from here:

https://sqlcetoolbox.codeplex.com/releases/view/123666

image

 

Bug Fixes

Result Grid column headers were displayed without the first _ (underscore) character if they had one

image

Download Count now fetched async, so the About dialog opens faster.

image

Add Column - defaults to Allow Null

image

"Migrate" and "Export" features broken for large databases with multiple script files

image

image

READ MORE - SQL Server Compact Toolbox 3.7.3 – Visual Guide of new features

Thursday, June 5, 2014

Entity Framework 6 and SQL Server Compact (9) –SqlCeFunctions and DbFunctions

One of the major improvements to the SQL Server Compact Entity Framework provider in version 6 is the addition of the SqlCeFunctions class, and enhanced support for the so-called “canonical” database functions (DbFunctions/EntityFunctions).

Just to repeat, the SQL Server Compact providers are delivered in the EntityFramework.SqlServerCompact (for 4.0) and EntityFramework.SqlServerCompact.Legacy (for 3.5 SP2) NuGet packages.

The DbFunctions (previously named EntityFunctions) in the System.Data.Entity namespace define a set of (CLR) methods that expose conceptual model canonical functions in LINQ to Entities queries.

Before EF6.1, the SQL Server Compact provider only supported the functions defined for Entity Framework 1, not it supports all the functions listed here, except the following: Date/Time functions with micro and nanosecond precision (as only datetime exists as a data type in SQL Server Compact), StDev, StDevP, Var, VarP, Reverse, CurrentUtcDateTime, CurrentDateTimeOffset, GetTotalOffsetMinutes.

This means you can now have the SQL Compact engine excute LINQ to Entities expressions like String.Contains, String.EndsWith, String.Left etc.

The System.Data.Entity.SqlServerCompact.SqlCeFunctions class allows you to call database specific functions directly in LINQ to Entities queries, and the following functions have been implemented (for documentation of these, see the equivalent functions for SQL Server listed here):

String functions
CharIndex
NChar
PatIndex
Replicate
Space
StringConvert
Stuff
Unicode

Math functions
Acos
Asin
Atan
Atan2
Cos
Cot
Degrees
Exp
Log
Log10
Pi
Radians
Rand
Sign
Sin
SquareRoot
Tan

Date functions
DateAdd
DateDiff
DateName
DatePart
GetDate,

Other
DataLength

So you can compose LINQ to Entities queries like:

var result = db.Album.Where(a => SqlCeFunctions.DataLength(a.Title) > 20).ToList();

And the resulting SQL will look like this:


SELECT
    [Extent1].[AlbumId] AS [AlbumId],
    [Extent1].[Title] AS [Title],
    [Extent1].[ArtistId] AS [ArtistId]
    FROM [Album] AS [Extent1]
    WHERE (DATALENGTH([Extent1].[Title])) > 20

READ MORE - Entity Framework 6 and SQL Server Compact (9) –SqlCeFunctions and DbFunctions

Wednesday, May 21, 2014

Entity Framework 6 & SQL Server Compact (8) –Logging SQL statements

I previously blogged about how to enable logging of INSERT/UPDATE/DELETE statements with SQL Server Compact and Entity Framework 4. Keep in mind that there is no “SQL Profiler” equivalent for SQL Server Compact, which makes this feature a vital tool for debugging, understanding and improving queries and CUD operations.

In Entity Framework version 6.1, this has been made much simpler, thanks to the implementation of the new System.Data.Entity.Infrastructure.Interception.DatabaseLogger class. In version 6.0, you could enable logging in code by using

db.Database.Log = Console.Write;

In version 6.1, it is now possible to enable logging by adding entries to your app.config file, making it possible to add logging to a deployed application.


Enabling logging is as simple as adding the following section to your app.config/web.config file in the entityFramework section.

<interceptors> 
<interceptor type="System.Data.Entity.Infrastructure.Interception.DatabaseLogger, EntityFramework">
<parameters>
<parameter value="C:\Temp\LogOutput.txt"/>
<parameter value="true" type="System.Boolean"/>
parameters>
interceptor>
interceptors>




The first parameter is the name of the file to log to (if this is not specified, logging will be sent to Console.Out). The second parameter specifies that the file should be appended to rather than being overwritten (default).


I am sure you will find this new feature useful.

READ MORE - Entity Framework 6 & SQL Server Compact (8) –Logging SQL statements

Monday, May 12, 2014

Entity Framework ”reboot” – EF7 – Get a sneak peek via TechEd US live stream

The next version of Entity Framework has just been named “EF7” (code name EF EveryWhere). Before the presentation, which will be streamed live on Channel 9 during TechEd US on Wednesday May 14 at 1:30 PM CDT (Houston, Texas), allow me to summarize what we know so far about the next version of Entity Framework.

The Entity Framework team has already published some thoughts about the new Framework here, and based on this and other sources, we can summarize the following (some or maybe most of which is me guessing, of course):

- A completely new codebase, will not be based on the 1 million+ line codebase of EF6

- Will be open source, and accept pull requests and other community feedback

- Will support Windows Phone, Windows Store, Windows Desktop/Server/Cloud, and also support Mono/Xamarin platforms

- Will be based on a provider model, so SQL and NoSQL data sources can “plug in”. Will initially support SQLite on Phone and Store apps. Will also support SQL Server and Azure Table Storage

- Will only include a productive subset of the current, huge API – Code First Mappings, DbContext, POCO classes, and less mapping schemes. So current investments in DbContext, Code First/Second and POCO will be forward reusable.

- Will not contain ObjectContext, Entity SQL, EntityConnection, EntityCommand etc. Phew.

Sounds ambitious and great to me. Can’t wait to see some code and start playing!

UPDATE: The source code is now available on Github as part of ASP.NET vNext. And Rowan Miller, Program Manager on the EF team speaks about and demonstrates EF7 in this TechEd session available online.

READ MORE - Entity Framework ”reboot” – EF7 – Get a sneak peek via TechEd US live stream

Wednesday, April 23, 2014

“Shop Talk” with Eric Sink, Zumero for SQL Server founder

In my last blog post I introduced you to Zumero, an Enterprise solution, that allow you to replicate and sync SQL Server data across all your team's mobile devices.

I had the pleasure of meeting up with Zumero founder, Eric Sink, @eric_sink at the recent SQL Saturday event in Copenhagen.

image

We agreed to do a short interview by mail, so I could share my Zumero questions with my blog readers. So without further ado, let’s get started.

I know you have been involved with other software products (SourceGear). What is the story behind Zumero?

We think of Zumero as a new start-up that is incubating inside SourceGear, so there is much shared history.

We started SourceGear in 1997, initially as a contracting shop building custom software for mobile devices.  We did a lot of work with Blackberry devices and some very early Motorola smart phones.

Then we got into version control tools, which has been a great business for us over the last 15 years.  We are still serving a large customer base with on-going active development of SourceGear Vault.

But in the last few years, the world of mobile has been drawing us back in.  :-)

And from a certain point of view, our work on version control means that we have been doing "sync" for 15 years.

And SourceGear Vault has always been built on SQL Server.

So that's how we got the three main ingredients of Zumero:  SQL Server, mobile, and sync.

Some of the features that Merge Replication provide are: - Minimal client code, secure, compressed transfer over https, server side filtering, read-only tables, conflict handling. How does Zumero stack up?

I /think/ we stack up pretty well, although we still have many ideas for how to make our product better.

"minimal client code"  -- The Zumero Client SDK tries to make everything easy.  Just call the Zumero sync function and Zumero will synchronize changes in both directions.

"secure" -- Zumero is designed to work over SSL/https.  The protocol includes authentication.  And on the client, Zumero is compatible with bulk encryption libraries such as SQLCipher.

"compressed transfer over https" -- All packages exchanged between Zumero client and server are compressed.  In fact, the packages from server to client are often "deltified" to make them very small indeed.

"server side filtering" -- Zumero does support the ability to exclude tables, or columns from tables, or to filter rows on a custom WHERE clause.

"read only tables" -- This can be accomplished with Zumero's authentication and permissions.

"conflict handling" -- Zumero handle conflict resolution on the server.  The default rules seem to be appropriate for most cases, but those rules can be customized to do whatever is needed for a given situation.

In addition, Zumero adds a few things that SQL CE merge replication does not, most notably, support for iOS and Android devices.

OTOH, Zumero is built on SQLite, which does not resemble SQL Server as closely as SQL CE does.  We are constantly working to provide Zumero customers with a smooth experience by improving features, tooling and documentation.  My blog series on the differences between SQL Server and SQLite is a part of those efforts:

Rob Tiffany has demonstrated scaling Merge Replication. How does Zumero scale?

This is one area where Zumero's youth is evident, and I shall not pretend.  There is much more experiential knowledge about scaling with merge replication.  Rob Tiffany's "cheat sheet" is a gold mine of information:

And some of his advice would be applicable to Zumero as well.

However, we are quite happy with the scalability results we have achieved so far and we continue to push further.

(a)  We do a lot of "crowd testing", using lots of clients to abuse the Zumero server so we can tune it for reliability and performance.

(b) We are currently working with some customers who are integrating Zumero into an environment where merge replication is already in use (as a scaling solution for the SQL Server backend, not as a mobile sync solution).  We have some additional testing to do here, but we hope to able to publish some guidelines about the compatibility of Zumero with this kind of situation.

(c) Finally, we have tested and verified another way of scaling out, by having multiple Zumero servers talking to a single instance of SQL Server.  This can make a significant difference and is not difficult to set up behind a round robin DNS.

You are using Triggers and tracking tables on SQL Server, and not the built-in Change Tracking. Why?

The real reason is that Zumero's core sync code existed before we made the decision to make SQL Server the primary focus of the product.

That said, the documentation for Change Tracking raises questions for us.  We wonder if it would require changes to our sync algorithm.  We wonder if our support for tracking schema changes would still work.  We wonder about the apparent dependence on snapshot isolation.

We may explore this further in the future, but right now, we've got a solution which is robust, so we don't feel much pressure to change it.

Do you provide a Windows Mobile (.NET Compact Framework) client library?

Currently, no, but we are planning to do so.  The implementation work for Windows Mobile 6 support is done, but it has not yet been released as part of the product.  If a Zumero customer needs this, we would be ready to discuss and coordinate making it available.

What do you recommend for use as data access API towards SQLite on Windows platforms?

Right now, there is no API we can recommend without caveats.  Or rather, there are several good choices, but no clear winner.

For desktop Windows only, the core SQLite team products System.Data.SQLite, an ADO.NET provider which is fully compatible with EF6.  If you're not using mobile, this is almost certainly the best choice.

Frank Krueger's sqlite-net wrapper is quite popular, and for some very good reasons.  But last I knew, none of the various PCL forks have been folded back in, and that has been an issue for some.  Nonetheless, this is the wrapper we encounter most often.

WinRT without System.Data is a story with a big hole in it.  We remain hopeful that Microsoft has some more good stuff in the pipeline.  

Looking beyond Windows to include iOS and Android as well, things can get complicated.  Both of these other platforms include a [different] version of SQLite as part of the mobile OS.  Many apps use those.  Some bundle their own.  Some replace SQLite with SQLCipher.  Things can get tricky.  In addressing this set of problems with our customers, we've built some stuff that we are planning to make available to the community as open source (to be announced on my blog, soon, I hope). [Ed: Available as source code on Github, and NuGet packages coming soon]

READ MORE - “Shop Talk” with Eric Sink, Zumero for SQL Server founder

Monday, April 21, 2014

Free vps 21 April


Halo mas bos saya mau ngasih media buat peratek instal vps untuk ssh dan vps ini centos 6 64 bit cuman 1 hari aja silahkan di ambil satu aja ya biar yang lain bisa ikut mencoba

server1
server2
server3
server4
server5
server6

 bantu sebar via FB ya klik ke sini

READ MORE - Free vps 21 April

INJEK ISAT 21 APRIL VC



 SS TKP JABAR




2 JAM LEBIH NONTON youtube LANCAR KLO DOWNLOAD LIMIT 500 MB

SILAHKAN

https://www.facebook.com/groups/1484134131813070/

READ MORE - INJEK ISAT 21 APRIL VC

Sunday, April 20, 2014

Proxy port 80 dan 8080 21 april 2014


Akhir ini keluhan xl harus pakai proxy port 80 nah saya bikin proxy dari vps free 1 hari sekarang lumayan untuk mempermudah nyarinya. Apa bedanya proxy yang saya bikin heee ya sama aja kaya proxy yg free lain nya cuman yg saya shear ini sedikit yg mengunakan jadi speed nya lumayan dari pada yg free di pakai seluruh dunia ini hehehe langsung aja silahkan pakai


SS Port 80 sudah saya cek work

SS Port 8080 sudah saya cek juga 

111.68.20.83 = Port 80 dan 8080

SS Port 80 work
SS Port 8080 juga work
111.68.20.85 = Port 80 dan 8080

Klo saya ngak posting baru silahkan gabung di Facebook 
https://www.facebook.com/groups/1484134131813070/
READ MORE - Proxy port 80 dan 8080 21 april 2014

ISAT RA popo



akhirnya isat no dc no limit juragan silahkan di comot
Dowload

NB: ikuti sama percis kaya gambar di atas
READ MORE - ISAT RA popo

Thursday, April 10, 2014

An alternative to Merge Replication with SQL Server and SQL Server Compact – Zumero for SQL Server

While looking for a migration path for a customer currently using Merge Replication with SQL Server and Windows Mobile, I came across the recently released solution from Zumero, Zumero for SQL Server. As mentioned in my previous blog post, Merge Replication between SQL Server Compact and SQL Server 2014 is no longer possible, and in addition, SQL Server Compact 3.5 SP2 only supports a limited number of client platforms (Windows Mobile/CE and Windows desktop). Microsoft is promoting Azure Mobile Services with Offline support, but for obvious reasons, this solution does not work for on premise databases.

Zumero for SQL Server enables you to synchronize any mobile device with tables on a central SQL Server, using essentially the same components that we know from Merge Replication:

1: Configuration of tables to be synchronized, and added metadata/tracking to those. Before: Using SQL Server Management Studio to create a Merge Publication with articles (tables)
Now: Using ZSS Manager to create a DBFile with Tables

2: An IIS based agent, that exposes a http(s) endpoint for performing the sync process.
Before: Configure Web Synchronization Wizard
Now: ZSS Server

3: Client library for performing sync.
Before: System.Data.SqlServerCe.SqlCeReplication class, part of the SQL Server Compact ADO.NET provider
Now: Zumero Client SDK and SQLite.

using Zumero;

ZumeroClient.Sync(
"/path/to/sqlite.db", // full path to local db file
null,
"http://MY_ZUMERO_SERVER:8080",
"test", // remote DBFile name
null,
null,
null);



To get started testing out Zumero, simply follow the instructions here: http://zumero.com/get-started/ or start by watching the short, introductory videos here: http://zumero.com/howto/

Notice that Zumero works with any edition of SQL Server 2008 R2 Express or higher/later. Zumero Server is not free, but works with the free SQL Server Express for small scale solutions.

On the client side, the following impressive list client Operating Systems are supported:

Android (native and PhoneGap)
iOS (native and PhoneGap)
Xamarin
Windows, WinRT and Windows Phone 8
Mac OS X
Linux (Ubuntu 12.04+, Fedora 17+)

In my next blog post, I will be doing an interview:  “Hard Talk” with Eric Sink, Zumero founder.

Disclaimer: I am simply a Zumero user, and not affiliated in any way.

READ MORE - An alternative to Merge Replication with SQL Server and SQL Server Compact – Zumero for SQL Server

Tuesday, April 8, 2014

Free VPS 08 April 15:45


klo udah dapat satu jangan abil lg yaa... kasian yang lain ...
klo udah dapet comen dibawah sertakan IP nya yang agan udah ambil

langsung aja vps nya cepat di seduh ya :

server1
server2
server3
server4
server5
server6
server7
server8

Semoga membantu agan" semua untuk shear geratisan biar ngak Reupload :D

READ MORE - Free VPS 08 April 15:45

CARA LIMIT dan MONITORING USER DROPBEAR

langsung aja, login ke vps anda melalui putty / bitvise , gunakan root access
kemudian buka terminal dan ketikan :

cd /usr/sbin/

wget http://drop.groundworlds.tk/usermon

chmod 755 usermon


wget http://drop.groundworlds.tk/file/userlmt


chmod 755 userlmt


atau

chmod 777 userlmt

==================================
MEMBUAT AUTO SCRIPT supaya berjalan otomatis setiap 10 detik !!
---------------------------------------------------------------------------------------
ketikan berikut :

A. masuk ke /usr/sbin

cd /usr/sbin

1. membuat file autokill.sh

nano autokill.sh

2. paste kan script berikut :
------------------
while : do userlmt 1 sleep 10 done
---------------------
ctrl+x , y (untuk disave)
3. merubah hak eksekusi file autokill.sh

chmod +x autokill.sh

4. jalankan autokill supaya running otomatis

screen -AmdS check /usr/sbin/autokill.sh

5.  edit rc.local supaya auto run apabila di restart
nano /etc/rc.local
masukan baris berikut tepat di atas script: touch /var/lock/subsys/local
screen -AmdS check /usr/sbin/autokill.sh
6. DONE !!

CARA PENGGUNAAN MANUAL
-------------------------------------------
1.  untuk monitoring user dropbear, silahkan ketikan diterminal :
usermon -dp

2. untuk monitoring user openssh, silahkan ketikan diterminal :

usermon -op

3. untuk melimit user yang login lebih dari 1 atau 2 , ketikan :
userlmt 1
script diatas akan melimit login user dropbear menjadi 1 login saja
semua user yang login lebih dari 1 akan ter-kick dari server dan 
menyisakan 1 user yang terakhir login.
angka 1 dapat disesuaikan dengan kebutuhan, menjadi 2 , dst
 
READ MORE - CARA LIMIT dan MONITORING USER DROPBEAR

CARA INSTALL OPEN VPN PADA CENTOS 5 DAN 6 32Bit atau 64Bit

Karena Banyak request yang minta TUTORIAL ini maka saya buatkan

mudah mudah an bermanfaat :
====================
1. masuk via bitvise buka terminal (xterm), atau via putty
2. harus dengan root access
---
pastikan TUN TAP sudah aktif
masukkan :
cat /dev/net/tun
pastikan balasannya : file descriptor in bad state
---------------------------------
3. masukan perintah berikut :
CENTOS 5 32bit

wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
CENTOS 5 64bit
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
CENTOS 6 32 bit
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm
CENTOS 6 64bit
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

ALL CENTOS 5


rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm
rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm
ALL CENTOS 6 
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt (abaikan jika gagal)
rpm -K rpmforge-release-0.5.3-1.el6.rf.*.rpm
rpm -i rpmforge-release-0.5.3-1.el6.rf.*.rpm
yum install openvpn -y
cp -r /usr/share/doc/openvpn-2.2.2/easy-rsa/ /etc/openvpn/
PERHATIKAN CENTOS 6
butuh sedikit perubahan
yum -y install nano
nano /etc/openvpn/easy-rsa/2.0/vars
kemudian EDIT baris berikut : 

export KEY_CONFIG=`$EASY_RSA/whichopensslcnf $EASY_RSA`


MENJADI :

export KEY_CONFIG=/etc/openvpn/easy-rsa/2.0/openssl-1.0.0.cnf

kemudian SAVE (Ctrl+x) (Y) (ENTER)


cd /etc/openvpn/easy-rsa/2.0/
chmod +x *
source ./vars
./vars
./clean-all
./build-ca
cukup Enter Semua KECUALI COMMON NAME (isi sesuai keinginan)
kemudian :
./build-key-server server
Perhatikan dan Ikuti Langkahnya Baik-baik
saat muncul notifikasi (ada dua kali) pilih Y (y)
----------------------------------------
./build-dh
tunggu hingga proses selesai
 jika sudah masukkan berikut :


cp -r /etc/openvpn/easy-rsa/2.0/keys/ /etc/openvpn/keys/
cp /etc/openvpn/keys/ca.crt /etc/openvpn/ 


cd /etc/openvpn/

Membuat Response ke TUN driver
cat > server.conf <
dev tun*
END 

MembuatConfigurasi server :


cat > groundworld.conf <
port 443
proto tcp
dev tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
dh /etc/openvpn/keys/dh1024.pem
plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so /etc/pam.d/login
client-cert-not-required
username-as-common-name
server 10.9.8.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 5 30
comp-lzo
persist-key
persist-tun
status server-tcp.log
verb 3
END

 Forwarding Port
echo 1 > /proc/sys/net/ipv4/ip_forward

Iptables Route rules
iptables -t nat -A POSTROUTING -s 10.9.8.0/24 -o venet0 -j SNAT --to xxx.xxx.xxx.xxx

xxx.xxx.xxx.xxx diatas ganti dengan IP VPS anda
 Jalankan VPN di server :
service openvpn start

Buat Client Config :
cat > groundworld.ovpn <
client
dev tun
proto tcp
remote xxx.xxx.xxx.xxx 443
resolv-retry infinite
route-method exe
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
auth-user-pass
comp-lzo
verb 3
END

INGAT, ganti xxx.xxx dengan IP VPS anda
==============================
sekarang kita bungkus makanan kita :
tar -czvf config.tar.gz ca.crt groundworld.ovpn



cp config.tar.gz /root
config.tar.gz di download via sftp windows di directory /root, jika kesulitan, kalo sudah ada httpd bisa dicopy ke sini :
 
cp config.tar.gz /var/www/html/
 silahkan file di download di http://IpVPSkamu/
ex : http://212.112.11.123/



=========================
sekarang di terminal (masih)
bikin user untuk ngetest


adduser -m -s /bin/false trial
passwd trial 

masukkan 2x autentikasi pass nya 

cmiww, DONE !!!
------------------------
Tinggal Pindahkan Downloadan Config tadi, ekstrak menggunakan 7-Zip
dan pindahkan ke C > program files > openvpn > config
=============
CARA MUDAH 
============= 
download openvpn portable disini :
----------------------
http://sourceforge.net/projects/ovpnp/files/latest/download
-----------------------
kemudian install di folder yang kamu suka 
----------------------
setelah itu masuk ke folder OpenVPNPortable > data > config
------------------
ekstrak file config.tar.gz disini, pastikan setelah ter-ekstrak terdapat 2 FILE :
-------------------
1. groundworld.ovpn
dan
2. ca.crt
================
DONE !! silahkan jalankan openVPNPortable, di Icon Tray Kanan Bawah PC anda klik kanan 
Connect groundworld dan masukan user dan pass yang telah dibuat diatas
----------------------------------
jika masih belum mau, gunakan Contoh Config dibawah :
copykan ke groundworld.ovpn atau buka notepad dan save as type ALLFILES dan PADA file name di isi ekstensi .ovpn ex : hostingindo.ovpn
-------------------------
client
dev tun
proto tcp
remote xxx.xxx.xxx.xxx 443
route 0.0.0.0 0.0.0.0
resolv-retry infinite
route-method exe
resolv-retry infinite
nobind
persist-key
persist-tun
auth-user-pass pass.txt
comp-lzo
verb 3
ca ca.crt

---------------------------
PERHATIAN !!

UNTUK MENGGUNAKAN CONFIG DIATAS BUAT FILE PASS.TXT 
GUNAKAN NOTEPAD
FORMAT :
username
password
==>contoh
trial
trial
simpan di folder OpenVPNPortabel > data > config
===================================
UNTUK OPENVPN listen INJEK gunakan config :
------------------------------------
client
dev tun
proto tcp
remote xxx.xxx.xxx.xxx 443

http-proxy 127.0.0.1 xxxx
route 0.0.0.0 0.0.0.0
resolv-retry infinite
route-method exe
resolv-retry infinite
nobind
persist-key
persist-tun
auth-user-pass pass.txt
comp-lzo
verb 3
ca ca.crt

==================================================
http-proxy 127.0.0.1 xxxx (xxxx diisi dengan PORT INJECT !)
==================================================
untuk yang bermasalah dengan route dan terbiasa menggunakan route manual
masukan config :
-------------------------
client
dev tun
proto tcp
remote xxx.xxx.xxx.xxx 443

http-proxy 127.0.0.1 xxxx
route 0.0.0.0 0.0.0.0
resolv-retry infinite
route-method adaptive
resolv-retry infinite
nobind
persist-key
persist-tun
auth-user-pass pass.txt
comp-lzo
verb 3
ca ca.crt

-------------
DONE !! silahkan jalankan openVPNPortable, di Icon Tray Kanan Bawah PC anda klik kanan 

sumber dari groundmans
READ MORE - CARA INSTALL OPEN VPN PADA CENTOS 5 DAN 6 32Bit atau 64Bit

Test kecepatan server dengan speedtest.net CLI

Speedtest.net menggunakan flash player untuk melakukan test kecepatan upload dan upload, sayangnya sangat repot jika ingin melakukan test pada vps atau server non gui.
Namun kita bisa menggunakan script python buatan Matt Martz yang bernama speedtest-cli untuk menjalakan test speedtest.net dari command line.
Untuk menjalankan script ini dibutuhkan software python yang telah di install pada vps / server.
Anda bisa menginstall python dengan perintah sebagai berikut:
Untuk OS Redhat/Centos:
Untuk OS Debian/Ubuntu:
Download file speedtest-cli dari url:
Anda dapat melihat informasi penggunaan dengan perintah:
Contoh perintah untuk melakukan testing dan generate url hasil test
Sebelum melakukan test, disarankan untuk melihat daftar server yang akan ditest
READ MORE - Test kecepatan server dengan speedtest.net CLI

Saturday, April 5, 2014

Instalasi OpenVPN Pada Debian & Ubuntu

Instalasi OpenVPN ini dikerjakan pada mesin Debian. Harusnya juga bisa untuk turunan Debian lainnya seperti Ubuntu, Mint, dll.
Tujuan saya menggunakan OpenVPN biasanya untuk tunneling aja, menggunakan IP address luar, mem-bypass restriksi oleh ISP, dll. Fitur enkripsi dan login menggunakan certificate akan saya disable supaya koneksi semakin ringan dan stabil, lalu sebagai gantinya proses login nanti akan menggunakan username & password. Enkripsi cuma akan menambah overhead di trafik.
Cek dulu TUN / TAP sudah enabled apa belum;

root@starscream:~# cat /dev/net/tun
cat: /dev/net/tun: File descriptor in bad state
Kalau outputnya seperti di atas, berarti TUN / TAP sudah enabled. Jadi kita bisa lanjut ke proses instalasi.
apt-get install openvpn pam-devel
Pada beberapa instalasi Debian terbaru, mungkin akan muncul error seperti ini:
E: Unable to locate package pam-devel
Kalau kasusnya seperti itu, paket pam-devel ngga perlu diinstall.
Copy contoh file konfigurasi yang udah ada ke /etc/openvpn untuk selanjutnya kita edit;
cp -/usr/share/doc/openvpn/examples/easy-rsa/ /etc/openvpn/
chmod -R 755 /etc/openvpn/
cd /etc/openvpn/easy-rsa/2.0/
Lalu kita edit file vars (optional). Biasanya saya edit jadi seperti ini;
vi vars
# Increase this to 2048 if you
# are paranoid. This will slow
# down TLS negotiation performance
# as well as the one-time DH parms
# generation process.
export KEY_SIZE=384
 
# In how many days should the root CA key expire?
export CA_EXPIRE=3650
 
# In how many days should certificates expire?
export KEY_EXPIRE=3650
 
# These are the default values for fields
# which will be placed in the certificate.
# Don't leave any of these fields blank.
export KEY_COUNTRY="ID"
export KEY_PROVINCE="JKT"
export KEY_CITY="Jakarta"
export KEY_ORG="andia.me"
export KEY_EMAIL="scylla@andia.me"
export KEY_CN=vpn.andia.me
export KEY_NAME=andia.me
export KEY_OU=andia.me
export PKCS11_MODULE_PATH=changeme
export PKCS11_PIN=666666
setelah di-edit dan save, lalu;

source ./vars
./vars
./clean-all
./build-ca
Generating a 384 bit RSA private key
.++++++++++++++++++
................++++++++++++++++++
writing new private key to 'ca.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [ID]:
State or Province Name (full name) [JKT]:
Locality Name (eg, city) [Jakarta]:
Organization Name (eg, company) [andia.me]:
Organizational Unit Name (eg, section) [andia.me]:
Common Name (eg, your name or your server's hostname) [vpn.andia.me]:
Name [andia.me]:
Email Address [scylla@andia.me]:
./build-key-server vpn.andia.me
Perhatikan ketika execute perintah build-key-server di atas, value nya harus sama dengan Common Name, atau KEY_CN yaitu vpn.andia.me
Generating a 384 bit RSA private key
............++++++++++++++++++
..++++++++++++++++++
writing new private key to 'vpn.andia.me.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [ID]:
State or Province Name (full name) [JKT]:
Locality Name (eg, city) [Jakarta]:
Organization Name (eg, company) [andia.me]:
Organizational Unit Name (eg, section) [andia.me]:
Common Name (eg, your name or your server's hostname) [vpn.andia.me]:
Name [andia.me]:
Email Address [scylla@andia.me]:
 
Please enter the following '
extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
Using configuration from /etc/openvpn/easy-rsa/2.0/openssl-1.0.0.cnf
Check that the request matches the signature
Signature ok
The Subject'
s Distinguished Name is as follows
countryName :PRINTABLE:'ID'
stateOrProvinceName :PRINTABLE:'JKT'
localityName :PRINTABLE:'Jakarta'
organizationName :PRINTABLE:'andia.me'
organizationalUnitName:PRINTABLE:'andia.me'
commonName :PRINTABLE:'vpn.andia.me'
name :PRINTABLE:'andia.me'
emailAddress :IA5STRING:'scylla@andia.me'
Certificate is to be certified until Jan 4 06:27:10 2022 GMT (3650 days)
Sign the certificate? [y/n]:y
 
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
./build-dh
Selanjutnya kita buat file konfigurasi server;
cd /etc/openvpn
vi udp53.conf
Pada konfigurasi server saya isinya kurang lebih seperti ini;
port 53
proto udp
dev tun
ca easy-rsa/2.0/keys/ca.crt
cert easy-rsa/2.0/keys/vpn.andia.me.crt
key easy-rsa/2.0/keys/vpn.andia.me.key
dh easy-rsa/2.0/keys/dh384.pem
plugin /usr/lib/openvpn/openvpn-auth-pam.so /etc/pam.d/login
client-cert-not-required
username-as-common-name
server 10.53.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.4.4"
push "dhcp-option DNS 208.67.220.220"
keepalive 2 30
comp-lzo
cipher none
persist-key
persist-tun
status udp53.log
verb 3
Setelah di-edit dan save, restart service openvpn;
/etc/init.d/openvpn restart
Sampai sini service OpenVPN udah start dan client bisa login, tapi belum bisa melakukan koneksi ke internet karena belum diforward. Untuk itu edit file /etc/rc.local;
vi /etc/rc.local
dan tambahkan script ini;
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -A POSTROUTING -s 10.53.0.0/24 -j SNAT --to 209.141.55.165
10.53.0.0/24 adalah alamat jaringan local VPN yang saya masukkan di konfigurasi udp53.conf tadi, sedangkan 209.141.55.165 adalah IP public server saya. Setelah di-edit dan save, lalu;
sh /etc/rc.local
Langkah selanjutnya kita buat user untuk login ke VPN;
useradd -m -s /bin/false scylla
Konfigurasi di sisi server udah selesai, sekarang lakukan konfigurasi client. Karena aplikasi client untuk konek ke OpenVPN server ada beberapa macam (OpenVPN, Viscosity, dll) dan beda platform (Linux, Windows, Mac OSX) maka saya cuma akan menampilkan konfigurasinya secara general aja. Gimana cara install, konfigurasinya di mana, dll, cari dan coba2 sendiri ya. Atau bisa juga ditanyakan di kolom komentar di bawah.
## Contoh konfigurasi OpenVPN client (*.ovpn) ##
client
dev tun
proto udp #protocol
remote 209.141.55.165 53 #IP address server dan port
resolv-retry infinite
route-method exe
nobind
persist-key
persist-tun
ca ca.crt #file ini yang kita download dari server, dan diletakkan di folder yang sama.
auth-user-pass
comp-lzo
cipher none #disable enkripsi
verb 3
Di sisi client, yang kita butuhkan cuma file ca.crt yang ada di server tadi, jadi jangan lupa untuk dicopy / download dulu ke client.
READ MORE - Instalasi OpenVPN Pada Debian & Ubuntu