Facebook Developers Network

Join MamakSpot Fb Developer Network


New Project unleashed !!!
Build You Own SMS System at home
http://cakesms.blogspot.com

Introduction to MamakSpot



Watch the demo video here

What is MamakSpot ?
A wifi controller. You can control your wifi users using a web based management system.

Features ? You can control the users by
1.by maximum usage hours
2.by expire date
3.by upload/download speed in kbps

How many versions of MamakSpot ?
1. MamakSpot Prepaid Edition
2. MamakSpot Manage Edition

MamakSpot Prepaid Edition ?
MamakSpot prepaid is targeted to people who wants to run prepaid business using Wifi. Admin can create X numbers of prepaid and registered or public users can buy the prepaid for their internet usage.

Mamakspot Manage Edition ?
This is fork from version 1 of MamakSpot. User must be registered first. Admin the, can select which user have the rights to surf the net. Admin simply enable particular user with some credentials like
1. upload/bandwith speed
2. Expiry date
Admin can check every connected user internet history like :
1. When he/she online
2. Number of hours online by day,month,year
3. Total bandwidth downloaded/uploaded
4. Sites visited
Who are the developer for MamakSpot ?
Currently, I'm the only one doing the RnD. From understanding how Radius server works to Web Management Interface. I can be contacted at 014.6412.911 ( Malaysia ) or by email at azril.nazli@gmail.com


