Thursday, 6 November 2014

Procrastinating is scary....

Welp, I wonder how long since my last update is? Huh, procrastinating is quite scary...

Anyway, sorry that I haven't update this blog and yes, I realize that there's more of gibberish than tutorial, but I did warn you so hey! No harm's done :)

Firstly, I was trying Snort on windows with Barnyard, the Snort installation come quite nicely but can't say the same for Barnyard. So yes, the next tutorial is about Snort and Barnyard on windows! Why on windows? Well most people use windows, and you could find lots of tutorial about installing them in linux. 'Tis gonna be a bumpy ride but it will be worth it.

Secondly, I keep promising that I will update this blog frequently either it's about some gibberish or tutorial, and I do realize I didn't keep it (it's my fault yes), so allow me to rephrase it then, I'll update when I feel like something worth to post comes up, either it's some gibberish coated in gold or new tutorials, that'll depends. I can't say "I'm actually busy because I'm making my final project" as a reason because I got lots of free time back then, so I can only say that my bad, gonna change, wish me luck.

Lastly, as an apologize, I'll post a summed up Cacti+Weathermap installation, and it's in Indonesian! I mean the explanation, you just need the command line right? Well, good luck on whatever you're doing right now! Don't you give up now!

Instalasi Cacti :
-          Install Dependencies
apt-get install snmpd snmp mysql-server apache2 libapache2-mod-php5 php5-mysql php5-cli ph5-snmp
      apt-get install libpango1.0-dev libxml2-dev
      apt-get rrdtool

-          Download dan ekstrak cacti ke /var/www

-          Ubah kepemilikan folder rra dan log
chown –R www-data:www-data rra/ log/
-          Buat database untuk cacti dalam mysql    
create database cacti;

-          Masukkan cacti.sql ke dalam database cacti
mysql –u root –p cacti<cacti.sql

-          Buat user baru dalam mysql untuk cacti dan atur hak aksesnya terhadap database cacti
create user [username] identified by ‘[password]’;
grant all cacti.* to [username]@localhost identified by ‘[password]’;
flush privileges;

-          Edit config.php pada folder cacti, samakan user yang digunakan untuk database pada file tersebut dengan user  yang kalian daftarkan

-          Buat user cacti pada sistem local
useradd [userame] –d /var/www/[cacti path] –s /bin/false
-          Ubah perizinan untuk user tersenut
chown –R [username] /var/www/[cacti path]

-          Tambah cronjob untuk poller.php
Cronjob –e
*/5 * * * * php /var/www/[cacti path]/poller.php >/dev/nul 2>&1
            -     Buka browser, lalu ke localhost/[cacti path] lalu ikuti instruksi untuk menginstall cacti

Instalasi weathermap :
                

-          Unduh cacti Plugin Architecture

-          Ekstrak dimana saja

-          Kopi file patch  (cacti-plugin-arch.diff) ke folder cacti

-          Jalankan comman ini terlebih dahulu :

Patch –p1 –N - -dryrun < cacti-plugin-arch.diff
-          Jika tidak terdapat error, jalankan lagi perintah diatas tanpa - -dryrun. Jika terdapat error, kopi file-file yang terdapat dalam folder files ke folder cacti


-          Unduh plugin weathermap

-          Ekstrak dimana saja

-          Kopi folder weathermap ke folder plugin di dalam cacti

-          Edit config.php, tambahkan line berikut seteah konfigurasi database

$plugins[]=array();
//$plugins[]=’monitor’;
//$plugins[]=’weathermap’;\

-          Sekarang masuk ke web cacti, aktifkan plugin weathermap

-          Agar bias menggunakan web editor weathermap, cek terlebih dahulu modul yang dibutuhkan. Pada web browser sudah disediakan dan tinggal digunakan.

localhost/[cacti url]/plugins/weathermap/check.php
Jika terdapat modul yang hilang, jalankan lagi pada terminal. Masuk ke dalam folder cacti, lalu ke folder weathermap, jalankan command ini

php check.php

Jika hasilnya sama dengan di browser, install modul terlebih dahulu :
      Apt-get install php5 php5-cli php5-gd php-pearl apache2
Lalu jalankan lagi command line dalam terminal, semuanya harusnya sudah terinstall. Sekarang coba jalan check,php pada web browser lagi. Jika terdapat error, restart computer. Web editor weathermap telah dapat terpakai


P.S I just know that newer version of Cacti already have a plugin architecture, so I guess this step is not required, cheers.

Thursday, 31 July 2014

Still Alive and Kicking

Whoa, it's been a month without any update or posts. Well that's on me, though I know nobody actually visit this site frequently...

Anyway, just giving heads up for you who come here often (or not) hoping for some tutorials or some shit, I might post more scarcely this month. Why? here's a few reason :

1) Finishing the witcher 1 and 2, also will finish whatever game I have in my backlog that I feel want to finish it

