Thursday, May 05, 2016

#LOAD BALANCE
#RB750G
/ip address
add address=202.146.225.1/25 interface=ether1
add address=192.168.1.103/24 interface=ether2

/ip route
add gateway=192.168.1.128

/ip firewall nat
add action=masquerade chain=srcnat


#RB450G
/ip address
add address=202.146.225.43/25 interface=ether1-gateway
add address=202.146.225.26/25 interface=ether2-gateway
add address=192.168.4.1/24 interface=ether4
add address=192.168.5.1/24 interface=ether5

/ip route
add gateway=202.146.225.1
add gateway=202.146.225.1%ether1-gateway routing-mark=route43
add gateway=202.146.225.1%ether2-gateway routing-mark=route26

/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1-gateway
add action=masquerade chain=srcnat out-interface=ether2-gateway
add action=dstnat chain=dstnat to-address=192.168.4.2 to-ports=80 protocol=tcp dst-address=202.146.225.43 dst-port=80
add action=dstnat chain=dstnat to-address=192.168.4.2 to-ports=22 protocol=tcp dst-address=202.146.225.43 dst-port=22
add action=dstnat chain=dstnat to-address=192.168.4.2 to-ports=25 protocol=tcp dst-address=202.146.225.43 dst-port=25
add action=dstnat chain=dstnat to-address=192.168.4.2 to-ports=110 protocol=tcp dst-address=202.146.225.43 dst-port=110
add action=dstnat chain=dstnat to-address=192.168.4.2 to-ports=143 protocol=tcp dst-address=202.146.225.43 dst-port=143
add action=dstnat chain=dstnat to-address=192.168.5.2 to-ports=80 protocol=tcp dst-address=202.146.225.26 dst-port=80
add action=dstnat chain=dstnat to-address=192.168.5.2 to-ports=22 protocol=tcp dst-address=202.146.225.26 dst-port=22

/ip firewall mangle
add action=mark-routing chain=prerouting src-address=192.168.4.0/24 dst-address=!192.168.5.0/24 new-routing-mark=route43
add action=mark-routing chain=prerouting src-address=192.168.5.0/24 dst-address=!192.168.4.0/24 new-routing-mark=route26


#Hasil Akhir:
#Gateway 202.146.225.43 langsung memberi internet 192.168.4.2 , dan redirect ke tujuan port 80,22,25,110,143
#Gateway 202.146.225.26 langsung memberi internet 192.168.5.2 , dan redirect ke tujuan port 80,22
#Bisa langsung SSH dari 192.168.4.2 ke 192.168.5.2 dan sebaliknya

Tuesday, May 31, 2011

Mesin SMS Gateway Kannel di Ubuntu 10.04LTS

Bahan:

*Hardware:
--Komputer set atau Laptop
--modem GSM, digunakan Wacom (SMS gateway tidak dapat digunakan sebagai modem internet sekaligus; handphone bisa digunakan, tapi kemampuannya lebih jelek dibandingkan dengan modem)

*Software:
--Ubuntu 10.04LTS
--Apache2 HTTP server
--Lynx (text based browser) atau Firefox
--Minicom komunikator serial (seperti Hyperterminal)
--Kannel gateway WAP dan SMS

Cara:
-Syarat: Komputer set telah di instal Ubuntu 10.04LTS dan berfungsi secara baik
-Pasang modem, isi SIM card, nyalakan modem
-install Apache2, Lynx, Firefox, Kannel, Minicom
sudo apt-get install apache2,lynx,kannel,minicom

*Nyalakan SMS Box
sudo nano /etc/kannel
-pastikan tidak ada tanda pagar:
START_WAPBOX=1
START_SMSBOX=1

*Tambahkan user kannel ke group dialout
sudo nano /etc/group
-cari baris dialout dan tambahkan ',kannel':
dialout:x:20:user,kannel

*Konfigurasi Kannel
sudo nano /etc/kannel/kannel.conf
-contoh kannel.conf yang digunakan :

#
# Sample configuration file for Kannel bearerbox on Debian.
# See the documentation for explanations of fields.
#

# HTTP administration is disabled by default. Make sure you set the
# password if you enable it.

group = core
admin-port = 13000
admin-password = xxxx
#admin-deny-ip = "*.*.*.*"
#admin-allow-ip = ""
wapbox-port = 13002
wdp-interface-name = "*"
log-file = "/var/log/kannel/bearerbox.log"
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
smsbox-port = 13003

group = wapbox
bearerbox-host = localhost
log-file = "/var/log/kannel/wapbox.log"

####### SMS box setup
group = smsbox
bearerbox-host = localhost
log-file = "/var/log/kannel/smsbox.log"

