Authentication - PowerPoint PPT Presentation

1 / 77
About This Presentation
Title:

Authentication

Description:

???????????? MySQL Database ????????????????????? ???????????????? y ?????? Enter ... Enter ?????????????????? root ???????? ??????? mysql ??????????????????? ... – PowerPoint PPT presentation

Number of Views:261
Avg rating:3.0/5.0
Slides: 78
Provided by: iLL93
Category:

less

Transcript and Presenter's Notes

Title: Authentication


1
  • Authentication

????????????????????????????????????????????????
??????????? ????????????????????????
??????????????? ??????????????????????????????????
??????????????????????????????????????????????????
????? ?.?.2550 ???????????????????????????????????
?????????????????????????????????????????????????
???????????????????????????(Identification and
Authentication) ???? ?????????????????? Proxy
Server, Network Address Translation(NAT) ????
Proxy Cache ???? Cache Engine ?????????? Free
Internet ?????????? 1222 ???? Wi-Fi Hotspot
??????????????????????????????????????????????????
???
2
  • Authentication

3
  • Authentication

?????? ??????????????????????????????????? 1
??????????????????????????????????????????????????
?? ??????????????????????????????????????????????
????????????????????????????????? Authentication
Gateway ?????????????????????????????????
Centralized Log
4
  • Authentication

Authentication ?????????????????????????????????
???????????????????????????????????
???????????????????????? username ??? password
????????????? ???????????????????? Authentication
??????????????????????? ? ????????????????????????
?????????????????? ?????? ????????????????????????
??????????????????????????????????????????????????
??????????????????????????????????? upload ????
download ???????????????????????
??????????????????????????????????????????????????
????????????? ????????????????????????????????????
????????????????????? ????????????????????????????
???????????????????????????????????
??????????????????????????????????????????????????
????????????????????????? ????????????????????????
??????????????????????????????????????????????????
????????????????????????????????????
????????????????? ?????????????????????????????
?????? Authentication ???????????????????????????
??????????????????????????????????????????????????
????? ????? ??????????????????????????????
5
  • Software and Hardware Requirement
  • Ubuntu 8.04
  • Chillispot
  • FreeRadius
  • Apache
  • MySQL
  • Putty
  • PC ???????????????????? Server ?? 2
    Interfaces
  • PC ???????????????????? Test

Software
Hardware
6
  • Software Installation

Install Ubuntu 8.04
  • ??????? Ubuntu 8.04 ???? restart ???????????
    Bios ??????? boot ??? CD ???? ???????????????????

???????????????????
7
  • Install Ubuntu 8.04
  • ????? Install ?????? Enter

?????????? Install
8
  • Install Ubuntu 8.04
  • ?????? ???????????????? ?????????????????
    English ?????? forward

???????????????????????????????
9
  • Install Ubuntu 8.04
  • ???????????? ????????????? Bangkok ?????????
    forward

?????????????????????
10
  • Install Ubuntu 8.04
  • ?????????????????????? keyboard layout ?????????
    forward

?????????????????? keyboard layout
11
  • Install Ubuntu 8.04
  • ?????? Partition ????????????? Ubuntu
    ????????????????????????????????????? Windows XP
    ?? ??????? Guided ????????????????????????????
    ????????? forward

???????????????? Partition ??? Guided
12
  • Install Ubuntu 8.04
  • ?????????? User ??? Password ????????????
    ???????????????????? ?????????????????????????????
    ? ?? forward

??????????????? User ??? Password
13
  • Install Ubuntu 8.04
  • ??????????????????????? ????????? Install

????????????????????????
14
  • Install Ubuntu 8.04
  • ?????????????????????????????????? Restart
    ??????????????

?????????? Restart ????
15
  • Install Ubuntu 8.04
  • ??????????? Ubuntu ??????????????? Username ???
    Password ?????????????????

?????????????? Username ??? Password
16
  • Install Ubuntu 8.04
  • ?????????????????????? Terminal
    ????????????????????? Password ?????? root

????????????????????????? Terminal
17
  • Install Ubuntu 8.04
  • ?????????? password ?????? root ????????????
  • sudo passwd root ????????? Enter
  • ??????????????????????????????????????????????????
    Install ????????? Enter ??????????????
  • ?????? password ?????? root ???????? password
    ?????? root ?????? Enter
  • ????????????? password ???????? ?????? Enter

