Evaggelos Balaskas - System Engineer

The sky above the port was the color of television, tuned to a dead channel

Blog
Posts
Wiki
About
Contact
rss.png twitter linkedin github gitlab profile for ebal on Stack Exchange

Next Page »
  -  
Aug
24
2019
Walkthrough Installation of WackoWiki v5.5.12
Posted by ebal at 18:56:07 in blog, wiki, planet_ellak, planet_Sysadmin, planet_fsfe

WackoWiki is the wiki of my choice and one of the first opensource project I’ve ever contributed, and I still use wackowiki for personal use.

A few days ago, wackowiki released version 5.5.12. In this blog post I will try to share my experience on installing wackowiki on a new ubuntu 18.04 LTS.

Ansible Role

I’ve created an example ansible role for the wackowiki for the Requirements section: WackoWiki Ansible Role

Requirements

Ubuntu 18.04.3 LTS

apt -y install
       php
       php-common
       php-bcmath
       php-ctype
       php-gd
       php-iconv
       php-json
       php-mbstring
       php-mysql
       apache2
       libapache2-mod-php
       mariadb-server
       unzip

Apache2

We need to enable mod_reqwrite in apache2 but also to add the appropiate configuration in the default conf in VirtualHost

# a2enmod rewrite

# vim /etc/apache2/sites-available/000-default.conf

<VirtualHost *:80>
...
    # enable.htaccess
    <Directory /var/www/html/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
    </Directory>
...
</VirtualHost>

MySQL

wacko.sql

CREATE DATABASE IF NOT EXISTS wacko;
CREATE USER 'wacko'@'localhost' IDENTIFIED BY 'YOURNEWPASSWORD';
GRANT  ALL PRIVILEGES ON wacko.* TO 'wacko'@'localhost';
FLUSH  PRIVILEGES;

# mysql < wacko.sql

WackoWiki

curl -sLO https://downloads.sourceforge.net/wackowiki/wacko.r5.5.12.zip
unzip wacko.r5.5.12.zip
mv wacko.r5.5.12/wacko /var/www/html/wacko/
chown -R www-data:www-data /var/www/html/wacko/

Web Installation

01_wackowiki_install_5512.png

02_wackowiki_install_5512.png

03_wackowiki_install_5512.png

04_wackowiki_install_5512.png

05_wackowiki_install_5512.png

06_wackowiki_install_5512.png

07_wackowiki_install_5512.png

08_wackowiki_install_5512.png

09_wackowiki_install_5512.png

10_wackowiki_install_5512.png

Post Install

Last, we need to remove write permission for the wackowiki configuration file and remove setup folder

root@ubuntu:~# chmod -w /var/www/html/wacko/config/config.php
root@ubuntu:~# mv /var/www/html/wacko/setup/ /var/www/html/._setup

11_wackowiki_install_5512.png

WackoWiki

12_wackowiki_install_5512.png

13_wackowiki_install_5512.png

14_wackowiki_install_5512.png

Tag(s): wacko, wiki
    Tag: wacko, wiki
Dec
11
2014
tinc-vpn on android
Posted by ebal at 21:42:25 in blog, wiki, planet_ellak, planet_Sysadmin

I ‘ve updated my wiki page to add an android section to my tinc-vpn setup.

So here it is my: tinc-vpn to a redirect-gateway instructions.

Sep
02
2014
Dockerfile for Two-Factor Authentication
Posted by ebal at 21:48:19 in blog, wiki, planet_ellak, planet_Sysadmin

Most of the people that read this blog post should already know what Two-Factor Authentication is.

For those you don’t, in short terms 2FA is when you can login to a server/site/application using two things and not only one (your password).
Something you have and something you know, like when using your bank card (something you have) with it’s pin (something you know).

There are three (3) android apps at f-droid

  • Google Authenticator
  • FreeOTP
  • Gort

