Authentication - PowerPoint PPT Presentation

1 / 79
About This Presentation
Title:

Authentication

Description:

... ???? ?????????????????? Proxy Server, Network Address Translation(NAT) ... ????????????????? OpenSSH server ????????? ??????????? sshd service ???????????? ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 80
Provided by: iLL119
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/network/interfaces
  • ???????????????????????????????????
    net.ipv4.ip_forward1 ???
  • ????????????????????????? ?????????????????
    ???????? forward packet ?????????????????????

echo 1 tee /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 ?????????????????????????????
    ???????????????????????

Ln s/etc/init.d/chilli.iptables /etc/rcS.d/S41
chilli.iptables
  • ????????????????????????????????????????
    ehointernet,eth1LAN ????????????????????????????
    ??? ??????????????????????????????????????????????
    ???? chilli.iptables

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

/etc/init.d/chilli.iptables
  • ??????????????????????????????????????????????????
    ?????????? 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 ??????????? ServerName
    192.168.182.1
  • ???? sites-available/default
  • - ServerAdmin ??? email address ??? webmaster
  • Document Root ???????? /var/www
    ??????????????????????????????? ????????????????
  • - ServerAdmin ??? email address ??? webmaster
  • ???????????????????????????? ???????? 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 ?????????????????????

apt-get install mysql-server
  • ???????? 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.100.79/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
  • ????? start freeradius ???????????????????????

/etc/init.d/freeradius start
????????????????? MySQL Database
43
  • Install Radius Server
  • ????? Install Radius Server ??????????????????????
    ? ???????????????? y ?????? Enter

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

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

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

zcat /usr/share/doc/freeradius/examples/mysql.sql.
gz mysql u root p radius
  • ?????????? 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 FULSH PRIVILEGES
45
  • Install Radius Server
  • ????????????????????? FreeRadius
    ???????????????????????? ???????????????????????

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

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

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

client 127.0.0.1 secretradiussecret
47
  • 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
48
  • Install Radius Server
  • ????????????????????? putty/terminal ????????????
    1 ??? ??????????????????? Client
    ?????????????????????????????

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

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

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

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

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

vi /etc/freeradius/radiusd.conf
51
  • SQL Logging

52
  • 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
53
  • SQL Logging
  • ???????????????????????????????????????????????

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

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

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

chmod ax /var/www/hotspot/cgi-bin/hotspotlogin.cg
i
55
  • 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
56
  • Create Login page
  • ?????????????? welcome.html ?????????????????????

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

57
  • Create Login page
  • ????????????????????????????????????????

wget http//mamboeasy.psu.ac.th/wiboon.w/images/s
tories/chillispot/chillipsot.png cp
chillispot.png /var/www
58
  • 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
59
  • Setup SSL
  • ??????????????????????????????????????
  • ????? install module ssl ?????????????????????

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

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

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

62
  • Setup SSL

63
  • Setup SSL
  • ??????????????? Enable SSL virtualhost
    ?????????????????????

a2ensite hotspot
  • ??????????????? reload apache ????????????????????
    ?

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

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

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

66
  • Setup SSL
  • ?????????? Server Root ?????????????????????

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

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

vi /etc/hosts
67
  • Setup SSL
  • ?????????? Server Root ?????????????????????

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

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

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

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

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

70
  • Add User
  • ?????????????????????? 2 ????? ??? ????? radcheck
    ???? ?????????????????????????????????????????????
    ??????????????????????????????????????????

71
  • Add User
  • ????????????2 ??? ????? radreply
    ??????????????????????????????????????????????????
    ??????????????????????????????????????????????????
    ??????????????????

72
  • Add User
  • ??????????????????????????????????????????
    radcheck ??????????????? radcheck
    ??????????????????? Insert ???????????????????????
    ????????

73
  • Add User
  • ??????????????????????????????????????????????
    radcheck

Radtest Somsak jaidee dHIIC2c localhost o
testing123
  • ??????????

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

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

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

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

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

???? ?????????? Login
79
  • Test Login
  • ????????? link ????????????????????? Login
    ????????????? Login ?????????????????????????????
    ???????????

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