Escolar Documentos
Profissional Documentos
Cultura Documentos
,
,
+`
-.& update
0
&`".,.)- sudo apt-get remove update-notifier
`
,
-. ubuntu-desktop !".7 ubuntu server )"
,
-.57 7+.P
text - +) desktop graphic
,
-., Q
. desktop graphic
5
.
,
-.0
"
0,&`".
wifi@wifi-desktop:/$ sudo apt-get install ubuntu-desktop
&&8,5
.6
8 !7+
8,P
5
)")- ! eth1 P
5
+ eth0 P local network
8 /etc/network/interfaces ,.)-
,
auto lo
iface lo inet loopback
auto eth0
auto eth1
iface eth1 inet dhcp
"&
)-)"+/,)" 39
net.ipv4.ip_forward=1
restart 5
,&`".
wifi@wifi-desktop:/$ sudo /etc/init.d/networking restart
,
"&
)-)",%,.8
tun
enable ,&`".
wifi@wifi-desktop:/$ sudo modprobe tun
,
-. ssh server linux ubuntu !" secure shell connection 7 Windows
Desktop `.6
8, ,&`". sudo apt-get install openssh-server
wifi@wifi-desktop:/$ sudo apt-get install openssh-server
TZ='Asia/Bangkok'; export TZ
-.& )" + Q
. ,&`".
wifi@wifi-desktop:/$ sudo nano /etc/cron.daily/update-time
#!/bin/bash
/usr/sbin/ntpdate pool.ntp.org
wifi@wifi-desktop:/$ sudo chmod +x /etc/cron.daily/update-time
wifi@wifi-desktop:/$ sudo /etc/init.d/cron restart
,
,
-.8 apache2-ssl.tar.gz 0,&`".
)wifi@wifi-desktop:/$ sudo wget ftp://ftp.psu.ac.th/pub/apache/apache2-ssl.tar.gz
wifi@wifi-desktop:/$ sudo tar zxvf apache2-ssl.tar.gz C /tmp
wifi@wifi-desktop:/$ sudo mv /tmp/ssleay.cnf /usr/share/apache2
wifi@wifi-desktop:/$ sudo mv /tmp/apache2-ssl-certificate /usr/sbin
wifi@wifi-desktop:/$ sudo mkdir p /etc/apache2/ssl
,
-. openssl . ssl-certificate ,&`".
wifi@wifi-desktop:/$ sudo apt-get install openssl
,
,
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
<VirtualHost 10.0.134.1:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/secure/
ServerName new.name.domain
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/secure/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /var/www/secure/cgi-bin/
<Directory "/var/www/secure/cgi-bin/">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
,
,
10
,
. RADIUS client 6O".5&! local network %}
-.5
/24 (eth0
() 0,
"&8 /etc/freeradius/clients.conf
)client 10.0.134.0/24 {
secret
= sharedsecret
shortname
= private-network
}
11
,
6O".-
,
-. +7+
.d
-
,.)IP address of radius server 1:
127.0.0.1
12
,
0,
"& ENABLED=1 ,)" 6 .8
8 /etc/chilli.conf 0,&`".,.)wifi@wifi-desktop:/$ sudo nano /etc/chilli.conf
13
,
`,&
8
)-)"+/,)" 19 + 20
EXTIF="eth1"
INTIF="eth0"
14
,
comment + )" Password .++/,)" 27 + 31,.)$uamsecret = "sharedsecret";
$userpassword=1;
http://mamboeasy.psu.ac.th/~wiboon.w/images/stories/chillispot/chillispot.png
&, 8)- /var/www/ ,&`".,.)wifi@wifi-desktop:/$ sudo cp chillispot.png /var/www/
6O".7+,5,.()" -2
15
,
16
,
5. 214K-7 (L7)$FM4+;261K7L2,1+2
-
)-7+
.!"
%/66
8+7,&!
)",!"
5
)" 1 ,.,.()" -1 6O".
-.&.67+
.
)"
0,")
-.&)"`&},.)1. SSID .&!
-.P!" Chilli-Hotspot
2. Channel !.}}/
&+(, )"
,
-.
3. IP address !6 ),,76
8+
7,&! +&!".@ )76
8+
6O".!"
66
8+7,&! !"!"
&!".
@&! +,56.56
,d +7+,.5 Welcome
,.()" -2 !"&
. Click here to login 7+, Web Login ,.()" -3
17
,
-
)- Username + Password . root ! test 6O"..O--
,
-. Ubuntu Linux &
% Login 7+Q&!, 0,+7+
,.Q+. Login
. Logout ,.()" -4
,
19
,
#
# Read the 'users' file
files
#
# Look in an SQL database. The schema of the database
# is meant to mirror the "users" file.
#
# See "Authorization Queries" in sql.conf
sql
20
,
21
,
22
,
,
7
. FreeRADIUS , Username + Password )"
"
+ ,&`".
wifi@wifi-desktop:/etc/freeradius$ sudo radtest mysqltest testsecret 127.0.0.1 0
sharedsecret
23
,
24
,
,
# Connect info
server = "localhost"
login = "phpmyprepaid"
password = "prepaidadminsecret"
# Database table configuration
radius_db = "phpmyprepaid"
" sqlcounter )"+/,)" 1461 ,.)sqlcounter noresetcounter {
counter-name = Max-All-Session-Time
check-name = Max-All-Session
sqlmod-inst = sql
key = User-Name
reset = never
query = "SELECT SUM(AcctSessionTime) FROM radacct WHERE
UserName='%{%k}'"
}
+
"&)"+/,)" 1896 (%,. authorize) ,.)# Append for sql counter
noresetcounter
dailycounter
monthlycounter
26
,
)&,.)#
#
#
#
#
#
VENDOR
ChilliSpot
BEGIN-VENDOR
14559
ChilliSpot
ATTRIBUTE ChilliSpot-Max-Input-Octets
integer
ATTRIBUTE ChilliSpot-Max-Output-Octets
ATTRIBUTE ChilliSpot-Max-Total-Octets
ATTRIBUTE
ChilliSpot-Bandwidth-Max-Up
ATTRIBUTE
ChilliSpot-Bandwidth-Max-Down
ATTRIBUTE
ChilliSpot-Config
ATTRIBUTE
ChilliSpot-Lang
ATTRIBUTE
ChilliSpot-Version
ATTRIBUTE
ChilliSpot-OriginalURL
ATTRIBUTE
ChilliSpot-Acct-View-Point
ATTRIBUTE
ChilliSpot-Require-UAM
ATTRIBUTE
ChilliSpot-Require-Splash
integer
integer
4
5
6
7
8
9
integer
integer
string
string
string
string
10
integer
11 string
12 string
27
,
13 string
ATTRIBUTE
ChilliSpot-Route-To-Interface
ATTRIBUTE
ChilliSpot-DHCP-Vendor-Class-Id
ATTRIBUTE
ChilliSpot-DHCP-Client-Id
ATTRIBUTE
ChilliSpot-DHCP-Options
ATTRIBUTE
ChilliSpot-DHCP-Filename
ATTRIBUTE
ChilliSpot-DHCP-Hostname
ATTRIBUTE
ChilliSpot-DHCP-Server-Name
ATTRIBUTE
ChilliSpot-DHCP-Client-FQDN
ATTRIBUTE
ChilliSpot-DHCP-Parameter-Request-List 57
50 string
51
52
53
54
55
56
string
string
string
string
string
string
string
VALUE
ChilliSpot-Acct-View-Point ChilliSpot-NAS-View-Point
VALUE
ChilliSpot-Acct-View-Point ChilliSpot-Client-View-Point 2
string
101
string
ATTRIBUTE ChilliSpot-MAC-Allowed
ATTRIBUTE ChilliSpot-Interval
102
integer
ChilliSpot
"&8 /etc/freeradius/dictionary )&
)-)"+/
,)" 15
$INCLUDE
$INCLUDE
/usr/share/freeradius/dictionary
/etc/freeradius/dictionary.chillispot
28
,
,
-.68
php5 ,&`".,.)wifi@wifi-desktop:/etc/freeradius$ sudo apt-get install php5
,
-.68
rrdtool ,&`".,.)wifi@wifi-desktop:/etc/freeradius$ sudo apt-get install rrdtool
,
-.68
phpMyPrepaid 0,,0 ,8 7
.
)http://downloads.sourceforge.net/phpmyprepaid/phpmyprepaidRC3.tgz
,&`". wget 5,)`. /home/wifi &`".,.)wifi@wifi-desktop:~$ cd /var/www
wifi@wifi-desktop:/var/www$ sudo tar -zxvf ~/phpmyprepaidRC3.tgz
wifi@wifi-desktop:/var/www$ sudo chown -R www-data:www-data
/var/www/phpmyprepaid
29
,
,
31
,
32
,
33
,
34
,
,
,
P57
--
,
-.68
phpMyPrepaid
37
,
8. 21M4+;2C7B(#).1# phpMyPrepaid
!"`
,
-.68
phpMyPrepaid 57 7+Q.,0,,
6 +
URL http://10.0.134.1/phpmyprepaid/www/ 7+,)" Username +
Password )"-
()" -11 &
% Login
,
39
,
,
41
,
,
43
,
,
()" -32 Q
.+
,.Q
.0,
+(. Account + Billing Plan ,.,.
()" -33
45
,
()" -33 Q
.
Account + Billing Plan
7)-.Q7,a +, 0,&
Database mgt
,6! ,.()" -34
46
,
21(1.R7/W2+7Q%!$2
tail /var/log/freeradius/radius.log
@ )",.`.
47
,
User-Password = "alm"
NAS-IP-Address = 0.0.0.0
Service-Type = Login-User
Framed-IP-Address = 10.0.134.3
Calling-Station-Id = "00-13-02-69-41-FA"
Called-Station-Id = "00-60-97-DB-72-40"
NAS-Identifier = "nas01"
Acct-Session-Id = "4adddbab00000000"
NAS-Port-Type = Wireless-802.11
NAS-Port = 0
Message-Authenticator = 0xeb7fed00146470902f457c21afad1242
WISPr-Logoff-URL = "http://10.0.134.1:3990/logoff"
Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 0
modcall[authorize]: module "preprocess" returns ok for request 0
modcall[authorize]: module "chap" returns noop for request 0
modcall[authorize]: module "mschap" returns noop for request 0
rlm_realm: No '@' in User-Name = "comiwh", looking up realm NULL
rlm_realm: No such realm "NULL"
modcall[authorize]: module "suffix" returns noop for request 0
rlm_eap: No EAP-Message, not doing EAP
modcall[authorize]: module "eap" returns noop for request 0
radius_xlat: 'comiwh'
rlm_sql (sql): sql_set_user escaped user --> 'comiwh'
radius_xlat: 'SELECT id, UserName, Attribute, Value, op
FROM radcheck
WHERE
Username = 'comiwh'
ORDER BY id'
rlm_sql (sql): Reserving sql socket id: 4
radius_xlat: 'SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radg
48
,
49
,
50
,
NAS-Port-Id = "00000000"
NAS-IP-Address = 0.0.0.0
NAS-Identifier = "nas01"
Framed-IP-Address = 10.0.134.3
Acct-Session-Id = "4adddbab00000000"
Processing the preacct section of radiusd.conf
modcall: entering group preacct for request 1
modcall[preacct]: module "preprocess" returns noop for request 1
rlm_acct_unique: Hashing 'NAS-Port = 0,Client-IP-Address = 127.0.0.1,NAS-IP-Address =
0.0.0.0,Acct-Session-Id = "4adddbab00000000",User-Name = "comiwh"'
rlm_acct_unique: Acct-Unique-Session-ID = "36cfa1c321666c81".
modcall[preacct]: module "acct_unique" returns ok for request 1
rlm_realm: No '@' in User-Name = "comiwh", looking up realm NULL
rlm_realm: No such realm "NULL"
modcall[preacct]: module "suffix" returns noop for request 1
modcall[preacct]: module "files" returns noop for request 1
modcall: leaving group preacct (returns ok) for request 1
Processing the accounting section of radiusd.conf
modcall: entering group accounting for request 1
radius_xlat: '/var/log/freeradius/radacct/127.0.0.1/detail-20091020'
rlm_detail: /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d expands to
/var/log/freeradius/radacct/127.0.0.1/detail-20091020
modcall[accounting]: module "detail" returns ok for request 1
radius_xlat: 'comiwh'
rlm_sql (sql): sql_set_user escaped user --> 'comiwh'
radius_xlat: '
INSERT INTO radacct
(AcctSessionId, AcctUniqueId,
UserName,
Realm,
NASIPAddress, NASPortId,
NASPortType,
AcctStartTime, AcctStopTime,
AcctSessionTime, AcctAuthentic, ConnectInfo_start,
ConnectInfo_stop, AcctInputOctets, AcctOutputOctets,
CalledStationId,
CallingStationId, AcctTerminateCause,
ServiceType, FramedProtocol,
51
,
FramedIPAddress,
AcctStartDelay, AcctStopDelay, XAscendSessionSvrKey)
VALUES
('4adddbab00000000', '36cfa1c321666c81',
'comiwh',
'',
'0.0.0.0', '0',
'Wireless-802.11', '2009-10-20 22:48:28', '0',
'0', '', '',
'', '0', '0',
'00-60-97-DB-72-40', '00-13-02-69-41-FA', '',
'', '', '10.0.134.3',
'0', '0', '')'
rlm_sql (sql): Reserving sql socket id: 2
rlm_sql_mysql: MYSQL check_error: 1054 received
rlm_sql (sql): Couldn't insert SQL accounting START record - Unknown column
'XAscendSessionSvrKey' in 'field list'
radius_xlat: 'UPDATE radacct SET AcctStartTime = '2009-10-20 22:48:28', AcctStartDelay = '',
ConnectInfo_start = '' WHERE AcctSessionId = '4adddbab00000000' AND UserName =
'comiwh' AND NASIPAddress = '0.0.0.0''
rlm_sql (sql): Released sql socket id: 2
modcall[accounting]: module "sql" returns ok for request 1
modcall: leaving group accounting (returns ok) for request 1
Sending Accounting-Response of id 6 to 127.0.0.1 port 35889
Finished request 1
Going to the next request
Cleaning up request 1 ID 6 with timestamp 4adddbcc
Waking up in 6 seconds...
--- Walking the entire request list --Cleaning up request 0 ID 0 with timestamp 4adddbcc
Nothing to do. Sleeping until we see a request.
@ )",. logout `57
rad_recv: Accounting-Request packet from host 127.0.0.1:35889, id=7, length=179
Acct-Status-Type = Stop
User-Name = "comiwh"
Calling-Station-Id = "00-13-02-69-41-FA"
Called-Station-Id = "00-60-97-DB-72-40"
NAS-Port-Type = Wireless-802.11
52
,
NAS-Port = 0
NAS-Port-Id = "00000000"
NAS-IP-Address = 0.0.0.0
NAS-Identifier = "nas01"
Framed-IP-Address = 10.0.134.3
Acct-Session-Id = "4adddbab00000000"
Acct-Input-Octets = 4475
Acct-Output-Octets = 11306
Acct-Input-Gigawords = 0
Acct-Output-Gigawords = 0
Acct-Input-Packets = 41
Acct-Output-Packets = 37
Acct-Session-Time = 83
Acct-Terminate-Cause = User-Request
Processing the preacct section of radiusd.conf
modcall: entering group preacct for request 2
modcall[preacct]: module "preprocess" returns noop for request 2
rlm_acct_unique: Hashing 'NAS-Port = 0,Client-IP-Address = 127.0.0.1,NAS-IP-Address =
0.0.0.0,Acct-Session-Id = "4adddbab00000000",User-Name = "comiwh"'
rlm_acct_unique: Acct-Unique-Session-ID = "36cfa1c321666c81".
modcall[preacct]: module "acct_unique" returns ok for request 2
rlm_realm: No '@' in User-Name = "comiwh", looking up realm NULL
rlm_realm: No such realm "NULL"
modcall[preacct]: module "suffix" returns noop for request 2
modcall[preacct]: module "files" returns noop for request 2
modcall: leaving group preacct (returns ok) for request 2
Processing the accounting section of radiusd.conf
modcall: entering group accounting for request 2
radius_xlat: '/var/log/freeradius/radacct/127.0.0.1/detail-20091020'
53
,
54
,
55
,
| pdf_print
|
| phpmyprepaid
|
| radacct
|
| radcheck
|
| radgroupcheck
|
| radgroupreply
|
| radius_attribute
|
| radius_config
|
| radius_template
|
| radiusprofile
|
| radiusprofile_template |
| radpostauth
|
| radreply
|
| redirect_pages
|
| resources
|
| securelogin_table
|
| session
|
| sitepages
|
| ssh_config
|
| totacct
|
| user
|
| user_location
|
| usergroup
|
| userinfo
|
| wlogin
|
| wlogin_freeurl
|
| wlogin_popup_list
|
+------------------------+
47 rows in set (0.01 sec)
56