I dont want to use the google authenticator, and i havent yet tested FreeOTP, so i’ve chosen Gort to write about.
Gort is using the barada-pam package as the back-end.

Barada/Gort are based on HMAC-Based One-Time Password Algorithm and not on time sync. This is useful if the clocks are drift and the server (barada) can “catch” one-time passwords even if the counter is out-of-sync by a little.

I ‘ve built a Docker image to show barada/gort on the next Security Talk at Athens,Greece Hackerspace and below is the link on my wiki that contains the Dockerfile.

Be aware on the notes/comments on the file.

Tag(s): barada, dockerfile
    Tag: barada, dockerfile
Aug
13
2014
virtual disks
Posted by ebal at 07:34:02 in blog, wiki, planet_ellak, planet_Sysadmin

I use dd frequently. Especially when i need a backup disk image to restore it to a disk with the same geometry. Most of the case this disk image has partitions. Mounting those partitions to my system is really easy with losetup. So i gathered some basic examples here: losetup examples .

Tag(s): losetup
    Tag: losetup
Jun
08
2014
Dockerfile to build a docker archlinux image with ssh
Posted by ebal at 22:12:07 in blog, wiki, archlinux, planet_Sysadmin

Today’s work : A dockerfile to build an archlinux image with sshd

You can find my notes here: Dockerfile notes

Tag(s): dockerfile, docker, archlinux
    Tag: dockerfile, docker, archlinux
Jun
07
2014
Time at hackerspace
Posted by ebal at 22:23:53 in blog, wiki, archlinux, planet_Sysadmin

I am a very proud member of Athen’s Hackerspace.

I am enjoying the entire 3+ years time (and money) that i’ve spend at this hackerspace. Love it.

Today was a very productive day.

With a good friend of mine, are working to setup an ansible, docker, btrfs workshop !

We want to contribute back to the community and we thought that this is a great opportunity.
We are not guru or anything like that - no, we just want to share the knowledge we are getting by spending time at hackerspace. Nothing more, nothing less. Just share our feedback to all the people that have helped us till now.

So, we are working together (collaboration) by making small steps towards to build these workshop.
Today’s work: Creating a tiny compressed archlinux docker image.

My instruction set is documented here: archlinux installation for docker.

Hopefully my next blog post will be about a simple ssh docker file.
We are trying to keep simple notes so that many people can read and use them.

Tag(s): archlinux, docker, btrfs
    Tag: archlinux, docker, btrfs
May
25
2012
clone your windows with nfsclone
Posted by ebal at 09:20:28 in wiki, planet_ellak, planet_Sysadmin

In our business there are times that you have to work with windows boxes.
The main problem with that is that they are constantly broken.

So is there a efficient way to build a proper backup image ?

The answer is YES, by using SystemRescueCd and ntfsclone

A simple and mini howto is here: http://balaskas.gr/wiki/ntfsclone

Enjoy

Tag(s): sysresccd, ntfsclone
    Tag: sysresccd, ntfsclone
Aug
21
2010
3G on Linux, review
Posted by ebal at 23:51:11 in wiki, planet_ellak

(για πιο τεχνικά, προσπεράστε τον πρόλογο)
Πρόλογος:

Πριν από λίγες μέρες, ανάρτησα το εξής post: 3g on linux, cosmote on the go.

Περιέγραψα, σε απλά βήματα, την διαδικασία σύνδεσης στο διαδίκτυο μέσω ενός usb 3g stick. είχα κατά νου γενικές οδηγίες που θα μπορεί να χρησιμοποιήσει μέχρι και ο πιο απλός χρήστης για να συνδεθεί εύκολα και γρήγορα.

Από τα σχόλια του Post, καλύφθηκαν ακόμα περισσότερα θέματα, κι όχι μόνο τεχνικά. Έγιναν αναφορές για διαφορετικές προσεγγίσεις, γραφικά προγράμματα, σύνδεση μέσω τρίτων προγραμμάτων κι άλλα πολλά.