??????????????? password ?????? root
18
  • Install Ubuntu 8.04
  • ??????????????? password ?????? root
    ???????????????????? ?????????????????
    ?????????????????
  • su ?????? Enter ?????????? password ??? root
    ????????? Enter ??????????????????????????????????
    ??????? administrator ???? root ??????????????
    password ??????

??????????????????????? password ??? root
19
  • ??????????????????????????????????????????????????
    ?
  • ????????? ping ???????????????? google
    ??????????????????????????? host ??? google
    ????????????????????????????????????????????

ping www.google.co.th
????????????????????????????????????
20
  • ??????????????????????????????????????????????????
    ?
  • ????? ip ????????????? ?????????????????
    interfaces ???????????????????????

vi /etc/network/interfaces
??????????????? ip ?????? interfaces
21
  • ??????????????????????????????????????????????????
    ?
  • ???????????? restart network ?????????????????????
    ??

/etc/init.d/networking restart
  • ?????????????????????? file resolv.conf
  • ?????????????? resolv.conf ???????????????????????
    ? nameserver ???????????????????????

vi/etc/resolv.conf
??????????????????? resolv.conf
22
  • ??????????????????????????????????????????????????
    ?
  • ???????????? restart network ????????
    ???????????????????????

/etc/init.d/networking restart
  • ?????????????????????????????????????????????????

ping www.google.co.th
???????????????????????????????
23
  • ??????????????????????????????????????????????????
    ?
  • ????? update package ???? ? ???????????? Ubuntu
    ???????????????????????

apt-get update
  • ?????????????????? update package ?????????

?????????? update package ???? ?
24
  • Network Setup
  • ????? Enable packet forwarding ???????????????????
    ????

vi /etc/sysctl.conf
  • ???????????????????????????????????
    net.ipv4.ip_forward1 ???
  • ????????????????????????? ?????????????????
    ???????? forward packet ?????????????????????

sysctl -p cat /proc/sys/net/ipv4/ip_forward
  • ??????????????? 1 ??????????? Enable packet
    forwarding ??????
  • ????? Restart network ?????????????????????

/etc/init.d/networking restart
25
  • Enable TUN/TAP device driver support
  • ????? Enable TUN/TAP device support
    ??????????????????????? ?????????????? modules

vi /etc/modules
  • ????????????????? tun ??????????????????
  • ???????????? Enable ??????????????? Reboot
    ?????????????????????

modprobe tun
26
  • Install OPENSSH
  • ????? ??????? OpenSSH server ?????????????????????
    ??

apt-get install ssh openssh-server
  • ???????????????? y ?????? Enter

????????????????? OpenSSH
27
  • Install OPENSSH
  • ????????????????? OpenSSH server ?????????
    ??????????? sshd service ???????????????????????

/etc/init.d/ssh start
  • ????????????? service ??? ????????????????????

?????????? start service ssh
28
  • Install OPENSSH
  • ???????????????????? putty ??????????????????????
    ????? putty ??? ??????????????????????????????? ?

??????????????????????????? putty
29
  • Install OPENSSH
  • ??????????????? Login ???? username ??? password
    ??????????????????????? Terminal

?????????? Login ??????????
30
  • Install Chillispot
  • ???????????? chillispot ???????????????????????

apt-get install chillispot
  • ???????????????????????????????????

31
  • Install Chillispot
  • ?????????? Enable captive portal ??????
    chillispot ???????????????????????

vi /etc/default/chillispot
  • ??????????????????????? ENABLED1
  • ??????????????? chilli.conf ??????????????????????
    ?

vi /etc/chilli.conf
32
  • Install Chillispot
  • ????????????????????????????? ????????????????????
    ?????

??????????????????? chilli.conf
33
  • Install Firewall
  • ????????????????????? ?????????????????
    chilli.iptables ???????????????????????
    firewall.iptables ???????????????????????

cp /usr/share/doc/chillispot/firewall.iptables
/etc/init.d/chilli.iptables
  • ???????? chilli.iptables ?????? Excute ???
    ???????????????????????

chmod ax /etc/init.d/chilli.iptables
  • ???????????????????? ?????????????? ????????
    start ?????????????????????????????
    ???????????????????????

