Hallo Anantha

Entries categorized as 'Oprekan'

Jenuh, Tapi harus sabar dan telaten

April 19, 2008 · 8 Comments

Semalam bersama Hendra, saya mengalami kejenuhan. Kami mencoba software simulasi dengan penambahan modul baru IPv6SuiteWithINET pada Omnet++. Kami iseng - iseng mencoba menambahkan modul tersebut. Tapi sayangnya eror terus saat di compile. Berikut pesan erornya.

Berbagai cara pun dipakai untuk mengakali modul tersebut. Mulai dari install ulang berkali - kali, sampai mengkanibal source - source yang ditambahkan. Sampai - sampai akhirnya saya jenuh. Dan mulai melakukan ritual - ritual ngenet ngenet ga jelas :D . Tetapi teman saya yang satu ini malah berkata, “Nginstall ki memang kudu sabar mbek telaten “. Wah jadi kagum juga saya. Padahal saya dah ngenet ngenet ga jelas, download - download lagu :D . Sampai pada akhirnya hal tersebut belum terpecahkan juga. Jelas saja, lha developernya saja menuliskan begini “ IPv6SuiteWithINET is not used any more and I would not suggest anybody to start doing serious work with it. It is better to add the required functionality to INETFramework. ” pada homepage Omnet++.  Tapi kami tetep nekat aja. Tapi inti dari tulisan ini, melakukan segala sesuatu yang susah harus tetap sabar dan tekun ( dalam bahasa Indonesia kali ini :D ).

Bagi yang tau solusi permasalahan kami tentang IPv6SuiteWithINET pada Omnet++ bisa tolong disharing. Kami sangat membutuhkannya. :D Terima Kasih

Categories: Crita Singkat · INFO UMUM · Oprekan

openvpn gui manager

April 2, 2008 · 4 Comments

OpenVPN User Manager 1.1

Basically, most of this post is taken from http://www.mertech.com.au/mertech-products-openvpnusermanager.aspx. OpenVPN user manager is a tool to manage the openvpn server. this tool is designed to make viewing and managing your OpenVPN server painless. This is features of OpenVPN User Manager 1.1 :
1. General information about users
2. Instant search of users, servers, logs and time blocks
3. Tracking of users, collects connection/disconnection times and bytes sent/received.
4. Ability to ‘Kill’ users from the application
5. Custom log file creator (you can make your own templates for data logs)
6. OpenVPN User Manager can now use the Management console to receive all information
7. [Removed] Full ASP.NET 2.0 web server built in with web access to server information (removed in version 1.0 due to rewrite)
8. Pie Chart of user’s upload and download.
9. Ability to switch between a Management connection or a status file to update users

How to setup :

Set the management option in your openVPN configuration file

add this line on your configuration file :

management 192.168.0.1 7505 pass.txt

Then click start your openvpn user manager 1.1. Click manage server and add server. After that fill IP address, port and password. The password is the first line on pass.txt. Finally you can monitor your openvpn server.

This is sreenshots openvpn user manager that i used.

openvpn guitabel openvpnmngr

Categories: Oprekan

Install OpenVPN on FreeBSD

December 15, 2007 · No Comments

OpenVPN is a SSL VPN. As we know, VPN is a technique to connect two site likes leased line. It’s liked a kind of tunneling principle. This time, i would like to share my experience installing OpenVPN on FreeBSD. Thank you to Mas Rendo, Mas Adhy, Mas Artiko and other person that support me. This installation using key for a user whose want to connect using OpenVPN.

1. We install the OpenVPN software from ports

cd /usr/ports/security/openvpn
make install clean

2. We copy example configurations folder

cp /usr/local/share/doc/openvpn/ /usr/local/etc/openvpn/

cd /usr/local/etc/openvpn cp -R sample-config-files config-files/

3. Edit main configuration of OpenVPN ( server.conf )

cd config-files

vi server.conf

This is my server.conf

