Enviar pesquisa
Carregar
Coovaubuntu904
•
0 gostou
•
981 visualizações
Kwanchai Charoennet
Seguir
Aperfeiçoamento pessoal
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 16
Baixar agora
Baixar para ler offline
Recomendados
Linux diskless
Linux diskless
อภิสิทธิ์ อภิชิตศศิวิมล
Ch11 web-app
Ch11 web-app
Chatchai Jantaraprim
Ch12 web-app-part2
Ch12 web-app-part2
Chatchai Jantaraprim
คู่มือการติดตั้ง Cent os
คู่มือการติดตั้ง Cent os
Pacharin Ngowpradit
Ch15 elastic hosts-svradmin
Ch15 elastic hosts-svradmin
Chatchai Jantaraprim
Server2Go เว็บพกพาตัวจริง
Server2Go เว็บพกพาตัวจริง
Boonlert Aroonpiboon
คำสั่ง ลินุกซ์ (Linux)
คำสั่ง ลินุกซ์ (Linux)
Arkom Thaicharoen
Cent OS-book
Cent OS-book
nin9nin9
Recomendados
Linux diskless
Linux diskless
อภิสิทธิ์ อภิชิตศศิวิมล
Ch11 web-app
Ch11 web-app
Chatchai Jantaraprim
Ch12 web-app-part2
Ch12 web-app-part2
Chatchai Jantaraprim
คู่มือการติดตั้ง Cent os
คู่มือการติดตั้ง Cent os
Pacharin Ngowpradit
Ch15 elastic hosts-svradmin
Ch15 elastic hosts-svradmin
Chatchai Jantaraprim
Server2Go เว็บพกพาตัวจริง
Server2Go เว็บพกพาตัวจริง
Boonlert Aroonpiboon
คำสั่ง ลินุกซ์ (Linux)
คำสั่ง ลินุกซ์ (Linux)
Arkom Thaicharoen
Cent OS-book
Cent OS-book
nin9nin9
Docker 101 for developer
Docker 101 for developer
Arnon Kijlardphon
Editors for-linux
Editors for-linux
Chatchai Jantaraprim
Cent os
Cent os
สามารถ จงนอก
Basic Linux
Basic Linux
minafaw2
Docker 1st time
Docker 1st time
Ongart Visarnpat
Basic linux
Basic linux
taggi
Unix
Unix
Arun Maneeon
Tiptlog 2
Tiptlog 2
sm1nok
AMD Ryzen Overclocking Guide
AMD Ryzen Overclocking Guide
Thanakarn Juicharoen
Linux command-reference
Linux command-reference
Suphot Chaichana
Ch06 bind9
Ch06 bind9
Chatchai Jantaraprim
Ch05 name-services
Ch05 name-services
Chatchai Jantaraprim
Ch07 bind9-part2
Ch07 bind9-part2
Chatchai Jantaraprim
Portable Moodle : Moodle & Server2Go
Portable Moodle : Moodle & Server2Go
Boonlert Aroonpiboon
การทำงาน Firewall fotiget
การทำงาน Firewall fotiget
charanthon New
Ch08 mail-systems
Ch08 mail-systems
Chatchai Jantaraprim
Hotspotubuntu8
Hotspotubuntu8
Kwanchai Charoennet
Proxy fc4 web
Proxy fc4 web
Green Jb
Linux diskless
Linux diskless
อภิสิทธิ์ อภิชิตศศิวิมล
NETWORK SERVICEOPENSSH + NTP + SQUID
NETWORK SERVICEOPENSSH + NTP + SQUID
Ploynatcha Akkaraputtipat
Multi threaded programming in c and c++ 2021-09-03
Multi threaded programming in c and c++ 2021-09-03
KIMVR1
20110303 joomla-appserv-server2go
20110303 joomla-appserv-server2go
Boonlert Aroonpiboon
Mais conteúdo relacionado
Mais procurados
Docker 101 for developer
Docker 101 for developer
Arnon Kijlardphon
Editors for-linux
Editors for-linux
Chatchai Jantaraprim
Cent os
Cent os
สามารถ จงนอก
Basic Linux
Basic Linux
minafaw2
Docker 1st time
Docker 1st time
Ongart Visarnpat
Basic linux
Basic linux
taggi
Unix
Unix
Arun Maneeon
Tiptlog 2
Tiptlog 2
sm1nok
AMD Ryzen Overclocking Guide
AMD Ryzen Overclocking Guide
Thanakarn Juicharoen
Linux command-reference
Linux command-reference
Suphot Chaichana
Ch06 bind9
Ch06 bind9
Chatchai Jantaraprim
Ch05 name-services
Ch05 name-services
Chatchai Jantaraprim
Ch07 bind9-part2
Ch07 bind9-part2
Chatchai Jantaraprim
Portable Moodle : Moodle & Server2Go
Portable Moodle : Moodle & Server2Go
Boonlert Aroonpiboon
การทำงาน Firewall fotiget
การทำงาน Firewall fotiget
charanthon New
Ch08 mail-systems
Ch08 mail-systems
Chatchai Jantaraprim
Mais procurados
(16)
Docker 101 for developer
Docker 101 for developer
Editors for-linux
Editors for-linux
Cent os
Cent os
Basic Linux
Basic Linux
Docker 1st time
Docker 1st time
Basic linux
Basic linux
Unix
Unix
Tiptlog 2
Tiptlog 2
AMD Ryzen Overclocking Guide
AMD Ryzen Overclocking Guide
Linux command-reference
Linux command-reference
Ch06 bind9
Ch06 bind9
Ch05 name-services
Ch05 name-services
Ch07 bind9-part2
Ch07 bind9-part2
Portable Moodle : Moodle & Server2Go
Portable Moodle : Moodle & Server2Go
การทำงาน Firewall fotiget
การทำงาน Firewall fotiget
Ch08 mail-systems
Ch08 mail-systems
Semelhante a Coovaubuntu904
Hotspotubuntu8
Hotspotubuntu8
Kwanchai Charoennet
Proxy fc4 web
Proxy fc4 web
Green Jb
Linux diskless
Linux diskless
อภิสิทธิ์ อภิชิตศศิวิมล
NETWORK SERVICEOPENSSH + NTP + SQUID
NETWORK SERVICEOPENSSH + NTP + SQUID
Ploynatcha Akkaraputtipat
Multi threaded programming in c and c++ 2021-09-03
Multi threaded programming in c and c++ 2021-09-03
KIMVR1
20110303 joomla-appserv-server2go
20110303 joomla-appserv-server2go
Boonlert Aroonpiboon
Ch17 secure-password
Ch17 secure-password
Chatchai Jantaraprim
20121102 joomla2-5
20121102 joomla2-5
Pattanee Arboonngam
Ubuntu office server-10.04-x64
Ubuntu office server-10.04-x64
apichat_L
php5new
php5new
Somjet Sareerom
เว็บสำเร็จรูป
เว็บสำเร็จรูป
niwat
สิ่งที่เตรียม
สิ่งที่เตรียม
นายรักพงษ์
การพัฒนาเอกสารออนไลน์ขั้นสูง Lect 05
การพัฒนาเอกสารออนไลน์ขั้นสูง Lect 05
Jenchoke Tachagomain
lesson3 JSP
lesson3 JSP
Kukik Kanoknuan
Ch10 web servers
Ch10 web servers
Chatchai Jantaraprim
Appserv install
Appserv install
Thanawut Rattanadon
การติดตั้ง Wordpress บน digitalocean
การติดตั้ง Wordpress บน digitalocean
Supawut Ardhan
อรจิรา พาโพพันธ์ 56170241 กลุ่ม 1
อรจิรา พาโพพันธ์ 56170241 กลุ่ม 1
cream3703
Xampp guide
Xampp guide
Naam Kaewsangthong
การตรวจเช็คฐานข้อมูล Oracle v1 draft
การตรวจเช็คฐานข้อมูล Oracle v1 draft
N/A
Semelhante a Coovaubuntu904
(20)
Hotspotubuntu8
Hotspotubuntu8
Proxy fc4 web
Proxy fc4 web
Linux diskless
Linux diskless
NETWORK SERVICEOPENSSH + NTP + SQUID
NETWORK SERVICEOPENSSH + NTP + SQUID
Multi threaded programming in c and c++ 2021-09-03
Multi threaded programming in c and c++ 2021-09-03
20110303 joomla-appserv-server2go
20110303 joomla-appserv-server2go
Ch17 secure-password
Ch17 secure-password
20121102 joomla2-5
20121102 joomla2-5
Ubuntu office server-10.04-x64
Ubuntu office server-10.04-x64
php5new
php5new
เว็บสำเร็จรูป
เว็บสำเร็จรูป
สิ่งที่เตรียม
สิ่งที่เตรียม
การพัฒนาเอกสารออนไลน์ขั้นสูง Lect 05
การพัฒนาเอกสารออนไลน์ขั้นสูง Lect 05
lesson3 JSP
lesson3 JSP
Ch10 web servers
Ch10 web servers
Appserv install
Appserv install
การติดตั้ง Wordpress บน digitalocean
การติดตั้ง Wordpress บน digitalocean
อรจิรา พาโพพันธ์ 56170241 กลุ่ม 1
อรจิรา พาโพพันธ์ 56170241 กลุ่ม 1
Xampp guide
Xampp guide
การตรวจเช็คฐานข้อมูล Oracle v1 draft
การตรวจเช็คฐานข้อมูล Oracle v1 draft
Coovaubuntu904
1.
Coova-chill+freeradius2 on ubuntu
9.04 เริ่มแรกเลยต้ องมีการ์ แลนด์สองใบครับ ผมลองใน vmware สบายอยูแล้ วกี่ใบก็ได้ ไม่ต้องซื ้อ ่ (ในการติดตังนี ้ผมถือว่าผม sudo เป็ น root แล้ วนะครับได้ ไม่ต้องมานัง sudo กันอีก) ้ ่ เพิ่มการ์ ดแลนให้ เจ้ า ubuntu กันก่อนจ้ า #nano /etc/network/interface แก้ ไข ip_forward ทีแฟม /etc/sysctl.cof ให้ เอา # ออกจากบรรทัด net.ip4.ip_forward=1 ด้ งรูป ่ ้
2.
(อย่าสับสนนะครับถ้ ามีเครื่ องหมาย
# มันจะไม่อานบรรทัดนัน) ่ ้ ทดสอบว่า ip_forward มันใช้ งานได้ ไหมด้ วยคําสัง ่ # echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward ค่าที่ตอบกลับมาจะได้ 1 (ตรง 1 ใส่ไรก็ได้ นะมันเพียงแต่ให้ แสดงให้ ร้ ูวามันทํางาน) ่ เปิ ดการทํางานของ tun/tap device ที่ file /etc/modules #nano /etc/modules แล้ วทําการเพิ่ม tun เข้ าไปในบรรทัดสุดท้ ายท้ ายสุดเลยจ้ า ดังรูป สังให้ ทํางานโดยไม่ด้อง restart ่ # modprobe tun มาติดตังต่อกันเลย ้ # apt-get update # apt-get upgrade Update ให้ มนทันสมัยกันหน่อยนะครับ ั มาติดตัง้ apache2+php5+mysql-server
3.
#apt-get install apache2 #apt-get
install php5-mysqli #apt-get install mysql-sever ตอนติดตังก็ให้ ใส่ password ด้ วยนะครับ ้ ใครจะติดตัง้ phpmyadmin ด้ วยก็ได้ นะครับยากมาก ด้ วยคําสัง ่ # apt-get install phpmyadmin แล้ วมันจะขึ ้นมาให้ เลือก ก็เลือก apache2 เลยนะครับ ที่นี ้ได้ เว็บ server มาแล้ ว ได้ เวลาติดตัง radius server และ database ้ #apt-get install freeradius freeradius-mysql ทําการสร้ าง ฐานข้ อมูลให้ กบ freeradius ในที่นี ้ผมจะให้ ชื่อ radius นะครับ ั # mysql –u root –p (enter แล้ วใส่รหัสผ่าน mysql ที่เราตังไว้ ตอนที่เราติดตัง mysql-server) ้ ้ mysql> CREATE DATABASE radius; mysql> quit ต่อมาก็ทําการใส่ฐานข้ อมูลให้ กบ freeradius โดยใช้ ฐานข้ อมูลของมันเองนะครับ ั mysql -u root -p radius < /etc/freeradius/sql/mysql/schema.sql mysql -u root -p radius < /etc/freeradius/sql/mysql/nas.sql mysql -u root –p (enter แล้ วใส่รหัสผ่าน mysql ที่เราตังไว้ ตอนที่เราติดตัง mysql-server) ้ ้ mysql> GRANT ALL PRIVILEGES ON radius.* TO 'root'@'localhost' IDENTIFIED BY 'sniperthai'; (ตรงsniperthai นี ้คือรหัสผ่านของผมเองนะครับใครตังไว้ ยงไงก็เปลี่ยนซะนะครับอย่าเหมือนผมนะ) ้ ั mysql> FLUSH PRIVILEGES; mysql> quit เข้ าไปแก้ ไข file sql.conf เพื่อให้ ใช้ databases ได้ #nano -w /etc/freeradius/sql.conf server = "localhost" login = "radius" password = "sniperthai
4.
แล้ วเอา #
ออก หน้ า readclient =yes ด้ วย ต่อมาเข้ าไปแก้ ไข file clients.conf เป็ นคีย์ในการเข้ ารหัส #nano -w /etc/freeradius/clients.conf client 127.0.0.1 { secret = radiussecret }
5.
ต่อไปเป็ นการ test
freeradius ใครจะไม่test ก็ได้ นะครับเพราะไม่คอยมีปัญหาเท่าไรแต่ใครจะ test ก็ตามมาเลยนะ ่ เข้ าไปที่ file users #nano -w /etc/freeradius/users เอา # หน้ า john ข้ างล่างนี ้ออก "John Doe" Auth-Type := Local, User-Password == "hello" Reply-Message = "Hello, %u"
6.
ทําการ reboot สักทีกอน
่ #reboot เมื่อreboot กันเสร็จแล้ ว ก็มาcheck กันเลย #/etc/init.d/freeradius stop # freeradius –XXX เมือ test แล้ วก็จะเห็นข้ อความ debug:ready ดังรูปช้ างล่าง แล้ วกด ctrl+c แล้ วสัง start freeradius ซะ ่ #/etc/init.d/freeradius start เสร็จแล้ วมา test user john doe กันด้ วยคําสัง ่ # radtest "John Doe" hello 127.0.0.1 0 radiussecret
7.
มันจะขึ ้นข้ อความว่า
rad_recv: Access-Accept packet from host 127.0.0.1:1812, id=136, length=37 อ่าวแล้ วจะงงว่าแล้ วทําไมของผมมันขึ ้นว่า Access-Reject ละที่มนขึ ้นข้ อมความแบบนี ้ไม่ต้องตกใจคิดว่าเฮยไม่ผานตาย ั ่ แล้ วทําไงดีนกถึงหลวงพ่อดีไหม ไม่ต้องนะครับจากที่ผมหามาได้ คําตอบว่า ถึงแม้ วาจะมีการแจ้ งว่า Access-Reject ึ ่ เป็ นสาเหตุเนื่องจากไม่มีสทธิในการอ่านแฟม /etc/shadow ของระบบ ิ ้ ที่นี ้ก็มากําหนดให้ freeradius อ่านข้ อมูลจาก mysql โดยเข้ าไปแก้ ไขที่ file #nano -w /etc/freeradius/sites-available/default ให้ กด ctrl+w หาคําว่า authorize { เจอแล้ วให้ เลื่อนลงมาใส่ # ที่ file และเอา # ที่หน้ า sql
8.
ต่อมาก็หาคําว่า
accounting { แล้ วเอา # หน้ า sql ออก accounting { detail radutmp sql ###change manually } ต่อมาก็หาคําว่า session { แล้ วเอา # หน้ า sql ออก session { sql ###change manually } ทีนี ้ลงมาแอด user กันเล่นดีกว่าหรื อจะเอาจริงดีเนี่ย # echo "INSERT INTO radcheck (UserName, Attribute, Value) VALUES ('mysqltest', 'Password', 'testsecret');" | mysql -u root -p radius (Enter password:sniperthai) มาลอง test กันเลยดีกว่า #/etc/init.d/freeradius restart #radtest mysqltest testsecret 127.0.0.1 0 radiussecret
9.
เรี ยบร้ อยแล้
ว freeradius มาต่อกันที่ coova-chilli กันต่อเลย เริ่มแรกเลยเราก็ไป download coova มาก่อนจ้ า #wget http://ap.coova.org/chilli/coova-chilli_1.0.13-1_i386.deb ติดตังกันเลย ้ #dpkg -i coova-chilli_1.0.13-1_i386.deb มาจัดการ file ต่างๆๆ ใน coova Copy file config ของ chilli #cp /etc/chilli/defaults /etc/chilli/config สร้ าง folder hotspot ขึ ้น #mkdir /var/www/hotspot เข้ าไปใน folder hotspot #cd /var/www/hotspot copy fle ใน folder www ทังหมดไปที่ hotspot ้ #cp /etc/chilli/www/* /var/www/hotspot สร้ าง folder image #mkdir /var/www/hotspot/images copy รู ปภาพไปไว้ ที่ images #cp /var/www/hotspot/coova.jpg /var/www/hotspot/images/ สร้ าง folder uam ขึ ้นมา #mkdir /var/www/hotspot/uam เข้ าไปใน uam #cd /var/www/hotspot/uam
10.
ดาว์โหลด uam และ
รูปจาก coova.org #wget http://ap.coova.org/uam/ #wget http://ap.coova.org/js/chilli.js เปลี่ยน Host Address ใหม่ #sed -i 's/ap.coova.org/js/chilli.js/192.168.8.1/uam/chilli.js/g' /var/www/hotspot/uam/index.html (ต้ องเป็ นบรรทัดเดียวกันนุครับ) #sed -i 's/192.168.182.1/192.168.8.1/g' /etc/chilli/www/ChilliLibrary.js #sed -i 's/192.168.182.1/192.168.8.1/g' /var/www/hotspot/ChilliLibrary.js เข้ าไปแก้ ไข file chilli โดยเปลี่ยนค่าเป็ น 1 START_CHILLI=1 CONFFILE="/etc/chilli.conf" #nano -w /etc/default/chilli ทําการ restart chilli # /etc/init.d/chilli start
11.
แก้ ไข file
/etc/chilli/config #nano /etc/chilli/config จะเห็นว่าในที่นี ้ผมใช้ วง 192.168.8.0 นะครับ file ที่ต้องแก้ ไขมี
12.
13.
ติดตัง้ firewall #nano /etc/chilli/up.sh เพิมข้
อความข้ างล่างในบรรทัดท้ ายสุด ่ # may not have been populated the first time; run again [ -e "/var/run/chilli.iptables" ] && sh /var/run/chilli.iptables 2>/dev/null # force-add the final rule necessary to fix routing tables iptables -I POSTROUTING -t nat -o $HS_WANIF -j MASQUERADE มาติดตัง้ ssl ให้ กบ apache กันดีกว่า ั # apt-get install libapache2-mod-auth-mysql สร้ าง Certificate #apt-get install ssl-cert
14.
สร้ าง folder
ssl #mkdir /etc/apache2/ssl ดูดวา hostnameเราชื่อไร ถ้ าจะแก้ ไขก็ที่ file /etc/hostname นะ ิ่ #hostname -f เสร็จแล้ วก็เอาชื่อ hostnameมาใส่ในการตอบคําถามข้ างล่างนี ้ #ake-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem ติดตัง้ module ssl a2enmod ssl /etc/init.d/apache2 force-reload เข้ าไปเพิ่มข้ อความบรรทัดด้ านล่างใน file hotspot #nano -w /etc/apache2/sites-available/hotspot NameVirtualHost 198.168.8.1:443 <VirtualHost 198.168.8.1:443> ServerAdmin ubuntu.sniperthai@yahoo.com DocumentRoot "/var/www/hotspot" ServerName "198.168.8.1" <Directory "/var/www/hotspot/"> Options FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> Alias "/dialupadmin/" "/usr/share/freeradius-dialupadmin/htdocs/" <Directory "/usr/share/freeradius-dialupadmin/htdocs/"> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /var/www/hotspot/cgi-bin/ #this here is a alias with no hotspot path !!!!!!!
15.
<Directory "/var/www/hotspot/cgi-bin/">
AllowOverride None Options ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/hotspot-error.log LogLevel warn CustomLog /var/log/apache2/hotspot-access.log combined ServerSignature On SSLEngine on SSLCertificateFile /etc/apache2/ssl/apache.pem </VirtualHost> สังให้ hotspot ใน apache ทํางาน ่ #a2ensite hotspot #/etc/init.d/apache2 reload จัดการเรื่ อง post ใน apche #nano -w /etc/apache2/ports.conf Listen *:443 Listen *:80 #<IfModule mod_ssl.c> # Listen 443 #</IfModule> แก้ ไข default ด้ วยนะ #nano -w /etc/apache2/sites-available/default NameVirtualHost *:80 <virtualhost *:80> เพิ่ม server name ใน apache2.conf
16.
#nano -w /etc/apache2/apache2.conf ServerName
198.168.8.1 192.168.8.1 host.name host #change to your host name รี สตาร์ apache #/etc/init.d/apache2 restart เรี ยบร้ อยแล้ วเราก็เรี ยกว็บจากเครื่ องลูกในวงแลนได้ เลยนะครับ อ้ างอิง https://help.ubuntu.com/community/WifiDocs/CoovaChilli ขอขอบคุณอาจารย์ เผด็จ พราวศรี ที่เป็ นแรงบันดาลให้ ผมทําเอกสารชุดนี ้และต่อๆๆไปครับ
Baixar agora