update-rc.d chilli.iptables defaults 41
20 update-rc.d chillispot defaults 51 20
  • ????????????????????????????????????????
    ethointernet,eth1LAN ???????????????????????????
    ???? ?????????????????????????????????????????????
    ????? chilli.iptables

34
  • Install Firewall
  • ????? Enable firewall script ?????????????????????
    ??

/etc/init.d/chilli.iptables
  • Boot ??????????????????? interface tun0 ??????
  • ??????????????????????????????????????????????????
    ?????????? icmp ?????????? ping
    ?????????????????????

Allow ping to myserver SERVER_IP192.168.182.1
iptables -A INPUT -p icmp icmp-type 8 -s 0/0 -d
SERVER_IP -m state state NEW,ESTABLISHED,RELATE
D -j ACCEPT iptables -A OUTPUT -p icmp icmp-type
0 -s SERVER_IP -d 0/0 -m state state
ESTABLISHED,RELATED -j ACCEPT
35
  • Install Apache
  • ???????????? Apache Web Server ???????????????????
    ?? ???????????????? y ?????? Enter

apt-get install apache2
????????????????? apache
36
  • Install Apache
  • ??????????????????????? ????????? config ????????
    configuration files ??????????????
    /etc/apache2/apache2.conf ????????????????????????
    ???? ? ????????????
  • ???? apache2.conf ???????????? ServerName
    ??????????????? Include /etc/apache2/conf.d/
  • - ServerName ??????????? ServerName
    192.168.182.1
  • ???? /etc/apache2/sites-available/default
  • - ServerAdmin ??? email address ??? webmaster
  • Document Root ???????? /var/www
    ??????????????????????????????? ????????????????
  • - DocumentRoot /var/www
  • ???????????????????????????? ???????? start
    apache ???????????????????????

/etc/init.d/apache2 start
37
  • Install Apache
  • ?????????? Apache ???????????? ????????????
    netstat lnt ??????? apache ??????????????
    ??????????? 80 ????????? LISTEN

netstat -lnt
????????????????? Apache
38
  • Install MySQL Database Server
  • ???????????? MySQL Database ?????????????????????
    ???????????????? y ?????? Enter

apt-get install mysql-server
????????????????? MySQL Database
39
  • Install MySQL Database Server
  • ?????????????????????????? ????????????? password
    ??? root ????????????? OK ????????????????????????
    ?????????????? OK ?????????????????????
  • ???????? MySQL ??????????????????????
    ???????????????????????

mysql u root -p
  • ????????? Enter ?????????????????? root ????????
    ??????? mysqlgt ???????????????????

40
  • Install PhpMyAdmin
  • ???????????? PhpMyAdmin ???????????????????????
    ???????????????? y ?????? Enter

apt-get install phpmyadmin
  • ????????????? PhpMyAdmin ???????????? web server
    apache2 ????????? OK ?????????????????????
  • ???????????????? PhpMyAdmin ?????? browser ????
    http///192.168.182.1/phpmyadmin ??????????????
    Login ?????????? PhpMyAdmin ????????????

41
  • Install PHP
  • ???????????? Php???????????????????????
    ???????????????? y ?????? Enter

apt-get install php5
  • ????? restart apache ?????????????????????

/etc/init.d/apache2 restart
  • ?????????? restart apache ??????????????? php
    ???????????? ???????????? test.php ???????????

vi /var/www/test.php
  • ?????????????????????????????????????????????
    lt?php phpinfo() ?gt ?????????? browser ????
    http//192.168.100.79/test.php
    ?????????????????????? ? ??? php ????????????

42
  • Install Radius Server
  • ????? Install Radius Server ??????????????????????
    ? ???????????????? y ?????? Enter

apt-get install freeradius freeradius-mysql
freeradius-dialupadmin
  • ????? start freeradius ???????????????????????

/etc/init.d/freeradius start
  • ????? start freeradius ???????????????????????

mysql u root p ????????????????????????????????
?????????? mysql ????????????????????
Database ????????????????????? CREATE DATABASE
radius
43
  • Install Radius Server
  • ?????????????????????????????? Radius
    ??????????????????????? FreeRadius

zcat /usr/share/doc/freeradius/examples/mysql.sql.
gz mysql u root p
  • ?????????? user ????????????? Database radius
    ??????????????????????? ????????????? User
    ??????? radius ??? password ??????? mysqlsecret