2) Are learning some coding language though the progress is very VERY slow, so there's that

3) Social stuff, though this thing does not occur often (read : I have life too)

4) In tune with number 2, might change the blog codes. Again, this is really heavily depend on my mood

So that's all, hopefully people will still come here. Oh, and sorry if my post are rustled your jimies, gramnaz.

Wednesday, 2 July 2014

A penny for your thought...

Hey guys, not here for more tutorial, I did promise that there will be some phun stuff here so I decided to post something phun. It's been unproductive day for me, don't know why but didn't feel like to do any work at all. Meh... probably just temporary setback. So, here is the first phun post! Enjoy it! Share but don't steal!



What if we were only living in a dream? When we woke up, only nothingness will greet us. We have no other choice but to embrace it. That thought always linger in my mind, with no answer to ease my anxiousness. Yet, I keep on moving forward, with that question in mind, ignorantly passing through the day with no end goal what-so-ever.

One day, one thing changed. A woman from my workplace - Alice her name - ask me if I'm free that night. It's something out of the ordinary that I'm loss at words. I can only shake and nod my head, responding to her answer. She will giggle each time I did that, and I'll smile nervously. We come to an agreement that on Saturday night, we'll meet up to watch a movie. That day, I felt like my deadbeat clock finally ticking.

The promised day has come, I wore my best suit, look at myself on the mirror again and again, making sure everything is perfect. Nice suit? Check. Perfume? Check. Confidence? Almost. I practiced how I will greet her when I pick her up, how I will offer her seat when we're at the theater, and how I -hopefully- will kiss her goodbye. And without realizing it, it's time to pick her up.

I ride my car to her apartment, then called her from the front desk. She showed up with a beautiful dress, but what more beautiful is her. Her eyes looks more gorgeous, her small lips colored red, her cheeks are a bit red, her hair are tied in one side and curled on the edges. When she saw me, she smiled. Oh, that's the best part of her, her smile.

Shortly after that, we're at the movies. There's only a few interesting movie, but I let her choose. Weirdly, she chooses the uninteresting one, even the genre is a mess, action romantic drama comedy thriller. Oh well, if that's her choice then so be it.

She picked the seat on the far-back. We sit there and chat for a moment before the movie starts. After half an hour of the movie, she leaned on my shoulder. That really surprises me, and I already feel nervous. Not knowing what to do, I reach out and wrap my arm around her shoulders. Now she rests her head on my chest. She looked at me and smiled, probably hearing my increasing heartbeat.

After the movie, we talked how bad that movie was and laugh it off. Then it's already late at night, I asked her if she want me to take her home, but, she said how about going to my places instead. So, we finally at my place.

We sit on the living room, and silence is our company. I tried to break the silence but can't find any conversation starter. Suddenly, our fingers met. I look at her, she shyly looked away. I man up and fit my fingers on her hands. She looked at me and I looked at her. Our face are getting closer and closer, and finaly, we kissed.