Θα ήθελα να ευχαριστήσω όλους του φίλους για την συνεισφορά τους, τόσο για τα σχόλιά τους, όσο και για τα ηλεκτρονικά τους μηνύματα.

Με αφορμή το post, τα σχόλια και κάποια από τα ηλεκτρονικά μηνύματα που δέχθηκα, θεώρησα φρόνιμο να δημιουργήσω μία νέα σελίδα, στην οποία θα προσπαθήσω να εξηγήσω όσο πιο απλά μπορώ (κι όχι όσο το δυνατό καλύτερα) όλα όσα είναι απαραίτητα γύρω από το 3G σε διανομές Linux.

Θα είναι μεγάλη μου χαρά να το διαβάσετε (κι αυτό), να το σχολιάσετε (μέσω email) και να με διορθώσετε όπου έχω κάνει λάθος ή έχω παραλείψει κάτι.

FAQ :: 3G on Linux

  • 1 comment
Jul
29
2010
mbox Deduplication using python
Posted by ebal at 18:31:28 in wiki, planet_ellak, code, planet_Sysadmin

A simple python script to deduplicate a mailbox (mbox format).


#!/usr/bin/env python
# Created by Evaggelos Balaskas on Thu Jul 29 21:22:41 EEST 2010
# Remove duplicate mails from mbox using message-id
 
import sys
import mailbox
 
if len(sys.argv) == 2:
        mid = []
 
        for message in mailbox.mbox( sys.argv[1] ) :
                s = message['message-id']
                if s not in mid:
                        mid.append(s)
                        print message
else:
        print "Usage should be: " + sys.argv[0] + " mbox > new.mbox"

You can take a look, also, on my other python script: How to remove specific mails from a mbox by subject

  • 1 comment
Jul
09
2010
Remove duplicate mails from mailbox
Posted by ebal at 09:15:08 in wiki, planet_ellak, code

A couple of days back, i wrote a perl script to remove backscatter mails from a mailbox file using perl.
You can take a look on the code here:
Remove backscatter mails from mailbox.

Today i wanted to remove the duplicate mails from a mailbox. I’ve used, till now, mergembox, but i wanted to write something on my own.

So, without further ado:

  1 #!/usr/bin/perl -w
  2 
  3 use strict;
  4 use Mail::MboxParser;
  5 
  6 die $0 =~ /([^/]+)$/, "  >  n" unless @ARGV == 1;
  7 
  8 my $mb = Mail::MboxParser->new($ARGV[0]);
  9 my $field = "message-id";
 10 my @MessageIds = ();
 11 
 12 while ( my $msg = $mb->next_message ) {
 13 
 14         my @msgid = split(/@/, $msg->header->{$field});
 15          
 16         if ( grep(/$msgid[0]/, @MessageIds ) ) {
 17                 warn "Duplicate Message-ID: " . $msgid[0] . ", already exists ! n" ;
 18         } else { 
 19                 push( @MessageIds, $msgid[0] );
 20                 print $msg."n" ;
 21         }
 22 }

You can see the code with syntax highlight here:
Remove duplicate mails from mailbox

Jun
27
2010
Remove backscatter mails from mailbox
Posted by ebal at 17:51:39 in wiki, planet_ellak, code

Φίλος μου ζήτησε βοήθεια ώστε να καθαρίσει διάφορα backscatter mails από το mailbox του. Μία από τις πλέον γνωστές επιθέσεις είναι ο spammer να χρησιμοποιεί διαφορετική mail address ή ακόμα και reply-address με αποτέλεσμα τα back scatters να μην έρχονται σε αυτόν αλλά να πηγαίνουν σε κάποιον άλλο.

Με βοήθησε αρκετά το συγκεκριμένο άρθρο:mbox_selective_deletion και πάνω σε αυτό βασίστηκα για να γράψω την δική μου παραλλαγή:


