wiki'd

by JoKeru

FreeRADIUS basics

While playing around with SoftEther, one of the authentication options was Radius.

So let's setup a radius server:

# install server  
$ apt-get install freeradius -y
# create a user
$ echo 'test Cleartext-Password := "test"' >> /etc/freeradius/users
# no need to add clients, localhost is allowed by default
$ touch /etc/freeradius/clients.conf
# apply …

Reverse Shell

A reverse shell is achieved when you "send" a server's shell (in my demo the server is named target) to another server (hq in my setup).

Using this technique you can run root commands on a server you aren't connected.

# open up a tcp port on the "hq" server to …

cgroups in Debian 6 - a mess

Control Groups are good, but the implementation in Debian 6 is a mess! I know that this OS is not the latest, but when you have production servers, you don't always get the chance to run latest versions.

A good documentation about cgroups can be found at https://access.redhat …

stripe - the web / mobile payment gateway

Stripe is the easiest payment gateway I've setup so far!

You can find all details about this service on their website, I will only mention that Twitter, Apple and Facebook are using it.

# composer prerequisites
$ apt-get install php5 git php5-curl
# install stripe-php library with composer
$ mkdir /var/www/stripe
$ cd …

Chunk size, stride size, stripe size, ext4, alignment ...

In order to get the best performance from your RAID storage, you need to align everything (the filesystem with your RAID setup)!

1 - chunk size of raid array - how you choose this value is not under this post's scope, let's consider the default for my raid controller - 256k

2 - filesystem …

Token Authentication in PHP with Redis

In this post I'll show you how to create and use a token based authentication (something like OAuth2 but waaay lighter) in PHP. The token will expire after a certain period of time. In order to keep the token alive, I've also added a heartbeat function on the client side …

Vesta - Hosting Control Panel

If you're looking for a simple, yet powerful hosting control panel, Vesta could be the one.

VestaCP

Install: it's a one-liner, they have a script that takes care of everything

Usage: this panel can be used by both experienced sys admins and regular users, the design is very clean and fluent …

Measure web server response time with cURL

cURL is mostly used to retrieve web content, but it also can provide feedback for a sysadmin / network admin / webmaster.

Let's take an example:

$ cat <<'EOF' > curl-info
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
time_starttransfer: %{time_starttransfer}\n
size_download: %{size_download} Bytes\n
----------\n …