mysql u root p ???????????????????????????????
??????????? mysql ?????????????????????????????
GRANT ALL PRIVILEGES ON radius. TO
radius_at_localhost IDENTIFIED BY mysqlsecret
?? Enter FLUSH PRIVILEGES
44
  • Install Radius Server
  • ????????????????????? FreeRadius
    ???????????????????????? ???????????????????????

vi /etc/freeradius/sql.conf
  • ?????????????? Login ??? Password ??????????????

??????????????????? Login ??? Password
45
  • Install Radius Server
  • ?????????? password ????????????? Client
    ??????????????? FreeRadius ???????????????????????

vi /etc/freeradius/clients.conf
  • ???????????????????? Client 127.0.0.1 ?????
    secretradiussecret

client 127.0.0.1 secretradiussecret
46
  • Install Radius Server
  • ????? test default file setup ?????????????????
    users ???????????????????????

vi /etc/freeradius/users
  • ???????????? John Doe ??????????????????????????
    ??????????? ??????????????????????????????????????
    ?

??????????????????? Login ??? Password
  • ???????????? stop freeradius

/etc/init.d/freeradius stop ?? Enter
??????????????????????????????? freeradius XXX -A
47
  • Install Radius Server
  • ????????????????????? putty/terminal ????????????
    1 ??? ??????????????????? Client
    ?????????????????????????????

radtest John Doe hello 127.0.0.1 0 radiussecret
  • ???????????????????? ??????? Client
    ????????????????????

???????????????????????????? FreeRadius
48
  • Change authorization to sql
  • ???????????? authorization ??? file ?????? sql
    ???????????????????????

vi /etc/freeradius/radiusd.conf
  • ?????????????? authorize.. ?????????????????????
    sql ??? ????????????????????? files ???
    ??????????????????????????????????????????????????
    ????????? Files ????????????? sql ??? ??????

49
  • SQL Logging

50
  • SQL Logging
  • ???????????????????????????????????????????????
    ??????????????????????? ???????????????????
    sql.conf

vi /etc/freeradius/sql.conf
  • ????????????????? readclientyes ???????
    ?????????????????????? readclientyes ??????????
    radius client ?????????? database

51
  • SQL Logging
  • ?????????? user ??????????????????
    ?????????????????????????

echo INSERT INTO radcheck (UserName,Attribute,Val
ue) VALUES (mysqltest,Password,testsecret)
mysql u radius p radius
  • ????? start radius ???????????????????????

/etc/init.d/freeradius start
  • ?????????????????????????????????????????????

radtest mysqltest testsecret 127.0.0.1 0
radiussecret
52
  • SQL Logging
  • ???????????????????????????????????????????????

53
  • Create Login page
  • ????????????????????? cgi-bin

mkdir p /var/www/cgi-bin
  • ?????????????? hotspotlogin.cgi
    ?????????????????? ??????????????
    ?????????????????????

zcat c /usr/share/doc/chillispot/hotspotlogin.cg
i.gz tee /var/www/cgi-bin/hotspotlogin.cgi
  • ???????????? chmod ??????? hotspotlogin.cgi
    ?????? excute ??? ?????????????????????

chmod ax /var/www/cgi-bin/hotspotlogin.cgi
54
  • Create Login page
  • ?????????????? hotspotlogin.cgi
    ?????????????????????

vi /var/www/cgi-bin/hotspotlogin.cgi
  • ??????????????????????? uamsecret ???
    userpassword ???????????????? password ???
    uamsecret ??????????????? uamsecret

uamsecretuamsecret userpassword1
  • ??????????????????????????? start chillispot
    ?????????????????????

/etc/init.d/chillispot start
55
  • Create Login page
  • ?????????????? welcome.html ?????????????????????

vi /var/www/welcome.html
  • ???????????????????????????????? welcome.html

56
  • Create Login page
  • ????????????????????????????????????????

wget http//mamboeasy.psu.ac.th/wiboon.w/images/s
tories/chillispot/chillispot.png cp
chillispot.png /var/www
57
  • Setup SSL
  • ???????????? SSL ???????????????????????
    ???????????????? y ?????? Enter

apt-get install ssl-cert
  • ????????????????????? ssl ????????? Certificate
    ??????????????? ?????????????????????

mkdir /etc/apache2/ssl
  • ?????????? self-signed certificates
    ?????????????????????