#!/usr/bin/perl -w
# Created by Ben Okopnik on Thu Jan 14 21:55:46 EST 2010
# Updated by Evaggelos Balaskas on Sun Jun 27 20:50:11 EEST 2010

use strict;
use Mail::MboxParser;

die $0 =~ /([^/]+)$/, " <mbox> n" unless @ARGV == 1;

my $mb = Mail::MboxParser->new($ARGV[0]);
 
my @subjects = ( 
    "Undeliverable",
    "Warning: could not send message for past 12 hours",
    "Returned mail: see transcript for details",
    "Delivery Status Notification (Failure)",
    "Undelivered Mail Returned to Sender"
    );

while ( my $msg = $mb->next_message ) {
  my $s = $msg->header->{subject};
  
  $s ||= "empty_subject";

  my $flag = 0;
  foreach (@subjects) {
      if ( $s =~ $_ ) {
          $flag = 1;
          last;
      }
  }
  print $msg."n" unless $flag ;

}

Η χρήση του είναι η εξής:

./remove.pl mailbox > newmailbox

και φυσικά μπορείτε να προσθέσετε στην λίστα strong>@subjects</strong όσα περισσότερα subjects θέλετε.

Ο πλήρες κώδικας βρίσκεται εδώ: How to remove a specific mail from a mbox

ΥΓ: Θα χαρώ να λάβω παρατηρήσεις.

May
18
2010
Encrypted Home & Swap Partition
Posted by ebal at 12:17:54 in wiki, planet_ellak

Προσπάθησα να καταγράψω τις τελευταίες ημέρες (ελπίζω αναλυτικά), την διαδικασία κρυπτογράφησης του home & swap partition.

Για όποιον ενδιαφέρεται ας ρίξει μια ματιά εδώ: Encrypted Home & Swap Partition

κι εάν έχετε τυχόν παρατηρήσεις, παρακαλώ ενημερώστε με.

Apr
09
2010
Yet Another Web Server ?
Posted by ebal at 21:10:42 in wiki, planet_ellak

Ένας φίλος και συνάδελφος, μου προώθησε το εξής link:

Apache Vs Yaws

Μου έκανε τόση εντύπωση, που δεν έχασα χρόνο για να το δοκιμάσω.
Έτσι λοιπόν τις μέχρι τώρα δοκιμές και προσπάθειές μου, τις κατέγραψα στην παρακάτω σελίδα στο wiki μου:

http://balaskas.gr/wiki/yaws

Τυχόν παρατηρήσεις, ευπρόσδεκτες.

Mar
12
2010
Chrooted DropBear
Posted by ebal at 21:00:37 in wiki, planet_ellak

I had installed DropBear (Dropbear is a relatively small SSH 2 server and client.) to a chroot environment. The existed documentation is very poor, so i wrote down my notes here: Chrooted DropBear.

If you have any questions, i ‘ll be glad to answer them.

Jan
22
2010
Another bash script for backup with a snapshot logic.
Posted by ebal at 20:46:01 in blog, wiki, planet_ellak, archlinux

In the last days i lost some (non critical) data cause i had forgot to install rsnapshot in my laptop. I was without network for a couple of hours and there was nothing on TV. So … i’ve played with bash and made a bash script to backup some directories with a snapshot logic.

abs4Snap

The bash script is really simple and straight-forward without any difficult parts. So you can easily configure it, to serve your needs.


#!/bin/bash
# Evaggelos Balaskas, <ebalaskas AT ebalaskas DOT gr>, 20090122
DIR="/var/cache/pacman/pkglist"
PATHS="/etc /usr/local/etc /boot"
BACKUP="backup"
PACMAN="/usr/bin/pacman -Qqe"
RSYNC="/usr/bin/rsync -ra"
MKDIR="/bin/mkdir -p"
DATE="/bin/date"
CP="/bin/cp -al "
MV="/bin/mv -f"
RM="/bin/rm -rf"
TOUCH="/bin/touch"
DAYS="10"