####### SMSC / GSM modem setup, using modem defined below
group = smsc
smsc = at
modemtype = wavecom
device = /dev/ttyS0

####### wavecom modem definition
group = modems
id = wavecom
name = "Wavecom"
detect-string = "Wavecom"
init-string = "AT+CNMI=1,2,0,1,0"
speed = 115200

####### SMS services definition, what to do when an SMS is recieved
group = sms-service
keyword = smsemail
get-url = "http://localhost/SMSServlet/SMSServlet?sender=%p&message=%a"
max-messages = 1

group = sms-service
keyword = default
text = default reply
max-messages = 0

# SEND-SMS USERS
group = sendsms-user
username = xxxx
password = xxxx
user-allow-ip = "127.0.0.1 ; (IP komputerSMS gateway)"

# SMSBOX SETUP
group = smsbox
bearerbox-host = 127.0.0.1
#bearerbox-port = 13003
sendsms-port = 13013
sendsms-chars = "0123456789 +-"
global-sender = "sender"
log-level = 0
log-file = "/var/log/kannel/smsbox.log"
access-log = "/var/log/kannel/access.log"
mo-recode = true

*Jalankan Kannel
sudo /etc/init.d/kannel restart

*Periksa apakah Kannel bekerja
sudo tail -f /var/log/kannel/bearerbox.log
- harus OK dan ada kalimat AT SMSC successfully opened

*Tes layanan SMS, menerima SMS
sudo tail -f /var/log/kannel/smsbox.log
-kirim SMS ke no SIM card modem
-lihat terminal (seperti pd gambar)

*Tes layanan SMS, mengirim SMS
lynx http://localhost:13013/cgi-bin/sendsms?username=xxxx&password=xxxx&to=(nomor telepon)&text=dikirim+menggunakan+kannel
*atau ketik di url Firefox alamat url diatas
*bila muncul kalimat:
0:Available to delivery
*dan SMS diterima di nomer telepon, berarti berhasil

sekian cara membuat mesin SMS gateway di Ubuntu dengan menggunakan Kannel
berikutnya bisa dengan kreatif membuat antar muka grafis untuk mesin ini
untuk lebih lanjut silahkan baca sumber :
http://www.kannel.org
http://www.dijexi.com/tag/setup-sms-gateway-kannel-ubuntu

Labels:

Monday, September 27, 2004

Laws of Game Programming

by Ian Parberry

  1. Real game programmers aren't afraid of mathematics.
  2. Real game programmers never use bubblesort.
  3. Real games are coded in C++ with low-level routines coded in assembly language.
  4. Real games have real music written by musicians, and real art drawn by artists.
  5. Never optimize a piece of code before its time.
  6. Profile before you optimize.
  7. If it looks right on the screen, then it is right.
  8. If it moves, blit it. If it doesn't move, skip it.
  9. Never be afraid to throw code out.
  10. Don't go home each day until your game (in whatever state it is in) compiles and runs without crashing.
  11. Make a game that even a fool can win, and only a fool will want to play it.
  12. Fools have money too.
  13. At best, graphics libraries can only please some of the people some of the time.
  14. Use programmer's art until your game is playable.
  15. Artificial Intelligence isn't.
  16. No matter what you do, your game will appear on the pirate bulletin boards.

Wednesday, August 25, 2004

Pengamat Musik: Indie Label Menguntungkan


Reporter: Ana Shofiana S detikcom - Jakarta
Selama ini indie label terkesan kalah pamor dibandingngkan major label. Padahal, banyak band yang masuk indie label sukses di pasar musik Indonesia. Siapa yang tidak kenal grup Slank atau Didi Kempot? Dua nama ini tak lepas dari yang namanya indie label.

Sudah menelurkan 12 album, mulai album ketujuh Slank menjadi indie label. Mereka memproduksi sendiri kaset mereka di bawah naungan Pulau Biru Production. Sementara Campur Sari Didi Kempot didemami berbagai kalangan. Siapa yang tak kenal lagu Cicak Rowo?

“Didi Kempot dalam setahun bisa menghasilkan 3 album secara bersamaan. Konsep Cicak Rowo jika mendapatkan platinum mungkin sudah 5 platinum. Belum bajakannya,” tutur Bens Leo saat rapat kerja PAPPRI di Hotel Nikko Int’l, Jl. MH Thamrin, Jakarta Pusat, Selasa (24/8/2004).

Yang lebih mengagumkan adalah Slank. Grup yang dikomandoi Kaka dan Bimbim ini berhasil menciptakan komunitas Slank yang disebut Slankers. Mereka lah pembeli potensial album Slank yang laris di atas 300 ribu kopi setiap merilis album.