port 443
# TCP or UDP server?
proto tcp
dev tun
ca /usr/local/etc/openvpn/easy-rsa/keys/ca.crt
cert /usr/local/etc/openvpn/easy-rsa/keys/server.crt
key /usr/local/etc/openvpn/easy-rsa/keys/server.key # This file should be kept secret
dh /usr/local/etc/openvpn/easy-rsa/keys/dh1024.pem
server xxx.xxx.xxx.xxx 255.255.255.224 ( your server ip address )
ifconfig-pool-persist /var/log/ipp.txt
push “route remote_host 255.255.255.255 net_gateway”
push “route xxx.xxx.xxx.xxx 255.255.255.192″
keepalive 10 120
comp-lzo
persist-key
persist-tun
status /var/log/openvpn-status.log
log-append /var/log/openvpn.log
verb 3

4. create server and client key

cd /usr/local/etc/openvpn/easy-rsa
vi vars ( change export with setenv )
./vars
./clean-all
./build-ca
./build-key-server server (can change with another name)
./build-key-pass myname — key for us ( common name myname )
./build-dh

5. We have to run forwarding function on our server

sysctl net.inet.forwarding=1

6. Then run openvpn

openvpn /usr/local/etc/config-files/server.conf &

And then we put ca.crt, myname.crt and myname.key on client site to connect through openvpn.

Thank You

Categories: Oprekan

NAT on FreeBSD using PF

September 16, 2007 · 2 Comments

Network Address Translation (NAT, also known as Network Masquerading, Native Address Translation or IP Masquerading) involves re-writing the source and/or destination addresses of IP packets as they pass through a router or firewall. Most systems using NAT do so in order to enable multiple hosts on a private network to access the Internet using a single public IP address (see gateway). Many network administrators find NAT a convenient technique and use it widely. Nonetheless, NAT can introduce complications in communication between hosts and may have a performance impact.
As FreeBSD mania, i would like to share my experience build up a NAT gateway.
this is the topology.

denah

I would like to use NAT in this case. The gateway has two NIC, one for the upstream and one for the downstream. I use realtek interface card to be the upstream interface. I give it IP address 202.14.xxx.xxx. And the other interface i give IP address 192.168.1.1.
Then I use packet filter ( PF ) to run NAT function.
This is the configuration to load pf in booting system

edit your /etc/rc.conf
pf_enable=”YES”
pf_rules=”/etc/pf.conf”
pflog_enable=”YES”
pflog_logfile=”/var/log/pflog”
gateway_enable=”YES”

then edit the /etc/pf.conf
nat on rl0 from 192.168.1.0/24 to any -> (rl0)

after that, try the PC client the allocation IP address.
And, Its done.

-nanta-

Categories: Oprekan

Join 3 Tables On MySQL

August 31, 2007 · No Comments

I got some tasks from my lecture to deploy user complaint form.

I don’t know how to deploy…just try and try. And finally i know how to start. I use PHP and MySQL to deploy it. Generally, I make the form with PHP and html source code. I use 3 tables on MySQL to get Data that i want to show at form. I confuse how to join 3 tables.With help from my friend and GrandPa google, finally I know it. This the topology of that’s 3 tables:

1st table:

+———+————–
| Field | Type
+———+————–
| id | int(10)
| tanggal | varchar(30)
| nama | varchar(100)
| alamat | varchar(200)
| kota | varchar(25)
| email | varchar(150)
| idcom | int(10)
| idwil | int(10)
+———+————–

2nd table:

+——–+————–+
| Field | Type |
+——–+————–+
| idcom | int(10) |
| descom | varchar(100) |
+——–+————–+

3 rd table:

+——–+————–+
| Field | Type |
+——–+————–+
| idwil | int(10) |
| deswil | varchar(100) |
+——–+————–+

from 1 st table , i want to get 2 field idwil and idcom. this two field the same as 2nd table and 3rd table. I want to get deswil from 3rd table and descom from 2nd table. This is the syntax to join both 3 tables:

SELECT tanggal, nama, alamat, email, descom,deswil FROM tugas LEFT JOIN komplain ON tugas.idcom = komplain.idcom LEFT JOIN wilayah ON tugas.idwil = wilayah.idwil ORDER BY id

these will show 3 data from both 3 tables.

Maybe these info help you that have a problem like me..

thank you

-nanta-

Categories: Oprekan

Rsync : backup your data

August 18, 2007 · No Comments