After a while, I pull back my head and look at her, she smiled. "I-is this a dream?" I asked her. She smiled again and squeeze my hand, "yes, yes it is." W-what? Did she just say yes? Suddenly, a loud noise breaks, and I woke up.

My fear comes true, it is a dream, and I'm back to nothingness. I lazily drag myself off the bed, towards the bathroom. I took a bath and prepare for work. At work, I saw her again, Alice. Is this how my life will continue? And empty dream, an vast dessert without an oasis? I let that question sink in my mind. Perhaps this is fate, perhaps it is our fate to have an empty dream. Nothingness that we had no choice but to embrace... Is it true then?

Without realizing it, I stood up. My instinct told me to refuse it. We hold our dreams on our hand, we rein over our fate. With that in mind, I muster up my courage and walk toward Alice. Today, I will change everything...



Wow, that is unexpectedly long and something lewd got thrown in between. Oh well, hope you enjoy it. This was written with a headache and random rant in between, I'll post some seriously written stories in the near future, look forward to it!

Monday, 30 June 2014

A lil bit configuration with weathermap

Now you have learned how to add plugins to Cacti, some of you might even already mess with its setting and tried to use the editor. But unfortunately, you can't. The weather is missing something to work. Perhaps you need the sun to enable it...

Alright, the first problem you'll encounter is the PHP editor is not enabled. This is quite easy to solve, just go to the weathermap plugin folder in Cacti, edit the editor.config. The solution is right there, just change the value to true.  Keep in mind that enabling the editor ALSO enabling other people to edit your weathermap, I haven't tried to exclude other people from messing with our shit so for now let's just focus on configuring the weathermap editor so it can be used

Next, it will say that some modules of the php is missing or not enabled. If you really REALLY follow the tutorial before blindly, you will realize that you haven't installed the said module. Luckily, it's quite easy to get it in Ubuntu, but before that, you need to check again. First, go to you web browser, then go here :

localhost/[cacti url]/plugins/weathermap/check.php

Now see what is the result. It probably resulted in lots of missing module, but it could be wrong. Now open the terminal, go to the weathermap folder in Cacti, and do this :

php check.php

What is the result? If it is the same as the browser, you seriously need to install the modules. Now go get it with this magic words :

apt-get install php5 php5-cli php5-gd php-pear apache2

Wait for it to be finished downloading. Now do the two steps again, from the browser and from the terminal. Is it still the same? No? Excellent! Probably your browser still show that the module is missing but the terminal showed that all the modules are installed and healthy. For me, I fix it with restarting (or shutting down and leave it for a good few hours) the PC or virtual machine and then voila, it works. If you find another way to fix this problem, feel free to share it.

Now the final hurdle is setting the read/write permission. Just do this on the weathermap folder :

chown -R www-data:www-data /var/www/cacti/plugins/weathermap/configs

And you're all set!

That's quite short isn't it? I was going to fill it with random rant or something but I just remembered I need to play morrowind and the witcher 1. So, I'll keep it short, and I'll see you next time on how to use both cacti and weathermap! Oh and don't forget about cactus too mmkay? We'll get there soon enough...


Tuesday, 24 June 2014

Cactus PIA and the weather

Now, after you installed the Cacti, and probably some of you have been fiddling with its settings and  stuff, it might occur to you that maybe, just maybe, we could add something to make our cactu- I mean Cacti, some extended function. Like, I don't know, some plugins perhaps?

Yes, yes, we could add plugins to our Cacti, but before doing that, we need to add this thing called PIA. What is PIA? Well if you're Indonesian, or have been to indonesia, you probably know this thing called bakPIA. What? Never heard of it? Well what the heck are you doing?! GOOGLE THAT MADAFAKA!

Here, this is bakPIA

Now, PIA is Plugin Architecture. The name itself is self explanatory so I wouldn't explain it too much. Now then, let's just continue to install the architecture. Oh yeah, it's highly recommended that you install it right away after you've installed Cacti, since to install the PIA, we need the files to be clean, untouched by your dirty thoughts. That's right, I know what kind of people who come here so behave, alright?