# Make Directory Structure
$MKDIR $DIR/`$DATE +%Y/%m/%d`

#Package List
$PACMAN > $DIR/`$DATE +%Y/%m/%d/pkglist_%H_%M`

#Rotation
if [ -d "$DIR/$BACKUP.$DAYS" ] ; then 
    $RM $DIR/$BACKUP.$DAYS
fi

for i in `seq $(expr $DAYS - 1 ) -1 1` ;do 
    if [ -d "$DIR/$BACKUP.$i" ]; then
        $MV $DIR/$BACKUP.$i $DIR/$BACKUP.$(expr $i + 1)
    fi
done

# Create Hard Link
if [ -d "$DIR/$BACKUP.0" ] ; then
    $CP $DIR/$BACKUP.0 $DIR/$BACKUP.1
fi

# Sychronization
for k in $PATHS; do
    $MKDIR $DIR/$BACKUP.0$k/
    $RSYNC --delete $k/ $DIR/$BACKUP.0$k
done

# TimeStamp
$TOUCH $DIR/$BACKUP.0
  • 1 comment
Mar
24
2009
Debian or FreeBSD ? Why not both ?
Posted by ebal at 17:25:38 in wiki, planet_ellak

Τελικά τι να επιλέξω debian ή FreeBSD;
Εάν όμως μπορώ να έχω και τα δύο ταυτόχρονα δεν θα ήταν καλύτερα;

Φυσικά θα ρωτήσει κάποιος πως είναι δυνατόν;
Η λύση είναι το kfreebsd

Πρακτικά είναι ένα debian σύστημα πάνω από έναν FreeBSD kernel.

Αποφάσισα να του δώσω μία ευκαιρία και για αυτό το δοκίμασα σε ένα VirtualBox. Κατέγραψα την εγκατάσταση του kfreebsd στο παρακάτω link

http://balaskas.gr/wiki/kfreebsd

και το σκέφτομαι πολύ σοβαρά να το εγκαταστήσω

  • 7 comments
Mar
16
2009
Roadsend PHP - alternative php compiler
Posted by ebal at 21:32:29 in wiki, planet_ellak

Στους διαδικτυακούς προβληματισμούς μου τις τελευταίες ημέρες μπήκε η χρήση scripting languages μέσω fast-cgi. Φυσικά ο λόγος ήταν (και είναι) η (δοκιμαστική ακόμα) χρήση του nginx web server. Αναζητώντας στο διαδίκτυο περισσότερες πληροφορίες με σκοπό να ικανοποιήσω την περιέργειά μου έφτασα σε μία εναλλακτική PHP.

Αναφέρομαι στον alter-native php compiler με όνομα RoadSend-PHP.
Μέχρι στιγμής οι προσπάθείς μου είναι ικανοποιητικές μεν, μη αποδεκτές δε.

Ο σκοπός μου είναι να προσπαθήσω να περάσω το wackowiki σε nginx+roadsend

Ένα από τα ενδιαφέροντα που είδα είναι η ύπαρξη backend με όνομα: MicroServer ώστε να μπορεί κανείς να δημιουργεί stand alone web applications (αυτό θέλει λίγο ψάξιμο - στα todo).

Εάν ενδιαφέρεται να δει κάποιος πως φαίνεται ένα phpinfo στο roadsend
ας ρίξει μια ματιά εδώ: http://balaskas.gr/wiki/RoadsendPHP

Mar
16
2009
Init Script for nginx
Posted by ebal at 10:03:16 in wiki, planet_ellak

Αυτό που μου λείπει από τον nginx είναι ένας εύκολος και πιο generic τρόπος για να εκκινώ ή να τον σταματάω κατά βούληση.

Οπότε αποφάσισα να γράψω ένα δικό μου Init Script για αυτή την δουλειά.