Mamakspot V1 is free ( http://code.google.com/p/mamakspot/ )

Monday, April 14, 2008

Tutorial 1 : Install & Configure Network Linux Centos


Kena pastikan anda mempunyai hardware berikut

1. Intel Pentium PC
2. Minima 128MB RAM
3. 2 Network Card
4. 4 keping CD kosong
5. Laptop Windows XP dengan burn cd capability
6. 2 CAT5e Straight cable ( network card )
7. Linksys WRT54GL AP

Download Linux Centos 4.6 ISO
URL : http://mirror.nsc.liu.se/CentOS/4.6/isos/i386/
Download 4 iso di atas dan burn ke dalam 4 keping CD
Saya gunakan ISO Recorder : http://isorecorder.alexfeinman.com/isorecorder.htm

Pengetahuan menggunakan Linux amat penting untuk menggunakan MamakSpot, jadi saya assume anda mempunyai pengalaman lampau install dan gunakan linux. Jika anda tidak mempunyai asas dalam Linux, sila rujuk How To dan tutorial dari Google.


Install Linux Centos dengan setting berikut
- no firewall
- server mode ( minimal configuration)
- gcc,make ,compiler kena ada

Saya assume anda berjaya install Centos 4.6 Final edition, dan di bawah adalah setting-setting yang saya guna.

Lepas install, matikan firewall, laksanakan command berikut

/sbin/service iptables stop


Matikan SELINUX, baca tutorial di http://www.revsys.com/writings/quicktips/turn-off-selinux.html


Setting untuk model Streamyx
IP-address : 192.168.1.1
Subnet : 255.255.255.0
DNS : 202.188.1.5
DNS 2 : 202.188.0.133
Mode : auto dial,auto auth
Maksudnya, kita akan set username dan password terus dalam Modem Streamyx, jadi user yang point ke gateway 192.168.1.1 akan terus dapat sambungan ke internet

Setting untuk network card 1
Nama : ETH0
IP-Address : 192.168.1.2
Subnet Mask : 255.255.255.0
Gateway Address : 192.168.1.1
Cable : Sambung terus ke ethernet port Router Modem Streamyx
# edit file : vi /etc/sysconfig/network-scripts/ifcfg-eth0
# Setting untuk network card 1
DEVICE=eth0
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=192.168.1.2
GATEWAY=192.168.1.1
TYPE=Ethernet
Ok, kita telah edit configuration untuk Network Card 1. Mari kita suba sambungan ke internet. Laksanakan command berikut :


/sbin/service network restart

Kemudian kita akan cuba sambungan ke internet dengan ping ke google.com

ping google.com

Sepatutnya anda akan dapat result seperti berikut :

[root@localhost html]# ping google.com
PING google.com (64.233.167.99) 56(84) bytes of data.
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=1 ttl=238 time=322 ms
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=2 ttl=238 time=275 ms
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=3 ttl=238 time=273 ms
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=4 ttl=238 time=278 ms
64 bytes from py-in-f99.google.com (64.233.167.99): icmp_seq=5 ttl=238 time=273 ms

--- google.com ping statistics ---
6 packets transmitted, 5 received, 16% packet loss, time 4997ms
rtt min/avg/max/mdev = 273.613/284.723/322.454/18.936 ms
[root@localhost html]#

Jika anda berjaya hingga ke tahap ini, anda berjaya connect Linux Box anda ke internet menggunakan laluan ETH0. Seterusnya kita akan setup Network Card 2 dengan menggunakan setting berikut:

Setting untuk network card 2
Nama : ETH1
IP-Address : 10.0.0.1
Subnet Mask : 255.255.255.0
Gateway Address : 192.168.1.2
Cable : Sambung terus ke ethernet port Linksys WRt54 GL
# edit file : vi /etc/sysconfig/network-scripts/ifcfg-eth1
# Setting untuk network card 2
DEVICE=eth1
BOOTPROTO=static
BROADCAST=10.0.0.255
HWADDR=00:0C:76:6B:0B:E0
IPADDR=10.0.0.1
NETMASK=255.255.255.0
NETWORK=10.0.0.0
ONBOOT=yes
TYPE=Ethernet


Restart semula service network menggunakan command /sbin/service dan kemudian laksanakan command berikut

/sbin/ifconfig -a

Command di atas berfungsi untuk melihat network card yang telah diconfigure dalam sistem. Sepatutnya anda akan melihat data mengenai ETH0 dan dan ETH1.

-bash-3.00$ /sbin/ifconfig -a
eth0 Link encap:Ethernet HWaddr xxxxxxxxxxxx
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::206:5bff:feed:62c6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:401058151 errors:0 dropped:0 overruns:0 frame:0
TX packets:497301783 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:2828013415 (2.6 GiB) TX bytes:2305496074 (2.1 GiB)
Base address:0xcce0 Memory:feb60000-feb80000

eth1 Link encap:Ethernet HWaddr xxxxxxxxxxxx
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::206:5bff:feed:62c6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:401058151 errors:0 dropped:0 overruns:0 frame:0
TX packets:497301783 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:2828013415 (2.6 GiB) TX bytes:2305496074 (2.1 GiB)
Base address:0xcce0 Memory:feb60000-feb80000


* peringatan, data di atas cuma contoh sahaja, dan bukan gambaran yang anda lihat di konsol Linux anda *

Seterusnya, sambung cable CAT 5 ( straight cable ), dari ETh1 ke ethernet port ( bukan WAN port ) AP Linksys WRT 54GL. Kemudian, sambung pula Laptop anda CAT5 cable ke ethernet port no 2 di LinksysAP yang sama.

Configure Laptop anda menggunakan setting berikut:

Setting untuk Laptop
IP-Address : 10.0.0.2
Subnet-mask : 255.255.255.0
GatewayAddress: 10.0.0.1 ( poin ke ETH1 ip address )
DNS: 202.188.1.5

Kemudian, ping ke IP 10.0.0.1

Pastikan anda dapat ping reply dari 10.0.0.1, dan kemudian baru teruskan ke bab seterusnya.

Jika anda berjaya dapat ping reply, itu sudah mencukupi untuk ke tahap ini. Sepatutnya anda tidak boleh surf ke internet . Ini disebabkan Linux anda masih belum diconfigure untuk menjadi router.

bab seterusnya kita akan configure Linux anda sebagai router menggunakan IPTABLES.

Jika ada masalah mengenai tutorial di atas, hubungi saya di 014 6412911 ( Azril Nazli )

10 comments:

  1. GUna ubuntu leh tak bro??

    ReplyDelete
  2. Ubuntu debian based, saya tak biasa guna Debian..cuma geng Redhat aja ( EL5,Redhat9,Centos etc )

    ReplyDelete
  3. bro...
    baru nak guna centOs nih..
    kat mane kita nak create/tulis coding2 tuh lepas install centOs?

    ReplyDelete
  4. Aku install Linux kat 1 PC, command aku remote guna laptop Sony. SSH masuk guna putty. Google Putty. Atau taip aja kat console linux, shell prompt

    ReplyDelete
  5. owh..
    bla da remote kan..tulis jela ek kat screen tu?

    p/s: sori bro..sy tk tau sgt..baru stat blajar

    ReplyDelete
  6. bro, tutorial nih untuk orang yg dah biasa Linux. Kalau newbie, ko sure lagi pening kepala.

    Try belajar install Linux Redhat/Centos/Slackware dulu....dan cuba main-main dengan VI text editor. Then belajar control Linux bos guna SSH.

    Step paling pertama, cuba jadikan Linux tuh sebagai router. Time 1999 dulu, kerja part time aku setup Linux box jadi router kat cybercafe satu Johor. Practice makes perfect.

    ReplyDelete
  7. ok..bro..
    thanks..
    kalo linux pfsense tu aku tau la..

    ReplyDelete
  8. pfsense tu rasanye bkan based on linux tapi based on *BSD

    ReplyDelete
  9. Bro...nak save file network yg kita ubah tu ape command die..
    det dhcp leh..aku try carik2 kat google..poning..

    ReplyDelete
  10. Apa setting untuk access point???

    ReplyDelete