And just like before, this step is used for Ubuntu 12.04.

First, download the cacti PIA. And as always, google it. After that, extract it anywhere you like, but not inside 'kay? *wink wink*. Now get inside the extraction folder, inside it there's a patch file like this : cacti-plugin-arch.diff ; a file folder, a pa.sql, and one other thing that I forgot but not used. 

Now, to install the PIA, we just need to patch the Cacti files. To do that, just copy the .diff file to your Cacti installation folder. After that, run this :

patch -p1 -N --dry-run < cacti-plugin-arch.diff

Well that command does execute the patching process but it doesn't do shit. You could consider it as a test run to test whether there're errors when we patch it or not. If there's no error, just run the command line again without the --dry-run and it should be done wonderfully. If there's error, that means the files that will be patched have been edited or soiled. 

So what do we do? First we back up the files, or even the whole folder if you want to be safe. After that, copy the files (which what I did) that showed error when we test run the patching process. What are we copying? We're copying the pre-patched files inside the file folder inside the extracted folder. Yes, they are kind enough to provide it. After that we need to edit the config.php inside the Cacti folder. 

$plugins = array();

Now, add the code above under the database configuration. So, what is that exactly do? If you're familiar with basic programming, you'll understand it. But if you don't, I'll have to leave google to help you *smile*.

Nah, just kidding. As far as I understand it, we create a variable called with plugins which is an array of table. So, if we want to add a plugin, we need to add a command line under it that goes like this :

//$plugins[]='pluginname';

Again, as far as I understand it, the first command include that plugins array of table inside the database, then we add the plugin identification inside the array so the Cacti database can recognize the plugin and it can run the plugin in the website.

After that, import the pa.sql to your cacti database in mysql.

mysql -u root -p cacti < pa.sql

If you did it correctly, the plugin can be found in the website, like this :

Nice isn't it?

Now, if you see the pic above, you could see a new tab and also a new selection in management menu called weathermap. That is a plugin that I will tell you how to install it, hooray!

Installing the plugin in Cacti is quite simple. You just need to download the plugin, extract and move it to the plugins folder inside the cacti installation folder, and add the command line again inside the config.php . After that you go the Cacti website, login with user with plugin management permission, and turn on the plugin in the plugin management menu! Simple right?

To this point, I haven't tried to use the weathermap plugin so that is next in the tutorial backlog, alongside with how to use Cacti - and cactus - like I promised before. So, stay tune! Oh, and for you guys who were wondering where the heck is the randomness of this blog, worry not friends! I publish fun stuff on weekend and holiday, where I have a lot of time to waste! Yay!

On workdays, I'll mostly post about tutorials IF there is something worth to post to. If not, random post it is then! Until then, stay tuned to this blog!

references : http://docs.cacti.net/manual:087:1_installation.9_pia , google images, my own cactus

Thursday, 19 June 2014

How to install cactus!

Yeah! My first post about some tutorial! Are you pumped? I AM!

Right, right as you know, cactus is a desert plan. So I guess it's quite easy to take care of it. The problem is how to install them into the pot. Many of you know that their leafs are the needles, and needles can hurt your finger, also there's a chance you'll fall into a deep sleep and won't wake up until some asshole rape you. But you know what? SCREW IT! GRAB THE CACTUS BY HAND AND RAM IT INTO THE POT! that's the only way to install it, like a b0ss.

Look at that, ain't it beautiful?

After you've done the procedure on the first paragraph, you can act proud and show the cactus to your friend! Don't be shy! Show it like it was your own private stick! Make them choke with it! Yeah! 



So, now that you have learned how to install a cactus, now you're ready to install Cacti. Now you might be wondering whether Cacti is cactus's long lost brother or he's a complete stranger who someday will rape you roughly. Well, hold that thought, keep it to yourself, we'll discuss it more after this.

