Minggu, 12 September 2021

EasyHotspot OpenWrt Bagian 4 - Konfigurasi Coova-Chilli

 Lanjutan EasyHotspot OpenWrt Bagian 3 - Konfigurasi HostNames-Radius

Lakukan urutan langkahnya sebagai berikut :

1. Konfigurasi Coova-chilli

- Masuk ke folder /etc/chilli , melalui "WinScp"

- Edit bagian dibawah ini, di dalam file /etc/chilli/wwwsh , menggunakan "WinScp"

------------------------------------------------------------------------------------

haserl=/usr/bin/haserl

------------------------------------------------------------------------------------

lalu "save" dan tutup

- Edit bagian dibawah ini, di dalam file /etc/chilli/defaults , menggunakan "WinScp"

------------------------------------------------------------------------------------

HS_NASID=nas01

HS_RADIUS=www.awanggacomp.net

HS_RADIUS2=www.awanggacomp.net

#HS_RADIUS=70.70.70.1

#HS_RADIUS2=70.70.70.1

HS_UAMALLOW=www.coova.org

HS_RADSECRET=easyhotspot

HS_UAMSECRET=easyhotspot

------------------------------------------------------------------------------------

lalu "save" dan tutup

tekan tombol "Shift+F4" , masukkan "local.conf", kemudian "Enter"

masukkan baris berikut

-------------------------------------------------------------------------------------

# auto config

-------------------------------------------------------------------------------------

lalu "save" dan tutup

tekan tombol "Shift+F4" , masukkan "main.conf", kemudian "Enter"

masukkan baris berikut

-------------------------------------------------------------------------------------

# THIS FILE IS AUTOMATICALLY GENERATED

cmdsocket       /var/run/chilli.br-lan.sock

unixipc         chilli.br-lan.ipc

pidfile         /var/run/chilli.br-lan.pid

net        10.1.0.0/255.255.255.0

uamlisten    10.1.0.1

uamport         3990

dhcpif        br-lan

uamallowed    "www.coova.org,10.1.0.1,70.70.70.1,70.70.70.236,facebook.com"

macallowed "xx-xx-xx-xx-xx-xx" # < mac addres LAN yg terhubung dengan router

uamanydns

domain "lan"

dns1 "208.67.222.222"

dns2 "208.67.220.220"

uamhomepage http://10.1.0.1:3990/www/coova.html

wwwdir /etc/chilli/www

wwwbin /etc/chilli/wwwsh

uamuiport 4990

locationname "AwangaComp-Net"

radiuslocationname "AwanggaComp_Net"

radiuslocationid "isocc=,cc=,ac=,network=AwanggaComp_Net,"

-------------------------------------------------------------------------------------

lalu "save" dan tutup

tekan tombol "Shift+F4" , masukkan "hs.conf", kemudian "Enter"

masukkan baris berikut

-------------------------------------------------------------------------------------

radiusserver1    "www.awanggacomp.net"

radiusserver2    "www.awanggacomp.net"

radiussecret    "easyhotspot"

radiusauthport  1812

radiusacctport  1813

uamserver    "http://10.1.0.1:4990/www/login.chi"

radiusnasid    "nas01"

papalwaysok

uamaliasname "chilli"

adminupdatefile "/etc/chilli/local.conf"

uamsecret "easyhotspot"

-------------------------------------------------------------------------------------

lalu "save" dan tutup

- Masuk ke folder /etc/init.d , melalui "WinScp"

tekan tombol "Shift+F4" , masukkan "chilli", kemudian "Enter"

masukkan baris berikut

-------------------------------------------------------------------------------------

#!/bin/sh /etc/rc.common

# Copyright (C) 2006 OpenWrt.org

START=50

RUN_D=/var/run

PID_F=$RUN_D/chilli.pid

start() {

    include /lib/network

    scan_interfaces

    /sbin/insmod tun >/dev/null 2>&1

    [ -d $RUN_D ] || mkdir -p $RUN_D

    config_get ipaddr lan ipaddr

    /usr/sbin/chilli --dns1="$ipaddr"

}

stop() {

    echo stop

    killall chilli

    [ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1

}

-------------------------------------------------------------------------------------

lalu "save" dan tutup

- masuk "putty"

------------------------------------------------------------------------------------

root@OpenWrt:/srv/www/easyhotspot/install# chmod a+x /etc/init.d/chilli

root@OpenWrt:/srv/www/easyhotspot/install# /etc/init.d/chilli start

root@OpenWrt:/srv/www/easyhotspot/install# chilli -fd

------------------------------------------------------------------------------------

akhiri dengan menekan "Ctrl+C"

Pastikan hasilnya seperti dibawah ini, maka sudah OK. jika ada errot jangan ke langkah berikutnya.edit dulu bagian yang error

------------------------------------------------------------------------------------

net.c: 1308: 0 (Debug) wlan0  address family: 17 (AF_PACKET)

net.c: 1308: 0 (Debug) wlan0-1  address family: 17 (AF_PACKET)

net.c: 1308: 0 (Debug) br-lan  address family: 17 (AF_PACKET)

net.c: 1308: 0 (Debug) lo  address family: 2 (AF_INET)

net.c: 1308: 0 (Debug) br-lan  address family: 2 (AF_INET)

net.c: 1308: 0 (Debug) 3g-wan2  address family: 2 (AF_INET)

net.c: 1308: 0 (Debug) tun0  address family: 2 (AF_INET)

net.c: 1308: 0 (Debug) tun1  address family: 2 (AF_INET)

dhcp.c: 480: 0 (Debug) hash table size 512 (512)

dhcp.c: 332: 0 (Debug) GARP: Replying to broadcast

dhcp.c: 1172: 0 (Debug) dhcpif (br-wifi) IPv6 address ::

radius.c: 1285: 0 (Debug) RADIUS client 0.0.0.0:0

redir.c: 1718: 125 (Address already in use) IP: 10.1.0.1 Port: 3990 - Waiting for retry.

redir.c: 1718: 125 (Address already in use) IP: 10.1.0.1 Port: 4990 - Waiting for retry.

redir.c: 1718: 125 (Address already in use) IP: 10.1.0.1 Port: 4990 - Waiting for retry.

^Cchilli.c: 7251: 0 (Debug) Failed to create redir listen

------------------------------------------------------------------------------------

- Masuk "putty"

------------------------------------------------------------------------------------

root@OpenWrt:/srv/www/easyhotspot/install# netstat -apn

------------------------------------------------------------------------------------

pastikan isi baris sprti dibawah ini

------------------------------------------------------------------------------------

tcp        0      0 127.0.0.1:3306          0.0.0.0:*

tcp        0      0 10.1.0.1:3990           0.0.0.0:*

tcp        0      0 0.0.0.0:22              0.0.0.0:*

tcp        0      0 10.1.0.1:4990           0.0.0.0:*

udp        0      0 70.70.70.1:1812        0.0.0.0:*

udp        0      0 70.70.70.1:1813        0.0.0.0:*

----------------------------------------------------------------------------------------

root@OpenWrt:/srv/www/easyhotspot/install#

Lebih jelasnya bisa tonton video dibawah ini



Tidak ada komentar:

Posting Komentar

Jika ada pertanyaan silahkan tulis di kolom komentar.dengan bahasa yang sopan,No Sara,No Rasis & No Pornografi

Featured Post

Extroot and install luci in firmware OpenWrt Compilation