make-ssl-cert /usr/share/ssl-cert/ssleay.cnf
/etc/apache2/ssl/apache.pem
58
  • Setup SSL
  • ??????????????????????????????????????
  • ????? install module ssl ?????????????????????

a2enmod ssl
59
  • Setup SSL
  • ????? reload apache ?????????????????????

/etc/init.d/apache2 force-reload
  • ??????????????? Virtual Host ???? hotspot
    ???????????????????????????

vi /etc/apache2/sites-available/hotspot
60
  • Setup SSL
  • ???????????????????????????????

61
  • Setup SSL

62
  • Setup SSL
  • ??????????????? Enable SSL virtualhost
    ?????????????????????

a2enmod ssl a2ensite hotspot
  • ??????????????? reload apache ????????????????????
    ?

/etc/init.d/apache2 reload
  • ????? Listen Port ?????? default ??? https
    ??????????????? 443 ??????????????? ports.conf

vi /etc/apache2/ports.conf
63
  • Setup SSL
  • ???????????????????????????????????????????
  • ??????????????????????????? Listen ????????????
    default http port 80 ?????????????????????

vi /etc/apache2/sites-available/default
64
  • Setup SSL
  • ????????????????????????????
  • ??????????????????????????? Listen ????????????
    default http port 80 ??????????? 80 ???????

65
  • Setup SSL
  • ?????????? Server Root ?????????????????????

vi /etc/apache2/apache2.conf
  • ??????????????????? ServerName

ServerName 192.168.182.1
  • ?????????? host file ?????????????????????

vi /etc/hosts 192.168.182.1 localhost
  • ????? restart apache ?????????????????????

/etc/init.d/apache2 restart
66
  • Setup SSL
  • ????????????? browser ???? https//192.168.182.1
    ??????????? Certificate ?????????????????
    ???????????????????

67
  • Add User
  • ??? browser ??????????? PhpMyadmin ????????????
    login ?????????? ???????????????????????????
    radius
  • ????????????????????????????????????????????
    ??????????????????????? ? ??????????????????
    radius

68
  • Add User
  • ?????????????????????? 2 ????? ??? ????? radcheck
    ???? ?????????????????????????????????????????????
    ??????????????????????????????????????????

69
  • Add User
  • ????????????2 ??? ????? radreply
    ??????????????????????????????????????????????????
    ??????????????????????????????????????????????????
    ??????????????????

70
  • Add User
  • ??????????????????????????????????????????
    radcheck ??????????????? radcheck
    ??????????????????? Insert ???????????????????????
    ????????

71
  • Add User
  • ??????????????????????????????????????????????
    radcheck

radtest Somsak jaidee dHIIC2c localhost o
radiussecret
  • ??????????

72
  • Add User
  • ????????????????????????????????? radreply
    ??????????????? radreplay ???????????????????
    Insert ???????????????????????????????
  • ????????????????????? radreply
  • ???????? radreply ????????????????????? Somchai
    Rakkarndee ?????????????????????? 10800 ??????(3
    ???????) ???????????????????????????????????????
    1200 ?????? (20 ????) ????????????????????????????
    ????? ????????????????????????????????????????????
    ????????????? 3 ?????????????????????? Attribute
    ???????? radreply ??? Session-Timeout
    ???? Max-All-Session ???

73
  • ???????????????????????????? import text file
  • ?????????? Text file ?????????????????????????????
    ?? ?????????????????????????????????? .sql

74
  • ???????????????????????????? import text file
  • ???????????????? Text file ???? ???????????
    PhpMyAdmin ????? ???? import ?????????? import
    text file ????????????? Browse ?????????? text
    file ????????????????? ????????????? Go
    ?????????? import text file

75
  • ???????????????????????????? import text file
  • ??????????????????????????????????????
    ????????????? radcheck ????????????? Browse
    ??????????????????????????????????????????? text
    file ???????????????????? radreply
    ????????????????????? radcheck

76
  • Test Login
  • ??????????????????????????????????????????????????
    ??? ??????????????????? browser ????
  • https//192.168.182.1/welcome.html ??????? ??????
    Chillispot ?????????????????? login

???? ?????????? Login
77
  • Test Login
  • ????????? link ????????????????????? Login
    ????????????? Login ?????????????????????????????
    ???????????

???? UserName ??? Password
Write a Comment
User Comments (0)
About PowerShow.com