Το script είναι αρκετά generic για να μπορεί να χρησιμοποιηθεί και σε άλλες περιπτώσεις με ελάχιστες τροποποιήσεις.
Ελπίζω να φανεί χρήσιμο.

Mar
15
2009
nginx with php
Posted by ebal at 16:37:49 in wiki, planet_ellak

Αυτό το ΣΚ σκέφτηκα ότι θα ήταν καλή ευκαιρία να δοκιμάσω τον nginx web server. Από ότι διαβάζω είναι αρκετά γρήγορος και ασφαλής και μπορεί να χρησιμοποιηθεί κι ως mail proxy. Αρκετά ενδιαφέρον λοιπόν.

Φυσικά ένα web server χωρίς την δυνατότητα να τρέχει ένα δυναμικό site δεν είναι και τόσο σημαντικό στις μέρες μας. Αποφάσισα λοιπόν να εγκαταστήσω και php. Όπως έμαθα γίνεται με την χρήση του fast-cgi οπότε μιας και στο παρελθόν δεν είχα την ευκαιρία να ασχοληθώ με κάτι τέτοιο θεώρησα ότι είανι καλή ευκαρία.

Τα πρώτα αποτελέσματα φαίνεται να είναι καλά. Ελπίζω εντός εβδομάδας να δω περισσότερα.

Στο παρακάτω url έχω καταγράψει την προσπάθειά μου κι ελπίζω εάν κάποιος ακολουθήσει αυτή την κατεύθυνση να βοηθηθεί σε σημεία που εγώ κόλλησα.

http://balaskas.gr/wiki/nginx

  • 2 comments
Jan
15
2009
php - ternary
Posted by ebal at 20:46:52 in wiki, planet_ellak

Κατά καιρούς γράφω διάφορα πράγματα στο wiki μου (κυρίως για προσωπική χρήση), ένα από αυτά είναι κάποιες σημειώσεις που έχω στα ελληνικά για php

Πρόσφατα έμαθα (θυμήθηκα από την θεωρία στην σχολή) ότι η php υποστηρίζει (όχι όσο καλά θα ήθελα) την δομή Ternary. Επίσης για να είμαι και ειλικρινής το φρέσκαρα και σήμερα που έπεσα σε αυτό.

H δομή ελέγχου ternary είναι μία συντόμευση της if - then - else
Στο manual της php αναφέρεται εδώ.

Ένα απλό παράδειγμα από μένα είναι το εξής:


// Κλασικός τρόπος
if ( $alitheia = 1 ) { 
  print "Yes. it's true";
} else {
  print "No, it's false";
}

// ternary
( $alitheia = 1 ) ?   print "Yes. it's true" : print "No, it's false" ;

Happy hacking :)

Next Page »
  -  

Search

Admin area

  • Login

Categories

  • blog
  • wiki
  • pirsynd
  • midori
  • books
  • archlinux
  • movies
  • xfce
  • code
  • beer
  • planet_ellak
  • planet_Sysadmin
  • microblogging
  • UH572
  • KoboGlo
  • planet_fsfe

Archives

  • 2025
    • April
    • March
    • February
  • 2024
    • November
    • October
    • August
    • April
    • March
  • 2023
    • May
    • April
  • 2022
    • November
    • October
    • August
    • February
  • 2021
    • November
    • July
    • June
    • May
    • April
    • March
    • February
  • 2020
    • December
    • November
    • September
    • August
    • June
    • May
    • April
    • March
    • January
  • 2019
    • December
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2018
    • December
    • November
    • October
    • September
    • August
    • June
    • May
    • April
    • March
    • February
    • January
  • 2017
    • December
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2016
    • December
    • November
    • October
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2015
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • January
  • 2014
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2013
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2012
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2011
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2010
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2009
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
Ευάγγελος.Μπαλάσκας.gr

License GNU FDL 1.3 - CC BY-SA 3.0