Bagi pelaku bisnis Indie label, Lilo (mantan Kla Project), bisnis ini cukup menguntungkan. Lilo yang memproduksi sendiri album “XOTX” mengaku bisa mendapatkan “cash and Carry”.

“Saya beralih ke indie label antara lain karena kekecewaan saya pada yang terdahulu. Dan yang menguntungkan dari indie label adalah cash and carry,” tutur musisi berkacamata minus tersebut.

Terlepas dari menguntungkan atau tidak, yang pasti indie label memiliki kelebihan, kemerdekaan dalam berkreasi. “Indie label adalah spirit independen. Itu yang menyebabkan band indie banyak ditolak major label,” ungkap Bens Leo.

"Band indie bisa meniru Slank sebagai band yang berhasil membentuk massa yang setia di berbagai kota. Dan jumlahnya tidak bisa dibilang sedikit," tambah pengamat musik itu.
(ana)

Sunday, August 08, 2004

Linggo


Script pada director dinamakan Lingo. Berikut ini lingo yang umum digunakan dalam pemrograman dan dibagi berdasarkan katagori.
ON STARTMOVIE
Set the exitLock to TRUE : Untuk me-nonaktifkan tombol ESC. Biasanya kalau movie sedang aktif dan kita menekan tombol ESC, maka movie akan keluar dan kembali ke Windows desktop.
the moviePath : menunjukkan path folder dimana movie sekarang berada
the movieName : menunjukkan nama movie direktor sekarang
AVI & QUICKTIME
QuickTimeVersion() : Mengecek versi quicktime yang ada di komputer.
member (whichcastmember).duration : Mengetahui durasi video.
sprite(whichSprite).movierate : set 1 = play ; -1 = reverse ; 0 = stop
sprite(whichSprite).movieTime : Mengetahui waktu dari video yang sedang berjalan.
FRAME
Label("zoom") - mengembalikan nilai frame berdasar label "zoom", kalau tidak ada akan berisi 0
the frame - mengembalikan nilai frame aktif.
the framelabel - mengetahui label frame aktif. Bila tidak ada akan berisi 0
ARRAY/LIST
Menciptakan Array 2 Dimensi : arM = [ [1,3] , [2,4] ]
Menampilkan isi array 2 dimensi : arM[2][2] ( hasilnya : 2 )
count : menghitung jumlah isi array
list.sort : mengurutkan isi array
linearList.add( value ) : menambah isi array
list.deleteAt( number ) : menghapus isi array
setAt list, orderNumber, value : replace value di list yang disebutkan oleh orderNumber
getAt( list, position ) : mengambil nilai array pada posisi yg ditentukan
STRING
Dari string "Macromedia" akan diambil char 6 s/d char 10 :chars("Macromedia", 6, 10) -- "media"
Panjang string : length ("Macromedia") -- 10 ; member("File Name").text.length
Menemukan karakter pertama string1 dari string2 : offset("media","Macromedia") -- 6 ; offset("Micro","Macromedia") -- 0
Membandingkan 2 string dan menentukan apakah string1 berisi string2 : "0123456789" contains "a" -- false
Menyisipkan Karakter dalam Text :c = "test"put " coba " after char 1 of c put c -- "t coba est"
SPRITE
the currentSpriteNum : menampilakan nomor sprite yang sedang aktif
sprite( the currentSpriteNum ).member : menampilkan cast member sprite dan cast. Bisa berupa member(A,B), member("MELODY") atau 132.
sprite( the currentSpriteNum ).memberNum : menampilkan nomor cast member dari sprite aktif
CAST MEMBER
member(whichCastMember).name : menampilkan nama dari cast member. WhichCastMember bisa berupa nama atau nomor dari cast member.
INTERNET
put (the environment).internetConnected : apakah user terkoneksi ke internet atau tidak ( return : #online ; #offline ; #unknown )
FIELD & INTERACTIVITY
member(whichCastMember).text : isi text pada field
member(whichCastMember).lineCount : jumlah baris yang ada pada field
the mouseLine : nomor baris keberapa mouse berada dalam field
member( the mouseMember ).line[ the mouseLine ] : menampilkan teks pada field sewaktu di mana mouse berada
member( whichCastMember ).line[ nLine ].hilite() : menghilite baris
member( whichCastMember ).scrollTop = 0 : jarak dalam pixel antara atas field cast member sampai atas field yang terlihat di scrolling box. Nilai 0 akan membawa baris pertama field menjadi paling atas di scrolling box.
RETURN : Konstanta yang mewakili carriage return
OTHERS
Launching an external application : open the pathname & "notepad.exe" ; open the pathname & "notes.txt" with the pathname & "notepad.exe"