Cacti is actually a software - open source one - that monitor network, well not just network, you can also monitor your memory usage, user usage, load usage, and other things which I haven't tried yet. But don't worry, I'll come around and probably write a tutorial about how to use Cacti... also cactus, probably. So basically, Cacti is a front-end of rrdtool, a tool  - which according to my friend wiki - is an industry-standard data logging tool. Whoa whoa, what is that weird words? Worry not friend, I'll explain it to you. As you can see, industry is industry, it's self explanatory. While standard means a level or stuff that you compare to other stuff so you can say smart things like " it's not up to the standard!" or things like that. 

Now what is data logging? Well as the words says, it is used to log data which input is inserted automatically or manually. However this input is continuous and time based, so it's a chore if inputted manually. This rrdtool then sample the data and then present it to the user in the form of graph, also showing you the min/max/avg of the input. 



And like they said, a picture is worth a thousand words. Now why do we need to use Cacti? Not just rrdtool? Like it was said before, Cacti is the front-end of rrdtool. As far as I know, rrdtool can only produce graph like picture above with no interface with user what so ever (except creating graph with the command line). So we use Cacti to add interface to the rrdtool, what does that mean then? Basically we are using rrdtool to gather the data, transform it into a graph, then present it to us. But, with Cacti you can add some plugin like weathermap - which we will try after this (read : after I done trying it and have the time to write the tutorials) - to show the network map of how the packet we send transferred. And also you can create a multiple graph and simultaneously show the data. And also the neat thing is each data can be presented in different time stamp, like data each minutes, each 5 minutes, each 15 minutes, each days, each months, and so on. 

So to sum it up, Cacti makes using rrdtool more convenient. You don't need to input lots of command line to show a graph of something within different time range. Well, there's also other advantage but let's just focus on installing Cacti (read : too lazy, want to play).

Now then, to install cacti on ubuntu 12.04, just blindly follow this tutorial : 

apt-get install snmpd snmp mysql-server apache2 libapache2-mod-php5 php5-mysql php5-cli php5-snmp

apt-get install libpangol1.0-dev libxml2-dev

apt-get install rrdtool

Download and extract the tarball of cacti. Hm? Where to download it? GOOGLE IT

After that, move it to /var/www. You could move just the files and move it to a new folder called cacti on /var/www or just plain straight move the extracted folder there OR move the extracted folder to new folder called cacti there. After that get inside me... I-I mean get inside the extracted folder (E.F.). Time to create a database in mysql and then import the database in the E.F. to that database.

mysql -u root -p
>create database cacti;
>exit

mysql -u root -p cacti < cacti.sql;

After that, we create an user in mysql so cacti can use it.

mysql -u root -p
>create user [insert username] identified by '[insert password]';
>grant all cacti.* to [username]@localhost identified by '[password]';
>flush privileges;
>exit

Now edit the php.config inside the folder, change the username and password of the database with the one you just registered. Then we create an user with this folder as the home and no login.

useradd [username] -d /var/www/[cacti path] -s /bin/false

Now write this command :

chown -R [username] /var/www/[cacti path]

Finally, add a cron job for every users.

crontab -e

Write this on the bottom line :

*/5 * * * * php /var/www/[cacti path]/poller.php > /dev/null 2>&1

And lastly, open your browser, and go to localhost/cacti. Congrats! If nothing goes wrong, it will show up an install page. Just follow it and then cacti has been installed in your computer!


Easy right? Now have fun monitoring your network, memory usage, temperatures, or anything! 


Oh and about that thought, you guys are lewd. 






reference : wiki-chan, various tutorial on the net (I do insert one or two of my own way, which one? Figure it ;) )





Wednesday, 11 June 2014

FIRST POST!!!

So, this morning a lil' bird told me, "go to blogger.com, make a blog about random things and weird fetishes and weird hobbies... tell the world what a freak you are... oh and maybe write about some useful stuff too...," and here I am, posting the very first post of this blog.