rsync use for synchronizing file trees. like in the man pages, rsync can be used :

  1. for copying local files. This is invoked when neither source nor destination path contains a : separator
  2. for copying from the local machine to a remote machine using a remote shell program as the transport (such as rsh or ssh). This is invoked when the destination path contains a single : separator.
  3. for copying from a remote machine to the local machine using a remote shell program. This is invoked when the source contains a : separator.
  4. for copying from a remote rsync server to the local machine. This is invoked when the source path contains a :: separator or a rsync:// URL.
  5. for copying from the local machine to a remote rsync server. This is invoked when the destination path contains a :: separator.
  6. for listing files on a remote machine. This is done the same way as rsync transfers except that you leave off the local destination.

By now, i want to back up my data to another server.

so i use it. first, i install rsync

cd /usr/ports/net/rsync

make install clean

edit /usr/local/etc/rsyncd.conf

uid             = userid
gid             = groupid

use chroot      = no

max connections = 4

syslog facility = local5

pid file        = /var/run/rsyncd.pid
[www]        path    = /usr/local/www/

comment = all of the websites

then edit permission rsyncd.conf to 640

after that start the daemon

rsyncd --daemon

that’s all for the server.

in the client install the rsync, but don’t start the daemon.

after that get the module www that refer to /usr/local/www of first server. the example command shell:

rsync -avz --delete xxx.xxx.xxx.xxx::www /backup/data1

that’s mean, i get data /usr/local/www from first server and transfer they to /backup/data1 to second server and delete files or folders that didn’t match again if we do the same command.

we use rsync to get the update data regularly. then we put the script into the /etc/crontab. for example :

7 * * * * root /root/script/rsync.sh 2>&1 | mail -s "rsync script" root

where the rsync.sh was :

#!/bin/sh
/usr/local/bin/rsync -avz –delete xxx.xxx.xxx.xxx::www /backup/data1

-nanta-

Categories: Oprekan

Join 3 Tables On MySQL

August 17, 2007 · No Comments

I got some tasks from my lecture to deploy user complaint form.

I don’t know how to deploy…just try and try. And finally i know how to start. I use PHP and MySQL to deploy it. Generally, I make the form with PHP and html source code. I use 3 tables on MySQL to get Data that i want to show at form. I confuse how to join 3 tables.With help from my friend and GrandPa google, finally I know it. This the topology of that’s 3 tables:

1st table:

+———+————–
| Field | Type
+———+————–
| id | int(10)
| tanggal | varchar(30)
| nama | varchar(100)
| alamat | varchar(200)
| kota | varchar(25)
| email | varchar(150)
| idcom | int(10)
| idwil | int(10)
+———+————–

2nd table:

+——–+————–+
| Field | Type |
+——–+————–+
| idcom | int(10) |
| descom | varchar(100) |
+——–+————–+

3 rd table:

+——–+————–+
| Field | Type |
+——–+————–+
| idwil | int(10) |
| deswil | varchar(100) |
+——–+————–+

from 1 st table , i want to get 2 field idwil and idcom. this two field the same as 2nd table and 3rd table. I want to get deswil from 3rd table and descom from 2nd table. This is the syntax to join both 3 tables:

SELECT tanggal, nama, alamat, email, descom,deswil FROM tugas LEFT JOIN komplain ON tugas.idcom = komplain.idcom LEFT JOIN wilayah ON tugas.idwil = wilayah.idwil ORDER BY id

these will show 3 data from both 3 tables.

Maybe these info help you that have a problem like me..

thank you

-nanta-

Categories: Oprekan

Repair MySQL

August 17, 2007 · No Comments

As USDI network administrator, I have a task to maintenance server. Last day i wanted to change the services become more secure. I did it by editing the web services. I upgraded the phpmyadmin into phpMyAdmin 2.11.0-rc1 version. I also changed the apache configuration to give htpasswd to phpmyadmin directory. But I did some fails. I changed mysql-client to version 4 from the ports ( FreeBSD ).

All my last databases didn’t work. The error comment were "cannot load MySQL extension". I was very confuse. then I uninstalled mysql-client version 4. But it still didn’t work. I got a lot problem now that i though at that moment.

Then i got a solution. I check and repair the databases. I write mysqlcheck -A --auto-repair -u username -p on shell. Finally it successful. So i didn’t need to reinstall the mysql server.

-nanta-

Categories: Oprekan