hackfest is mainly for sharing opensource ideas. One of this was suggested to me by comzeradd. He told me that he is using ziproxy to compress data through his phone (story here android-ziproxy).
So i am using ziproxy from October 2010, to compress all my internet traffic.
Another proxy i am using (mostly for the chain forward ability) is privoxy. Privoxy can forward traffic through another proxy (http or a socks) but has filtering features too. Privoxy can block ads & flash on the spot. It is a well known opensource proxy to system administrators too, who they use it to bypass firewalls or dmz or complex networks.
I believe that everyone who respect his self has No Script, Ad Block Plus with kargig’s filter Greek Ad Block Plus Filter and Flash Block enabled on his/her browser.
All the above add-ons block Js, Flash & Ads on client browser. That means that already you have download them.
If you need to reduce http traffic the solution is to combine ziproxy and privoxy!
By the way, it’s extremely easy, so you should give it a try.
You simple install privoxy and run it locally and then open ziproxy.conf to add these:
NextProxy=”127.0.0.1”
NextPort=8118
Run ziproxy as normal and voila !
Some benchmarks to show you the truth:
wget -d -p www.otenet.gr/otenet/ –no-proxy –no-cache
No Proxy:
Downloaded: 73 files, 718K
Ziproxy:
Downloaded: 73 files, 479K
Ziproxy - Privoxy:
Downloaded: 70 files, 475K
Another on:
wget -d -p http://www.villagecinemas.gr/
No Proxy:
Downloaded: 92 files, 1,1M
Ziproxy:
Downloaded: 92 files, 527K
Ziproxy - Privoxy:
Downloaded: 80 files, 160K
Πριν από λίγο καιρό έγραψα ένα άρθρο για να εξηγήσω πως μπορείτε να έχετε διαφορετικό συνθηματικό σε κάθε εφαρμογή και παρόλα αυτά να τα θυμάστε μέσω μοτίβων: Security & passwords via patterns. Το άρθρο ήταν αρκετά δημοφιλή κι υπήρχαν σχόλια για να το κάνουν ακόμα καλύτερο.
Σήμερα θα ήθελα να προτείνω μια εναλλακτική λύση, που αφορά κυρίως web sites & web applications.
Αποτελεί μία από τις ασφαλέστερες λύσεις και είναι εξαιρετικά εύκολη στην χρήση.
Βήμα 1ο: Secure Password Sync
Στους υπολογιστές μας (επιτραπέζιους και μη) έχουμε έναν λογαριασμό με τις δικές μας ρυθμίσεις. Χρησιμοποιούμε σχεδόν πάντα τον ίδιο web browser γιατί πολύ απλά μας βολεύει. Είτε είστε fun του firefox είτε του chrome σίγουρα έχετε επιλέξει να αποθηκεύει τα συνθηματικά των web applications στην μνήμη του.
Εάν χρησιμοποιείτε πολλούς διαφορετικούς υπολογιστές (σπίτι, γραφείο, laptop, tablet, smartphone) τότε σίγουρα θέλετε συνθηματικά και bookmarks να είναι συγχρονισμένα σε όλους τους browsers σε όλα τα συστήματα. Έτσι λοιπόν καταλήγουμε σε δύο δημοφιλή plugins: xmarks & Firefox Sync.
Πριν από λίγο καιρό, για οικονομικούς λόγους το xmarks ανακοίνωσε ότι σταματά. Εξαγοράστηκε την τελευταία στιγμή από την εταιρεία: last pass. Τότε διάβασα τις οδηγίες κι εγκατέστησα έναν web dav server (οδηγίες εδώ για να εγκαταστήσω μία δική μου βάση για τα συνθηματικά και bookmarks μου.
Η σύνδεση είναι κρυπτογραφημένη κι έτσι πλέον όλοι οι browser μου, μιλάνε με τον δικό μου dav server.
Βήμα 2ο: Strong Password Generator
Αφού λοιπόν ΔΕΝ χρειάζεται να θυμόμαστε κάθε φορά το συνθηματικό που βάζουμε σε ένα web site/application γιατί να μην το κάνουμε διαφορετικό για κάθε login! Για όπου δεν υπάρχει επιλογή για OpenID χρησιμοποιείστε το παρακάτω site:
http://strongpasswordgenerator.com
Επιλέξτε ένα τυχαίο και δύσκολο συνθηματικό για κάθε online εφαρμογή.
Ακόμα κι εάν γίνει populate η database με τα συνθηματικά στο site που μόλις συνδεθήκατε, το συνθηματικό που θα διαρεύσει είναι μοναδικό και ΔΕΝ μπορεί να χρησιμοποιηθεί πουθενά αλλού.
Προβλήματα ?
- Χρησιμοποιείτε browser σε δημόσιο υπολογιστή ή στο σύστημα ενός φίλου.
Πατήστε το κουμπί: I forgot the password που έχει κάθε online εφαρμογή και κάντε reset σε ένα νέο συνθηματικό εκείνη την στιγμή. Όταν θα βρεθείτε στον υπολογιστή σας, μην ξεχάσετε να το κάνετε και πάλι reset.
Ok, everybody loves opensource projects!
An opensource project has many good noticeable features.
It is nice, it is beautiful, it works, it is secure and it is free of charge.
We use every day opensource projects but we always forgot to give our gratitude to people behind our favorite program.
A thank you email is just fine to express our appreciation to the lonely programmer.
But a donation is the best solution for giving our thankfulness.
I have written an opensource project myself too: pirsyncd and i’ve been grateful for all the love i am getting about it.
I have received patches, t-shirts, thank you notes, publicity via blog entries and donations.
All the above are extremely useful for someone like me. I am always trying to balance around zero on my paypal account and give money to other opensource project or services too.
So dont forget to give some money to people, even a small amount is important!
It is a known fact that gmail’s spam filters get the job done.
I am working with spamassassin on local mail setups and i want spamassasin to learn automatically from my gmail Spam folder.
So is it possible?
Of course it is possible.
First we have to get all the mails from our gmail account into a local dummy mail account (easy we’ll use getmail) and then we have to educate spamassasin from our local dummy mail account (sa-learn).
one config file and two commands via cron will do the work.
First the getmailrc (i shall not bother with the getmail & spamassassin installation or setup).
/root/.getmail/getmailrc
[options]
delete = false
message_log = /var/log/getmail.log
verbose = 0
read_all = false
[retriever]
type = SimpleIMAPSSLRetriever
server = imap.gmail.com
mailboxes = ("[Gmail]/Spam",)
username = username@example.com
password = XXXXXXXXXXXXXXX
[destination]
type = Mboxrd
path = /var/spool/mail/gmail_spam
user = nobody
So now when we execute: getmail
every new mail is gmail spam folder will be downloaded into /var/spool/mail/gmail_spam
Next we need to execute sa-learn
sa-learn --spam --mbox /var/spool/mail/gmail_spam
Thats it!
Simple as that!
Dont forget to add the below cron entries:
@daily getmail &> /dev/null
@daily sa-learn --spam --mbox /var/spool/mail/gmail_spam &> /dev/null
Το παρόν post αφορά κυρίως sysadmins, οι υπόλοιποι διαβάστε το για να πάρετε μια ιδέα πως είναι να εργάζεσαι ως sysadmin.
Διαβάζοντας το εξής άρθρο: Henry’s Techno-Musings: Philosophy of Troubleshooting: Sea of Troubles (ξέρω, ξέρω πολύ μεγάλος τίτλος. Μα είναι στο linux gazette, οπότε δώστε του μια ευκαιρία) θυμήθηκα κάτι από το 2006 όταν ξεκίνησα να εργάζομαι στην τωρινή μου θέση.
Πριν εξιστορήσω όμως την ιστορία, θα πρέπει να τονίσω ότι κάθε sysadmin που σέβεται τον εαυτό του ή θέλει να τον σέβονται οι άλλοι, θα πρέπει να γνωρίζει τι είναι τα semaphores ειδικά δε, εάν εργάζεται με τον apache web server.
[story]
Περί το τέλος του 2006 σε ένα ξεχασμένο datacenter, ένας ταπεινός sysadmin εργάζεται στο γραφείο του. Με ζήλο για την δουλειά του, νέος στον συγκεκριμένο χώρο, προσπαθεί να μαζέψει όλες τις απαραίτητες πληροφορίες ώστε να επιλύσει ένα πρόβλημα που ταλάνιζε πελάτες κι άλλους ταπεινούς sysadmins. Ο apache δεν δούλευε σωστά! Κι έτσι ο ταπεινός μας sysadmin σκέφτηκε να ρίξει μια ματιά στα logs. Θέλοντας τα δείξει ότι γνωρίζει τα μυστικά του vim, προσπάθησε να ανοίξει δύο log αρχεία με μία εντολή κι έτσι έγραψε:
vim -O logfile1 logfile2
Δεν κοίταξε όμως ποτέ το μέγεθος των αρχείων. Δεν είδε ποτέ ότι το κάθε αρχείο ήταν περίπου 2 με 2.5 gb και δεν κατάλαβε ποτέ γιατί ξαφνικά η ελεύθερη 4gb μνήμη γέμισε σε μερικά δευτερόλεπτα. Επίσης Δεν μπόρεσε να εξηγήσει εκείνη την στιγμή γιατί ο server έγινε κόκκινος στο monitor.
Σκέφτηκε ότι δεν μπορεί να φταίει αυτός, αυτός ένα vim άνοιξε!
Αλλά εν τέλη είχε καταφέρει να κρασάρει τον web server.
[/story]
Φυσικά κι αυτός ήμουν εγώ (σε άλλο άρθρο θα σας γράψω άλλη παρόμοια ιστορία).
Φυσικά από το τότε λάθος, έμαθα. Δεν είναι όμως πρέπον να μαθαίνεις μόνο από λάθη,
χρειάζεται να μαθαίνουμε κι από τα σωστά και τις εμπειρίες των άλλων.
Επίλογος:
Για επίλογο θα σας δώσω τρεις εντολές και πως χρησιμοποιούνται.
Το πρόβλημα είναι ότι ο apache έχει τερματιστεί και δεν σηκώνεται ή δεν έχει τερματιστεί καλά ή whatever, δεν παίζουν οι ινδιάνοι.
01.
lsof | egrep --color -i 'http|apache'
Βλέπουμε τα ανοιχτά αρχεία που έχουν δεσμευτεί από τον web server μας.
02.
ipcs -s
Χρειαζόμαστε την 2η στήλη με τα semid. Βλέπουμε ποιοι πόροι του συστήματός μας είναι δεσμευμένοι από τον web server μας.
03.
ipcrm -s SEMID
Αποδεσμεύουμε τον συγκεκριμένο πόρο από το σύστημά μας. Φυσικά μπορεί να χρειαστούν πολλά ipcrm και φυσικά πρέπει να αντικαταστήσετε το SEMID με το πραγματικό, αυτό που έχετε δει από το ipcs.
I am supporting a greek company with two linux servers.
These two linux boxes have a lot of services,
including a mail server and they are set upped as active/passive.
In the past week they lost their internet adsl connection.
This is a true and horrible story, but for that i’ll write another post in near future.
So without an internet connection there werent a lot of things i’ve could do.
Thanks to Santa Claus i had predict this problem and i have installed a linux vps server outside of the company as a backup mx/mail server to queue all the undelivered mail.
From the company, i ‘ve been asked if i could keep all the mails in queue and also provide a copy to a gmail account. After google searching about postfix rewrite and re-queue i ‘ve came to automatic recipient bcc.
In my /etc/postfix/main.cf (or you can use postconf) i added this line:
recipient_bcc_maps = regexp:/etc/postfix/recipient_bcc_maps
If you are a careful reader then you have noticed that i wrote regexp for my recipient map file.
And the reason is that i wanted to combine all the mails that came to the backup mx server.
This is my /etc/postfix/recipient_bcc_maps:
/@example.com/ example.com@gmail.com
Of course i had to reload postfix in the vps and send a test email to verify that the blind copy for all the domain is working.
If you want to re-queue all the mails then you have to do something like this:
postsuper -r ALL
PS: As the Journey have said: Don’t Stop Believing …. in Santa Claus
Have a nice holiday :)
Σήμερα επέστρεψα από Βερολίνο.
Πέντε μέρες στους -15 και στο χιονισμένο και πανέμορφο Βερολίνο
επέστρεψα Ελλάδα και στους +15
Η διαφορά παιδείας/κουλτούρας/ζωής κι ότι άλλο θέλετε είναι πραγματικά η μέρα με την νύχτα.
Το βερολίνο είναι μια πόλη που αξίζει να ζεις. Χαμηλές τιμές, απίστευτα μέσα μαζικής μεταφοράς, άνθρωποι, μαγαζιά, ζωή, τα πάντα είναι εκπληκτικά.
Λόγω της 24ώρης απεργίας την Πέμπτη 16.12.2010 είχα αφήσει το αυτοκίνητό μου στο σπίτι ενός φίλου. Σήμερα λοιπόν Δευτέρα 20.12.2010, το βρήκα κυριολεκτικά άλλο χρώμα από τα δωράκια που μου είχαν αφήσει τα πουλιά της γειτονιάς του! Δεν έχω ξαναδεί ποτέ στην ζωή μου το αμαξάκι μου τόσο … περιποιημένο.
Μετά το αρχικό σοκ, παίρνω τον δρόμο της επιστροφής για το σπίτι μου.
Δυστυχώς πέρασα από Μεσογείων για να βγω Αλεξάνδρας.
Κίνηση όσο δεν φαντάζεσαι. Στην διασταύρωση Αλεξάνδρας - Κηφισίας υπάρχουν δύο (μάλιστα δύο) τροχονόμοι για να ρυθμίσουν την κίνηση.
Ακριβώς λοιπόν στην διασταύρωση Αλεξάνδρας - Κηφισίας και μόλις μας κάνει σήμα να προχωρήσουμε, από αριστερά με κόβει ένας με το αμάξι του και με σφήνα μπαίνει μπροστά μου, ενώ έμπαινα στην αλεξάνδρας στην αριστερή λωρίδα (ερχόμουν Φειδιππίδου - ευθεία στην λωρίδα μου). Φρένα για να μην τρακάρουμε ή το χειρότερο μην με πετάξει εκτός λωρίδας και χτυπήσω με κάποιον άλλο, μιας και για να μην πέσει στο διαχωριστικό κόβει το αμάξι αριστερά, απευθείας πάνω μου.
Και μπαμ ο πίσω !
Όλα αυτά έγιναν φυσικά μπροστά στα μάτια των δύο (μάλιστα δύο) τροχονόμων. Που η μοναδική τους παρηγοριά ήταν εάν θέλω, να δηλώσουν το τρακάρισμα στην τροχαία για να έρθει περιπολικό της τροχαίας. Επαναλαμβάνω για όσους δεν κατάλαβαν, οι δύο ΤΡΟΧΟΝΟΜΟΙ, με ρώτησαν εάν έπρεπε να καλέσουν την ΤΡΟΧΑΙΑ για να καταγράψει το συμβάν. Κι ενώ φυσικά ο φίλος σουμάχερ που δημιούργησε το όλο τροχαίο έχει ήδη εξαφανιστεί, μιας και κανείς δεν τον σταμάτησε!
Κοιτώντας πίσω τον προφυλακτήρα μου, δεν είδα κάτι πολύ κακό, ενώ ο πίσω έπαθε μεγαλύτερη ζημιά. Με έπιασε το παράπονο, δεν είχα ούτε μια ώρα στην ελλάδα!
Δεν ήθελα να καθυστερήσω άλλο, δεν είχα πάθει κάποια ζημιά και του είπα να φύγουμε.
Έτσι λοιπόν για να μην ξεχνιόμαστε, αυτή είναι η Ελλάδα που μας αξίζει σε όλους μας.
Εάν και λίγο ξεχάστηκα με το βερολίνο, αμέσως με επανέφεραν στην ελληνική πραγματικότητα.
This time, only code and no comments:
installation
git clone git://git.berlios.de/iat iat.git
cd iat.git
./autogen.sh
./configure
make
sudo make install
Usage
$ /usr/local/bin/iat -i image.mdf --iso
RAW Block :2352
100% [:=====================:]
Verification
$ file image.iso
image.iso: ISO 9660 CD-ROM filesystem data 'image'
A long time ago, i had created an account on a site to use their online service
(the site/company and the service is irrelevant to this story).
This evening i had to use this service again, but i couldnt remember my password!
Thats not a problem, i hit “You forgot your password” button and i followed their instructions.
Just a few clicks and some seconds ago, i was reseting my password to something new.
So i ‘ve tried the login page on the site.
Email or password incorrect.
My first thought was, that i had misspelled my password on the reset form.
I did the reset procedure once again.
This time i wrote the password to an empty text file (just to be sure) and i copied the password from the text file to password & rewrite password text field on the reset page.
After that and one more time:
Email or password incorrect.
So i clicked “support & help, follow this link”.
Thats nice …..
To use their support & help & faq & whatever else they have, i must logon to their site!
HELLLOOOOOO guys
i have problem with your fuc@#$@#$ login page,
how on earth i can login to your help page to open o fuc@#$@# ticket when
my problem is your login page !!!
The Horror! The Horror!
why people are so stupid ?
Μπορεί να έχει λίγο κρύο, αλλά έχει βγάλει ήλιο.
Είναι όμορφα εκεί έξω.
Οπότε πάρτε το laptop σας κι ελάτε να πιούμε καφέ ή ζεστή σοκολάτα μαζί μας στην πλατεία εξαρχείων.
Ελάτε να δουλέψουμε μαζί στα αγαπημένα μας project.
Να ανταλλάξουμε ιδέες και να μοιραστούμε γνώση.
Ένα από τα online περιοδικά που διαβάζω, είναι το linux gazette. Τους τελευταίους μήνες, μετέφεραν υπηρεσίες κι άρθρα σε νέα μηχανήματα. Αποτέλεσμα αυτού, ήταν να βρεθούν αρκετοί mirrors, out of sync!
Από ότι έμαθα, αντιμετώπισαν πολύ σημαντικό πρόβλημα με την υπηρεσία rsync. Για αυτό και οι ελληνικοί mirrors είχαν προβλήματα ανανέωσης.
Πλέον όμως, σχεδόν όλα τα προβλήματα έχουν επιλυθεί. Για όσους δεν γνωρίζουν το περιοδικό, ας ρίξουμε μια ματιά.
Βρήκα την πλήρη λίστα με τα προγράμματα που κάνει mirror ο http://ftp.otenet.gr:
apache
archlinux
centos
cpan
debian
debian-non-US
fedora-linux-core
freebsd
gnu
internet-drafts
kde
kernel
linuxgazette
mozilla
mozilla-firefox
mozilla-thunderbird
openbsd
postfix
redhat
redhat-contrib
redhat-rawhide
redhat-updates
rfc
samba
sidux
slackware
squid-ftp
squid-www
tucopy
tucows
tucows-bsd
tucows-games
tucows-html
tucows-html2
tucows-linux
tucows-mac
tucows-office
tucows-pda
tucows-themes
tucows-tukids
tucows-unixthemes
ubuntu
ubuntu-releases
vim
winsite
No so long ago, i’ve noticed that pirsyncd published (not by me) in download.famouswhy.com . I have to say that i didnt know about this site. But the people behind it, have found me and asked me a few questions. So here is my first interview about me & pirsyncd.
χθες το απόγευμα είχα κανονίσει καφεδάκι στο χαϊδάρι με κάτι φιλαράκια.
ωραία μέρα είχε, σκέφτηκα να αφήσω το αμάξι και να πάω με τα πόδια.
σε 15-20 λεπτά θα ήμουν έτσι κι αλλιώς στο σημείο συνάντησης.
Η βόλτα υπέροχη, ειδικά όταν σε κάθε γωνία είχε κανά δύο κάδους σκουπιδιών και το άρωμα ήταν υπέροχο. Απεργία σαν κι αυτή είναι εξαιρετική !
Ειδικά εάν θες να κάνεις βόλτα με μικρά παιδιά.
Έτσι κι αλλιώς πρέπει να αποκτήσουν ισχυρό ανοσοποιητικό σύστημα !
Για όσους δεν έχουν πιάσει το ύφος μου, ας ρίξουν μια ματιά στο link που έχω κάτω - κάτω δεξιά
When i want to setup a simple http server, i use python with SimpleHTTPServer module.
But in python3 this module is been merged with http.server.
So if you are using python 3, then you should use something like this:
python -m http.server
If you want to use a high port (perhaps you are a simple user) then type something like this:
python -m http.server 8888
Καλημέρα, το hackfest1 είναι πλέον γεγονός.
Ο κόσμος έχει αρχίσει να μαζεύεται σιγά σιγά,
κι έχουμε ήδη ανοίξει το κανάλι στο freenode για να μπορεί ο κόσμος να συμμετέχει απομακρυσμένα:
#hackfestgr στο freenode
If your internal lan is: 192.168.0.0/27
First create a new access-list:
access-list 123 permit ip 192.168.0.0 0.0.0.31 any
and then add this to your line configuration:
access-class 103 in
If you want more help:
€ ssh ROUTER_IP password: router>en Password: router#conf t Enter configuration commands, one per line. End with CNTL/Z. router(config)# access-list 123 permit ip 192.168.0.0 0.0.0.31 any router(config)# line vty 0 4 router(config-line)# access-class 103 in router(config-line)# end router# write mem
Μία βεβιασμένη κίνηση για την προσθήκη μίας IP στο firewall του plesk και βρέθηκε ο web server μου “κλειδωμένος” πίσω από το iptables:
Deny incoming from all on all ports
Κι όλα αυτά γιατί στο 1ο κουτάκι, που έπρεπε να γράψω το όνομα του rule, έγραψα την IP!!!
Κι επίσης είχα επιλέξει το DENY !
This post is just a suggestion! Not real data or benchmarks are been provided !
I was reading the manual page of resolv.conf. Yeap thats true, i am that kind of people that are reading manual pages before bed time.
man 5 resolv.conf
or alternative read this: resolv.conf.
I only use nameserver, domain and search configuration options on my resolv.conf, but reading the manual page,i ‘ve read about rotate option.
With this option our machine run queries with a round robin mechanism on our nameserver declarations.
That means that if you are using two dns cache servers in a big infrastructure, we can query both dns servers equally improving the load average on our dns machines.
If you have more, even better.
So give it a try