Also, coincidentally, that lil' bird is my assistant coordinator so yeah... And he told me to about a week ago or maybe longer than that...

Nevertheless, I shall do what I have to do, that is write a blog about gami- I mean tutorials and stuffs. And this very first post is reserved as  a warnings to people who were lurking and accidentally found this blog, seriously, you won't stumble upon this blog if you have life, you see the url I made? That's the point.

Now then, onto the first warning :
THIS BLOG IS ABOUT TUTORIALS OF SOME NETWORKING STUFFS!!!
Yes, there is some useful stuff or stuffs here, you just need to tread carefully between the garbage (read : random posts) so, have phun *smiley face*.
Most of the tutorial I write here will be about things I have done, so the tutorials WILL work... you just need to follow it thoroughly *smile cynically*.

Second warning :
THIS BLOG WILL BE FULL ON ENGLISH!!!!

I was going to put that meme image but it's too much of a hassle.. so just imagine you're seeing one right here *wink wink*

Yes, even though I'm Indonesian, I prefer to write on this blog full English. Why? One, it's much more straight forward and two, my blog my rules, suck it up! Oh and also I need to train my writing skills in English, I'm sucks at grammar but can speak fluently, so yeah, you probably get the gist of it. Oh also forgot, the internet is full of people from different country, and English is still the international language... right? What? They want to change it to mandarin? WO AI NI!!!!

Third warning and probably the final warning :
YOU WILL FIND LOTS OF POST ABOUT RANDOM STUFF AND GAMING!!!
Yes, yes, you will find that too... a lot. I'm a gamer and also like to watch movies, be it's cartoon, anime, live action, tv series, as long as I find it interesting, I'll keep doing/watching/playing it. So you'll most likely find more posts about them than tutorial *laugh*. But I'll try to balance it out and make sure it's well archived so you can easily find the tutorials among other posts.... HA!

Oh yeah, since this is a blog, you'll also find post of me ranting about life, whining like a little bitch I am about things, some disturbing pictures, a short story, a long story, some kinda novel chapters (NO COPYING), and other degenerate stuffs... oh and probably my travelling story and things like that.

Okay, those three warnings should sufficient for ya all. Oh if you're wondering who's this weird dude who made this useless blog? Well then kids, let me introduce myself... what? Not interested? Meh, gonna do it anyway though, deal with it!

They call me dickhead (read : Diaz), I studied at Telkom University in Bandung, West Java, Indonesia. Ever heard of it? No? How about Bali? Did that rustled your jimmies? Yes? Excellent!

I studied Telecommunication Engineering and specializing in networking, especially core network (look it up folks!). I still have to learn a lot so pardon me if I mostly post about things that has no connection what so ever with networking, that means I'm gathering info, studying and trying things about networking! Kidding! I probably procrastinate while playing games *laugh*, but seriously, I do study and tries stuffs about networking, so calm your titties. Oh yeah, I also joined in a lab. called Switching Technique Laboratory, where we learn and teach people about switching and networking stuffs!

Previously my position is practicum coordinator, my job is preparing the lab for practicum, where we teach Telkom University student - though only the Telecommunication Engineering division - about switching, well mostly servers like asterisk and the other VoIP servers. But, since I'm a low-life scum and degenerate, I got demoted and transferred as a member of the Operation and Maintenance division. What's my job now? Well friend, can you read? You can? Good!

Well, ever since then, I learned my lesson and aim to become the most hardcore degenerate scum and pervert! Wish me luck guys!

Kidding, kidding, so I guess you understand the main purpose of this blog yes? What? No no, not misleading people, to write guides you won't easily find in the net! That is the main purpose of this blog. So I hope you enjoy your stay here, and come here often! Each time some of you read a post in my blog, I feel happy! You want to make me happy don't you? What? You don't? O-okay... just... enjoy your stay here....