tag:blogger.com,1999:blog-37058683361025571072024-03-13T21:52:27.597-07:00Authentication ServerComputer !http://www.blogger.com/profile/17986004803115235464noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-3705868336102557107.post-42949049437247345142012-12-03T22:02:00.003-08:002012-12-03T22:02:39.070-08:00The WhoIsIt PKI biometric authentication server <div align="center">
<img height="324" src="http://www.qvbiometrics.com/clientserver/images/pki_client.gif" width="400" /></div>
<br />
The WhoIsIt PKI biometric authentication server allows users to logon
to the Network, to authenticate applications, digitally sign and encrypt
documents, and mail correspondents using PKI technology. <br /><br />
<br />
The WhoIsIt PKI biometric server is a self contained server and biometric
database. The WhoIsIt biometric database contains each enrolled user’s biometric templates,
passwords, and PKI key store. Each user enrolled in the WhoIsIt
biometric server database has their own PKI Key store where their Private keys and digital certificates
are stored. <br />
The WhoIsIt PKI Client/Server program performs all biometric template
matching on the server. This enables users to perform complicated
mathematical PKI operations such as sign, encrypt, authenticate, verify,
using complex crypto keys and digital certificates from any location, be it
home, on the road or in the office without the need for a USB token or Smart
Card. <br />
Security is tightened because biometric template matching and PKI asymmetric
calculations are performed by the WhoIsIt biometric authentication server.
Biometric templates and private key never leave the safety of the server. <br />
<br />
The WhoIsIt PKI biometric server does not require the customer to deploy
an expensive database system. The WhoIsIt PKI biometric server is designed
for resilience and scalability. The WhoIsIt PKI biometric server can
scale to 64 processors and
parallel process matching and encryption tasks to scale with user demand. <br /><br />
The WhoIsIt PKI biometric server can be reached from anywhere on the network
or from the internet. Users can logon to Workstations and the network,
authenticate to applications. Users
can digitally sign documents, encrypt data and secure e-mail simply
by placing their finger on a fingerprint sensor. No Smart Card required<br /><br />
<br />
The WhoIsIt PKI biometric server engine offers the customer the ability
to use biometrics in place of passwords and PIN numbers to authenticate
that the user is the person he or she claims to be. <br /><br />
Users will enroll their biometric templates and register secrets
like passwords. WhoIsIt will generate, manage and store the users Private
and Public keys in the WhoIsIt biometric authentication server’s
database as part of the user’s database attributes. <br /><br />
<br />
The WhoIsIt PKI biometric authentication server will run on Windows 2000, 2003 and XP
systems.
Computer !http://www.blogger.com/profile/17986004803115235464noreply@blogger.com0tag:blogger.com,1999:blog-3705868336102557107.post-87990839966348664092012-12-03T22:01:00.001-08:002012-12-03T22:01:17.282-08:00Identifying people through behaviour patterns<div align="center">
<b><span style="font-family: Verdana; font-size: medium;">Identifying people
through behaviour patterns</span><span style="font-family: Verdana; font-size: x-small;"><br />
Munish Johar</span></b></div>
<b>
</b><br />
<div align="JUSTIFY">
<b><span style="color: red; font-family: Verdana; font-size: medium;"><img align="right" alt="ILLUSTRATION BY RAJIV KAUL" border="1" height="371" hspace="4" src="http://www.tribuneindia.com/2002/20020429/login/1lead.jpg" vspace="3" width="300" />A</span></b><span style="font-family: Verdana; font-size: x-small;">s
organisations search for more and more secure authentication methods
for user access systems, electronic commerce, and other security
applications, biometric technology is gaining increasing attention in
today’s rapidly changing technology scenario. Once the stuff that
you saw in James Bond movies, biometric technology (such as devices
that read your fingerprints, cameras that recognise your face,
software that knows your voice) is being used globally by companies
and is readily available. However the question that comes to mind
immediately is — What is Biometric?</span></div>
<div align="JUSTIFY">
<span style="font-family: Verdana; font-size: x-small;">Before giving a
formal definition to the term biometric, it is important to provide
some background information. The security field uses three different
types of authentication methods:</span></div>
<ul>
<li>
<div align="LEFT">
<span style="font-family: Verdana; font-size: x-small;">Something you know
(lowest level of security) — a password, PIN (Personal
Identification Numbers), or piece of personal information (such as
your mother's maiden name);<br />
<br />
</span></div>
</li>
<li>
<div align="LEFT">
<span style="font-family: Verdana; font-size: x-small;">Something you have
(second level of security) — a card key, smart card, or token;<br />
<br />
</span></div>
</li>
<li>
<div align="LEFT">
<span style="font-family: Verdana; font-size: x-small;">Something you do or
something you are (highest level of security) – this is a
biometric, it comprises of both physiological and/or behavioural
biometrics, including fingerprints, voiceprints, signatures, etc.<br /><br /></span></div>
</li>
</ul>
<br />
<table border="0" style="width: 100%px;">
<tbody>
<tr>
<td width="100%">
<div align="center">
<img border="0" height="295" src="http://www.tribuneindia.com/2002/20020429/login/1graphic.jpg" width="450" /><br /></div>
</td>
</tr>
<tr>
<td bgcolor="#FBF4E3" width="100%">
<div align="left">
<span style="font-family: Verdana; font-size: x-small;"><b>The above diagram
depicts the process pictorially and the accompanying points
provide a more complete explanation.</b></span></div>
<div align="left">
<span style="font-family: Verdana; font-size: x-small;"><b>A. An end user
attempts to access a protected network.</b></span></div>
<div align="left">
<span style="font-family: Verdana; font-size: x-small;"><b>B. The
application/Web server passes a request to the authentication
server to verify the end user’s identity.</b></span></div>
<div align="left">
<span style="font-family: Verdana; font-size: x-small;"><b>C. The
authentication server checks the database for the end user’s
identity profile (such as biometric templates).</b></span></div>
<div align="left">
<span style="font-family: Verdana; font-size: x-small;"><b>D. Based on the
security requested and constraints, an authentication policy is
dynamically generated.</b></span></div>
<div align="left">
<span style="font-family: Verdana; font-size: x-small;"><b>E. The
authentication server prompts the end user for his/her
credentials.</b></span></div>
<div align="left">
<span style="font-family: Verdana; font-size: x-small;"><b>F. The
credentials provided by the end user are matched against the
database.</b></span></div>
<div align="left">
<span style="font-family: Verdana; font-size: x-small;"><b>G. The
authentication sever sends a yes or no validation response.</b></span></div>
</td></tr>
</tbody></table>
<br />
<span style="font-family: Verdana; font-size: x-small;">Whilst individual
biometric devices and systems have their own operating methodology,
there are some generalisations one can make as to what typically happens
within a biometric systems implementation. The most ‘popular’
biometrics seems to gravitate at present around the following
methodologies:</span>
<b>
</b><br />
<div align="JUSTIFY">
<b><span style="font-family: Verdana; font-size: x-small;">Fingerprints: </span></b><span style="font-family: Verdana; font-size: x-small;">This
biometric involves looking at the patterns found on a fingertip. A
greater variety of fingerprint devices are available than for any other
biometric. These systems have a high accuracy rating, are quick to use,
take up little space and are relatively low cost, so they’re useful
for providing security for large numbers of users.</span></div>
<b>
</b><div align="JUSTIFY">
<b><span style="font-family: Verdana; font-size: x-small;">Hand geometry: </span></b><span style="font-family: Verdana; font-size: x-small;">Hand
geometry involves analysing and measuring the shape of the hand. This
biometric offers a very good balance of performance characteristics and
is quite easy to use.</span></div>
<b>
</b><div align="JUSTIFY">
<b><span style="font-family: Verdana; font-size: x-small;">Retina: </span></b><span style="font-family: Verdana; font-size: x-small;">A
retina-based biometric involves analysing the layer of blood vessels
found at the back of the eye. Retinal scanning can be quite accurate but
does require the user to look into a receptacle and focus on a given
point. This is not particularly convenient for people who wear glasses.
For this reason, retinal scanning is not in widespread use, even though
the technology itself can work well.</span></div>
<b>
</b><div align="JUSTIFY">
<b><span style="font-family: Verdana; font-size: x-small;">Iris: </span></b><span style="font-family: Verdana; font-size: x-small;">An
iris-based biometric, on the other hand, involves analysing features
found in the coloured ring of tissue that surrounds the pupil. Iris
scanning, on the other hand is definitely less intrusive of the
eye-related biometrics, it uses a fairly conventional camera element and
requires no close contact between the user and the reader. Iris
biometrics work with glasses in place and is one of the few devices that
can work well in identification mode.</span></div>
<b>
</b><div align="JUSTIFY">
<b><span style="font-family: Verdana; font-size: x-small;">Face: </span></b><span style="font-family: Verdana; font-size: x-small;">Face
recognition analyses the facial characteristics of a user. It requires
the use of a digital camera to develop a facial image of the user for
authentication. Because facial scanning needs an extra device not
generally included with basic personal computers, it is targeted towards
more niche areas such as network authentication.</span></div>
<b>
</b><div align="JUSTIFY">
<b><span style="font-family: Verdana; font-size: x-small;">Signature: </span></b><span style="font-family: Verdana; font-size: x-small;">Signature
verification analyses the manner in which a user signs his or her name.
Common signing features such as speed, pressure, and velocity are as
important as the finished signature's static shape. This biometric
enjoys a synergy with existing processes that other biometrics do not.
Signature verification devices are reasonably accurate in operation and
obviously lend themselves to applications where a signature is an
accepted identifier.</span></div>
<b>
</b><div align="JUSTIFY">
<b><span style="font-family: Verdana; font-size: x-small;">Voice: </span></b><span style="font-family: Verdana; font-size: x-small;">Voice
authentication is not based on voice recognition (as most of us would
think) but on voice-to-print authentication, where complex technology
transforms voice into text. Voice biometrics has the most potential for
growth; because it requires no new hardware, most personal computers
already contain a microphone. However, poor quality and ambient noise
can affect the verification process.</span></div>
<div align="JUSTIFY">
<span style="font-family: Verdana; font-size: x-small;">No single biometric
technology has dominated the market. Different technologies are being
used for the same applications. To gain widespread acceptance in
businesses, multiple individual biometrics methods must coexist in a
single system solution. Initially, these techniques were employed
primarily in specialist high security applications, however we are now
seeing their use and proposed use in a much broader range of public
facing situations. Future use of biometric technologies may include:</span></div>
<ul>
<li>
<div align="LEFT">
<span style="font-family: Verdana; font-size: x-small;">ATM machine use.<br />
</span></div>
</li>
<li>
<div align="LEFT">
<span style="font-family: Verdana; font-size: x-small;">Workstation and
network access<br />
</span></div>
</li>
<li>
<div align="LEFT">
<span style="font-family: Verdana; font-size: x-small;">Travel and tourism<br />
</span></div>
</li>
<li>
<div align="LEFT">
<span style="font-family: Verdana; font-size: x-small;">Internet transactions<br />
</span></div>
</li>
<li>
<div align="LEFT">
<span style="font-family: Verdana; font-size: x-small;">Telephone transactions<br />
</span></div>
</li>
<li>
<div align="LEFT">
<span style="font-family: Verdana; font-size: x-small;">Public identity cards</span></div>
</li>
</ul>
<span style="font-family: Verdana; font-size: x-small;">In the past few years, biometric
technology has rapidly pushed through barriers that had slowed its
adoption in mainstream environments, performance, accuracy and
reliability have steadily increased amongst all types of biometrics
methods and the prices of the capture devices used by this technology
have plunged, making biometrics an attractive addition to security
systems. For many companies, biometric systems are the perfect answer to
the expensive and time-consuming problems of fraud, theft, and access
control. Technical and financial considerations aside, biometrics can
pose a significant cultural challenge and introducing fingerprint
scanners to every desktop or a facial recognition based entry system has
to be done sensitively and carefully. Once the exclusive preserve of
sci-fi books and movies, biometrics now has to be considered as one of
the many challenges of modern day management.</span><br />
<br />Computer !http://www.blogger.com/profile/17986004803115235464noreply@blogger.com0tag:blogger.com,1999:blog-3705868336102557107.post-10127536039890264742012-12-03T21:55:00.002-08:002012-12-03T21:55:30.652-08:00Novell's BorderManager Authentication Service: Arm Your Network for Remote Users<h1>
Novell's BorderManager Authentication Service: Arm Your Network for Remote Users</h1>
<br />
<div id="mainbody">
If you were the network administrator at a small bicycle-accessory
manufacturer in Yuma, Arizona, how would you solve the following
challenge? The company's president has recently hired an inventor and a
research and development firm. Now it's your job to provide both the
inventor, who works out of his home in White Plains, New York, and the
research and development firm, whose facility is located in Dallas,
Texas, with remote access to your company's network.<br />
Because the information exchanged between Yuma, White Plains, and
Dallas will be confidential, the remote-access system you create must be
secure. In addition, you must be able to expand the remote-access
system rapidly and to virtually any size. After all, you do not know how
fast the company will grow or how big the company will become once it
begins to market new products.<br />
The growing number of companies that have employees who
telecommute--whether they work at home, on the road, or at a branch
office--has left many network administrators facing this challenge. How
do you address the security problems inherent in providing network
services to remote users, not to mention the difficulties of managing an
extended network? Novell's BorderManager Authentication Service
integrates Remote Authentication Dial-In User Service (RADIUS) with
Novell Directory Services (NDS) to offer security and other capabilities
you need to set up and manage remote access to your company's network.<br />
This article explains how BorderManager Authentication Service
integrates RADIUS with NDS to offer an easily managed RADIUS solution
that provides authentication, authorization, and accounting services for
remote users. This article also explains several additional features of
BorderManager Authentication Service--features that make it easy for
you to enable remote access for any number of remote users and to manage
their user accounts.<br />
<a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107" name="Aa12aed"></a><h4>
WHAT IS RADIUS?</h4>
RADIUS is the
authentication, authorization, and accounting protocol that Livingston
Enterprises Inc. (now Lucent Technologies) developed in collaboration
with the Internet Engineering Task Force (IETF). RADIUS supports dial-in
user authentication through Point-to-Point Protocol (PPP), Password
Authentication Protocol (PAP), Challenge Handshake Authentication
Protocol (CHAP), UNIX login, and other authentication protocols that
implement a username and password.<br />
RADIUS transports authentication, authorization, and configuration
information between a network access server and an authentication
server, both of which must be RADIUS compliant. A network access server
accepts dial-in access from telephone lines via modems or from
Integrated Services Digital Network (ISDN) lines via ISDN terminal
adapters. (For a list of vendors that supply RADIUS-compliant network
access servers, visit the <i>NetWare Connection</i> World-Wide Web site at <a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107">http://www.nwconnection.com</a>.)<br />
An authentication server, on the other hand, stores a database of
usernames, passwords, authorization information, and configuration
information. In addition, the authentication server can be the same
server that is running the RADIUS protocol--the server that is known as
the RADIUS server. (See Figure 1.)<br />
<i>Figure 1: Dial-access network using the RADIUS protocol</i><br />
<img alt="Click to enlarge" src="http://support.novell.com/techcenter/articles/img/nc1998_1202.gif" style="cursor: pointer;" width="598" /><br />
When a network access server sends a request to a RADIUS server, the
RADIUS server first checks the IP address of the network access server
making the request. If this IP address does not belong to one of the
network access servers with which the RADIUS server has been configured
to communicate, the RADIUS server does not respond to the request.<br />
According to the IETF's Request for Comments (RFC) 2138, if a RADIUS
server receives a request from a network access server that is not on
the RADIUS server's list of configured network access servers, the
RADIUS server should log the access attempt and then silently discard
the request. When silently discarding a request, the RADIUS server
simply does not respond to the requesting network access server. (To
read RFC 2138, go to ftp://ftp.livingston.com/pub/radius/rfc2138.txt.)<br />
Since RFC 2138 recommends, but does not require, RADIUS applications
to log unauthorized attempts to access your company's network, not all
RADIUS applications perform this function. However, BorderManager
Authentication Service does, providing you with information that allows
you to identify repeated attempts to gain unauthorized network access.<br />
<a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107" name="Aa12bed"></a><h4>
SECRET, SECRET, WHO'S GOT THE SECRET?</h4>
Network
access servers and RADIUS servers use a shared secret to protect each
user's password and, at the same time, to validate one another's
identity. A shared secret is a well-chosen string of alphanumeric
characters that becomes the encryption key these servers use to keep a
user's password secure as it travels between the servers.<br />
Like a well-chosen password, a well-chosen shared secret should be
one that cannot be easily guessed and that is at least eight characters
long, depending on the RADIUS server you are using. For example, if you
were using a server running BorderManager Authentication Service as your
company's RADIUS server, the shared secret you create should be a
meaningless string of 20 to 30 alphanumeric characters.<br />
When a user dials in to a network protected by RADIUS, he or she is
prompted for a username and password. After obtaining this information
(either directly from the user or through this user's dial-in software,
depending on the type of connection being established), the network
access server creates an access request packet that includes the
username and password. Using an encryption method based on MD5, the
Rivest-Shamir-Adleman (RSA) message digest algorithm, the network access
server then uses the encryption key obtained from the shared secret to
encrypt the user's password before sending the access request packet to
the RADIUS server. (See Figure 1.)<br />
When the RADIUS server receives the access request packet, this
server uses the encryption key generated from the shared secret to
decrypt the user's password. The RADIUS server then uses the database
stored on the authentication server to authenticate this user. For
example, if you were using a server running BorderManager Authentication
Service as your company's RADIUS server, this server would compare the
username and password against the usernames and passwords stored in your
company's NDS database.<br />
If the requesting network access server did not encrypt the user's
password using the correct shared secret, the RADIUS server could not
use the decrypted password to authenticate the user. In this case, the
RADIUS server would prepare an access reject packet and send it to the
network access server. In other words, if the requesting network access
server did not have the shared secret, the RADIUS server would deny any
requests it receives from that network access server. The RADIUS server
would also prepare an access reject packet if any of the specified user
requirements were not met--for example, if the user mistyped his or her
username.<br />
If the user were successfully authenticated, the RADIUS server would
send an access accept packet to the network access server. This packet
would contain all of the information necessary to deliver the network
services the user is authorized to receive.<br />
In addition to protecting your company's network via a shared secret
and encrypted passwords, a RADIUS server can be configured to instruct
the network access server to "hang up" on a user and call the user back
at a specified telephone number. This callback feature is useful if you
want to require remote users to access your company's network only from
specific locations.<br />
<a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107" name="Aa12ced"></a><h4>
IT'S BETTER WITH BORDERMANAGER AUTHENTICATION SERVICE</h4>
The
IETF is in the process of establishing RADIUS as an official Internet
standard. (See RFC 2138 and 2139. To read RFC 2139, go to
ftp://ftp.livingston.com/pub/radius/rfc2139.txt.) However, vendors such
as Novell have already made RADIUS the de facto industry standard.
RADIUS performs even better when used in conjunction with BorderManager
Authentication Service, which gives you flexibility to do the following:<br />
<ul>
<li>Choose a platform<br />
</li>
<li>Choose dial-in software<br />
</li>
<li>Expand your company's remote-access system as the number of users grows<br />
</li>
<li>Update your company's remote-access system as technologies change<br />
</li>
</ul>
<a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107" name="Aa12ded"></a><h5>
Platform of Choice: NetWare or Windows NT</h5>
You
can install BorderManager Authentication Service on a server running
NetWare 4.11 or above or on a server running Windows NT 4.0 or above.
This cross-platform support means you can use NetWare or Windows NT
servers running BorderManager Authentication Service together on the
same network. You can also substitute a NetWare server for a Windows NT
server, and vice versa.<br />
<a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107" name="Aa12fed"></a><h5>
Dial Me Up</h5>
BorderManager
Authentication Service provides support for a variety of dial-in
software. For example, BorderManager Authentication Service works with
terminal emulation software, such as Hyper Terminal, and with software
that supports PPP, such as the dial-in software included with Windows 95
and Windows NT 4.0. Since BorderManager Authentication Service doesn't
require you to implement a particular type of dial-in software, the
software you install on a user's workstation depends mainly on the type
of RADIUS-compliant network access server that provides the user with
remote access to your company's network.<br />
For example, if BorderManager Authentication Service is running on a
NetWare 4.11 server and remote users want to access NetWare services,
both the network access server and the dial-in software you choose must
support IPX. Also, like the network access server on your company's
remote-access system, the dial-in software you choose must support
authentication by username and password.<br />
<a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107" name="Aa12ged"></a><h5>
Room to Grow With NDS</h5>
In addition to
allowing you to choose from a variety of dial-in software, BorderManager
Authentication Service allows you to add a virtually unlimited number
of users to your company's remote-access system. When you install
BorderManager Authentication Service, the installation program copies
RADIUS server files to one or more of your company's NetWare or Windows
NT servers. These servers then become RADIUS servers. The installation
program also extends the NDS schema to accommodate dial-in access to
your company's network, thus enabling the RADIUS server (or servers) to
authenticate remote users through the NDS database.<br />
Since BorderManager Authentication Service is fully integrated with
NDS and includes a snap-in module for Novell's NetWare Administrator
(NWADMIN) utility, you can assign remote-access privileges--to
individual users or to groups of users--through the same database you
use to manage your company's network. You can also configure the NDS
database to accommodate a virtually unlimited number of remote users.<br />
After you have installed BorderManager Authentication Service, you
must create at least one Dial Access System object in the NDS tree to
provide dial-in access to your company's network. (You must also define a
password for the Dial Access System object. To find out what this
password does and how to keep it hidden from users who have access to
the RADIUS server console, see "<a href="http://support.novell.com/techcenter/articles/nc1998_12b.html#l12podb">Where Did It Go?</a>".)
The Dial Access System object contains the configuration information
that RADIUS servers on the network use to return connection information
to requesting network access servers.<br />
Whether you have one or more RADIUS servers, you can use the Dial
Access System object to manage all of them. This capability allows you
to add RADIUS servers to your company's remote-access system without
significantly increasing the amount of time it takes to manage that
system.<br />
<a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107" name="Aa12ied"></a><h5>
Keeping Up With Changing Technologies</h5>
BorderManager
Authentication Service also allows you to incorporate new technologies
as they become available. Along with the Dial Access System object,
Novell recommends that you create a Dial Access Profile object, which
allows you to configure a common set of attributes for all remote users,
rather than configuring these attributes for each container object or
for each User object. Attributes define specific authentication,
authorization, and configuration options that are available to remote
users.<br />
For example, User-Password is an authentication attribute, Callback
is an authorization attribute, and Framed Routing is a connection
attribute. If you wanted users to receive PPP service, you would create a
Dial Access Profile object and define the Framed value for the Service
Type attribute and the PPP value for the Framed Protocol attribute. (For
more information about defining attributes, see "<a href="http://support.novell.com/techcenter/articles/nc1998_12b.html#k12wtsr">Creating a Dial Access Profile Object</a>")<br />
BorderManager Authentication Service uses the attribute dictionary
file to store information about a collection of attributes. The
attribute dictionary file stores information about all of the generic
and vendor-specific RADIUS attributes currently supported by
BorderManager Authentication Service.<br />
Generic RADIUS attributes consist of the attributes listed in RFC
2138, including User-Name, User-Password, CHAP-Password, Network Access
Server (NAS) IP-Address, Framed Routing, and Framed-IPX-Network. Since
many vendors have designed RADIUS-compliant network access servers to
enable attributes outside the scope of RFC 2138, BorderManager
Authentication Service's attribute dictionary file also stores
information about many of these vendor-specific attributes.<br />
BorderManager Authentication Service supports current technologies
via the vendor-specific attributes in the attribute dictionary file.
Novell plans to make emerging technologies available by extending the
attribute dictionary file to include new attributes that vendors offer
in future products, as well as attributes that the IETF might add as it
extends the RADIUS standard. With BorderManager Authentication Service,
you can incorporate emerging technologies by simply downloading the
latest attribute dictionary file from Novell's web site and then adding
the attributes you want to enable to the Dial Access Profile object.
(For more information about how to add attributes to a Dial Access
Profile object, see "<a href="http://support.novell.com/techcenter/articles/nc1998_12b.html#k12wtsr">Creating a Dial Access Profile Object</a>".)<br />
<a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107" name="Aa12jed"></a><h4>
BUT THAT'S NOT ALL</h4>
In addition to the features already mentioned, BorderManager Authentication Service offers the following benefits:<br />
<ul>
<li>The ability to outsource remote access<br />
</li>
<li>The ability to assign separate dial-in passwords<br />
</li>
<li>Group-based management<br />
</li>
<li>Dial access system caching<br />
</li>
<li>Accounting and audit logs<br />
</li>
</ul>
<a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107" name="Aa12ked"></a><h5>
Your Place or Mine?</h5>
A RADIUS
server can act as a proxy RADIUS server for other RADIUS servers. For
example, a server running BorderManager Authentication service can act
as a proxy RADIUS server or can communicate with other RADIUS servers
that are acting as proxy RADIUS servers. As a result, you can outsource
remote access by contracting with an Internet Service Provider (ISP)
that provides RADIUS proxy services. (To view a list of some ISPs that
provide RADIUS proxy services, visit the <i>NetWare Connection</i> web site at <a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107">http://www.nwconnection.com</a>.)<br />
Outsourcing remote access through an ISP can save you time and money
because you do not have to purchase, maintain, and manage costly
hardware such as network access servers, modems, ISDN terminals, and
routers. For example, suppose that you created a RADIUS server by
installing BorderManager Authentication Service on a NetWare 5 server
and that you contracted with an ISP to provide remote access to your
company's network. In this case, remote users would dial in to a
RADIUS-compliant network access server that would be owned and
maintained by your ISP. (See Figure 2.)<br />
<i>Figure 2: Dial-access network that uses an ISP to provide RADIUS proxy services</i><br />
<img alt="Click to enlarge" src="http://support.novell.com/techcenter/articles/img/nc1998_1203.gif" style="cursor: pointer;" width="598" /><br />
The ISP's network access server would then route a user's request for
access to a proxy RADIUS server, which would also be owned and
maintained by your ISP. The ISP's proxy RADIUS server would use the
encryption key derived from the shared secret to encrypt the user's
password before sending the access request packet to your company's
RADIUS server.<br />
Upon receiving the access request packet, your company's RADIUS
server would decrypt the user's password and authenticate the user
through the NDS database. The RADIUS server would then send an access
accept packet to the ISP's proxy RADIUS server, which would forward this
packet to the ISP's network access server. The network access server,
in turn, would establish the connections necessary to provide the user
with any network services he or she was authorized to access.<br />
In addition to running BorderManager Authentication Service, you
could run other services on the NetWare 5 server, including NDS. In
other words, the NetWare 5 server could do double-duty by acting as both
a RADIUS server and an authentication server. (Alternately,
BorderManager Authentication Service includes a two-user version of
NetWare 4.11, so you could dedicate a server to RADIUS authentication
without having to purchase additional software for that server.)<br />
<a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107" name="Aa12led"></a><h5>
May I See a Second ID?</h5>
In addition to
providing outsourcing capabilities, BorderManager Authentication
Service allows you to assign remote users two passwords: one for
accessing the network and the other--the NDS password--for accessing
network resources. After a server running BorderManager Authentication
Service sends an access accept packet to a network access server located
on your company's network, the user is granted only the ability to
connect to the network. If an ISP provides the network access server the
user dials in to, the user can access only the ISP's network. In either
case, the user must log in a second time to receive access to the
network resources (such as NetWare file and print services) available to
her or him through NDS.<br />
When you create a Dial Access System object by using the snap-in
module for the NWADMIN utility, you are prompted to choose one of the
following password options:<br />
<ul>
<li>Use Separate Dial-Access Passwords<br />
</li>
<li>Use Novell Directory Services Passwords<br />
</li>
</ul>
If you choose the Use Separate Dial-Access Passwords option,
you can assign remote users separate, non-NDS passwords to access your
company's network. Since all network access servers, RADIUS servers, and
proxy RADIUS servers have access to users' clear text passwords, this
option provides an extra level of security if an ISP owns the hardware
that provides dial-in access to your company's network. In this case,
the ISP's network access server and proxy RADIUS server would have clear
text access only to non-NDS passwords. The NDS passwords that grant
users access to network resources would not be available to these
servers.<br />
You should select the Separate Dial-in Passwords option if your
company's network access server or your ISP's network access server
sends access request packets via CHAP. CHAP servers require the RADIUS
server to access the authenticating password in clear text, and NDS
passwords are not available in clear text.<br />
If you choose the Use Novell Directory Services Passwords option,
remote users can use the same password (their NDS password) for both
logins. This option is convenient for remote users because they have to
remember only one password.<br />
<a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107" name="Aa12med"></a><h5>
Join the Group</h5>
BorderManager
Authentication Service's group-based management feature makes it easier
for you to control remote users' access to network resources. With
group-based management, you can control remote users' access to network
resources such as network access servers, firewalls, and high-speed
connections via Dial Access System objects and Group objects, rather
than by controlling access on a user-by-user basis.<br />
To use group-based management in BorderManager Authentication
Service, you use the snap-in module for the NWADMIN utility to create a
separate Dial Access System object for each resource to which you want
to control access. You then configure separate RADIUS servers to access
each Dial Access System object you created. (Each RADIUS server can
access only one Dial Access System object. For more information, see "<a href="http://support.novell.com/techcenter/articles/nc1998_12b.html#l12podb">Where Did It Go?</a>").<br />
You also create a separate Group object for each Dial Access System
object, and to each Group object, you assign rights to one of the Dial
Access System objects. Finally, you add individual User objects to the
Group objects.<br />
For example, suppose you were the network administrator at the
bicycle-accessory manufacturer mentioned earlier and you wanted to grant
the inventor in White Plains and two of the researchers in Dallas
access to a particular firewall. You would first use the NWADMIN utility
to create a Dial Access System object (called, for example, FWALL1) for
this firewall and to configure a RADIUS server to access that object.<br />
Next, you would create a Group object (called, for example,
FWALL1users) that granted access rights to the FWALL1 object. You would
then add the inventor and the two researchers to the FWALL1users object.<br />
Just as you can add any number of users to a Group object in general,
you can add any number of remote users to a Group object that grants
users rights to a Dial Access System object. Conversely, you can add an
individual remote user to any number of Group objects that control users
access to Dial Access System objects.<br />
For example, suppose you wanted the entire staff of the research and
development firm your company hired to have access to a particular set
of network access servers on your company's network. You could create a
Dial Access System object for that set of network access servers,
configure a RADIUS server to access the Dial Access System object, and
create a Group object (called, for example, RDSTAFF) with rights to the
Dial Access System object. You could then add every member of the
research and development staff to the RDSTAFF object, including the two
researchers who were previously granted access to the firewall through
the FWALL1users object. If the research and development staff grew, you
could add the new employees to the RDSTAFF object as well.<br />
<a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107" name="Aa12ned"></a><h5>
Caching In on BorderManagerAuthentication Service</h5>
BorderManager
Authentication Service's dial-access caching feature allows your
company's RADIUS server to access authorization, authentication, and
configuration information quickly and easily. The first time a user
dials in to your company's network, BorderManager Authentication Service
searches the Dial Access System object for the information necessary to
authenticate the user and to provide the network services he or she is
authorized to receive. BorderManager Authentication Service then stores
this information in a dial-access cache.<br />
With dial-access caching, users don't need to wait for BorderManager
Authentication Service to search the Dial Access System object for
authentication, authorization, and configuration information every time
they request access to the network. Instead, BorderManager
Authentication Service accesses and delivers this information from
cache, which both speeds up remote access to and reduces traffic on your
company's network.<br />
In addition, BorderManager Authentication Service checks the Dial
Access System object each minute. If this object has been modified,
BorderManager Authentication Service updates the authentication,
authorization, and configuration information stored in its dial-access
cache to reflect the change. As a result, only currently authorized
connections and access to network services are available to remote
users.<br />
<a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107" name="Aa12oed"></a><h5>
Accounting and Auditing Made Easy</h5>
Dial-access
caching may facilitate efficient dial-in connections to your company's
network, but how do you get information about these connections? To
provide you with the connection information you need, BorderManager
Authentication Service generates accounting and auditing logs that
record this information.<br />
Upon installation, BorderManager Authentication Service automatically
enables RADIUS accounting and auditing services. By default, these
services are hosted on the same physical server as RADIUS authentication
services.<br />
BorderManager Authentication Service's accounting logs, like all RADIUS accounting logs, offer the following information:<br />
<ul>
<li>Which users are using remote-access services<br />
</li>
<li>When users are using remote-access services<br />
</li>
<li>How long users are using remote-access services<br />
</li>
</ul>
You can use the information stored in BorderManager
Authentication Service's accounting logs to help you troubleshoot
problems, perform a statistical analysis, and provide your company's
billing department with information about user accounts.<br />
When a RADIUS session begins, the network access server sends an
accounting request packet to the RADIUS server. (A session officially
begins when the network access server first provides service to the user
and officially ends when the service ends.) The accounting request
packet contains information such as the user's username and password and
the type of service the network access server is delivering to this
user. The RADIUS server logs this information in an ASCII text file. The
RADIUS server then returns a message to the network access server,
acknowledging that the accounting request packet was received.<br />
Similarly, when the session ends, the network access server sends
another accounting request packet that contains the user's username and
password, the type of service that was delivered to the user, and other
information. The RADIUS server logs this information in an ASCII text
file and once again sends the network access server a message,
acknowledging receipt of the accounting request packet. (If you are
running BorderManager Authentication Service on RADIUS proxy servers in
your company's remote-access system, you should be aware that an
accounting request packet is not forwarded but is recorded on the first
RADIUS server that receives this packet.)<br />
By default, RADIUS accounting log files are stored in the
comma-delimited format. (To find out how you change the default
parameters for RADIUS accounting and auditing services, see "<a href="http://support.novell.com/techcenter/articles/nc1998_12b.html#d12pohn">Setting Accounting and Auditing Parameters</a>".) The accounting log files are named <i>YYYYMMDD</i>.DAT.<i>YYYY</i> is the year,<i>MM</i> is the month, and <i>DD</i> is the day the accounting log rollover period begins.<br />
For example, if you set the accounting log rollover period to
Monthly, and tomorrow's date were January 1, 1999, the accounting log
file that contained information about today's RADIUS sessions would be
named 19981201.DAT. In this case, a new accounting log file named
19990101.DAT would be created at midnight, and information about the
RADIUS sessions that occurred during the month of January would be
recorded in this file. By default, accounting log files are set to roll
over on a daily basis, but you can also set these files to roll over at
the beginning of each week or at the beginning of each month. (See "<a href="http://support.novell.com/techcenter/articles/nc1998_12b.html#d12pohn">Setting Accounting and Auditing Parameters</a>".)<br />
You can import the information stored in accounting log files into
database and spreadsheet applications that support comma-delimited
files, including Microsoft Excel. (By default, RADIUS accounting log
files are located in the SYS:\ETC\RADIUS\ACCT directory if you are
running BorderManager Authentication Service on a NetWare server. If you
are running BorderManager Authentication Service on a Windows NT
server, these files are located in the C:\Novell\BMAS\ACCT directory by
default.)<br />
RADIUS auditing log files provide a record of all login attempts,
whether successful or unsuccessful. Although auditing log files are
typically used for troubleshooting, these files are also a reliable
means of identifying the attempts of unauthorized users to access your
company's network. In addition, auditing log files provide information
for use in accounting systems that are based on remote connection time.<br />
RADIUS auditing log files are named <i>YYYYMMDD</i>.log.<i>YYYY</i> is the year,<i>MM</i> is the month, and <i>DD</i>
is the day the auditing log rollover period begins. By default, these
files are located in the SYS:\ETC\RADIUS\LOG directory on a NetWare
server and in the C:\NOVELL\BMAS\LOG directory on a Windows NT server.<br />
Unlike accounting log files, which you can set to begin at midnight
on the first day of each week or each month, auditing log files always
begin at midnight on each day. A RADIUS server stores these daily
auditing log files for a specified interval and deletes auditing log
files that exceed that interval. (Accounting log files are not deleted.)<br />
For example, suppose today were December 17, 1998 and the auditing
log interval were set to seven days (as it is by default). When the
19981217.LOG file was created at midnight this morning, the 19981210.LOG
file would have been automatically deleted. You can set the rollover
interval for RADIUS auditing log files to any number of days. (See "<a href="http://support.novell.com/techcenter/articles/nc1998_12b.html#d12pohn">Setting Accounting and Auditing Parameters</a>.")<br />
<a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107" name="Aa12ped"></a><h4>
CONCLUSION</h4>
Whether you are adding
remote-access services to a multiplatform WAN or to a small LAN, such as
the network belonging to our hypothetical bicycle-accessory
manufacturer, BorderManager Authentication Service provides more than
RADIUS security. Cross-platform capabilities, an extendable attribute
dictionary file, group-based management, and dial-access system caching
are only a few of the features that make BorderManager Authentication
Service's RADIUS solution unique.<br />
With BorderManager Authentication Service, you can manage your
company's remote-access system just as you manage the rest of your
company's network--through NDS and the NWADMIN utility. You can provide
dial-in access to remote users via any network access server that is
RADIUS compliant. And in many cases, these users can even access your
company's network by using the dial-in software they are most
comfortable with.<br />
For more information about BorderManager Authentication Service, visit Novell's web site at <a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107">http://www.novell.com/bordermanager/bmas</a>.
You can also participate in Novell's "Try Before You Buy" program. You
can download a trial version of BorderManager Authentication Service
from Novell's web site at <a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107">http://www.novell.com/bordermanager/bmas/tbyb.html</a>.<br />
<i>Cheryl Walton works for Niche Associates, an agency that
specializes in writing and editing technical documents. Niche Associates
is located in Sandy, Utah.</i><br />
<i>NetWare Connection,</i> December 1998, pp. 21-30<br />
<a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107" name="l12podb"></a><h3>
Where Did It Go?</h3>
When you use the
NetWare Administrator (NWADMIN) utility to create a Dial Access System
object, you must give that object a password. BorderManager
Authentication Service uses the password you create to protect the
encryption keys that, in turn, protect both remote users' passwords and
Remote Authentication Dial-In Service (RADIUS) shared secrets. In
addition, RADIUS servers use the Dial Access System password to log in
to the Dial Access System object, which allows RADIUS servers to access
authentication and connection information through Novell Directory
Services (NDS). Like the RADIUS shared secret, the Dial Access System
password should be a random string of alphanumeric characters that is
from 20 to 30 characters.<br />
BorderManager Authentication Service's RADIUS service functions as a
NetWare Loadable Module (NLM). As a result, RADIUS is on the NetWare
server, but is not available and active until you load RADIUS. To load
BorderManager Authentication Service's RADIUS services on a NetWare 4.11
or above server, type the following command at the server console:<br />
<pre class="code">LOAD RADIUS
</pre>
After you enter this command, you will be prompted to enter the name
and the password of the Dial Access System object that the RADIUS server
will log in to.<br />
When you install BorderManager Authentication Service, the
installation program includes the LOAD RADIUS command in the
AUTOEXEC.NCF file so that RADIUS will load automatically each time you
reboot the server. Unless you edit the AUTOEXC.NCF file, however, you
will be prompted to supply the Dial Access System object name and
password each time RADIUS is loaded (as you are when you load the RADIUS
services manually). You must add the following lines to the
AUTOEXEC.NCF file:<br />
<pre class="code">"name=(<i>Dial Access System object name</i>)""
"password=(<i>Dial Access System object password</i>)"
</pre>
You replace <i>Dial Access System object name</i> and <i>Dial Access System object password</i> with the actual name of your company's object and the actual password.<br />
Although editing the AUTOEXEC.NCF file allows RADIUS to load
unattended whenever the server is rebooted, this option also makes the
Dial Access System object password available to anyone with access to
your server's console. Fortunately, BorderManager Authentication Service
allows you to hide the Dial Access System object password. You simply
enter the following command at the server console after you load RADIUS
the first time.<br />
<pre class="code">RADIUS <i>Password</i> SET
</pre>
The RADIUS Password SET command stores the Dial Access System
password in an encrypted form, preventing users who have access to the
server console from accessing the Dial Access System password.<br />
If you hide this password, only the name of the Dial Access System
object must be specified if RADIUS is loaded. In other words, if the
server went down while you were away, RADIUS could be loaded in your
absence even if the person rebooting the server were not authorized to
know the Dial Access System password.<br />
If you change the Dial Access System password after hiding the
previous Dial Access System password, you must either enter a SET
command with the new password at the server console, or you must clear
the previous password and enter the new password each time RADIUS is
loaded. To clear a previously hidden password, type the following
command at the server console:<br />
<pre class="code">RADIUS <i>Password</i> CLEAR
</pre>
<i>NetWare Connection</i>, December 1998, p. 26<br />
<a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107" name="k12wtsr"></a><h3>
Creating a Dial Access Profile Object</h3>
To
create a Dial Access Profile object for BorderManager Authentication
Service, you use the NetWare Administrator (NWADMIN) utility to complete
the following steps:<br />
<ol>
<li>Select or create the Organizational Unit (OU) object in which you want the Dial Access Profile object to reside.<br />
</li>
<li>Select Create from the Object menu. The New Object dialog box appears.<br />
</li>
<li>Select Dial Access Profile, and then click the OK button.<br />
</li>
<li>Enter a name for the Dial Access Profile object, and then click the Create button.<br />
</li>
<li>Double-click the Dial Access Profile object you just created. The Dial Access Profile dialog box appears.<br />
</li>
<li>Select Attributes, and click the Add button.<br />
</li>
<li>Double-click either the Generic option or one of the
vendors listed below the Vendor Specific option. If you select the
Generic option, a list of attributes required by Request For Comments
(RFC) 2138 appears. These attributes include User-Name, User-Password,
Challenge Handshake Authentication Protocol (CHAP) Password, Network
Access Server (NAS) IP-Address, Framed Routing, and Framed-IPX-Network.
Click the attributes you want to implement.<br />
To choose vendor-specific attributes, click the vendor that made your
company's or your ISP's network access server. A list appears,
containing the extended attributes that particular network access server
supports. Click the attributes you want to implement. If your company
uses more than one type of network access server, you can add other
vendors' attributes as well. (You need to create only one Dial Access
Profile object, even if your company has several network access
servers.)<br />
</li>
<li>Select the attributes you want to add from the list, and click the OK button.<br />
</li>
<li>When you are finished adding attributes, uncheck the Add Another Attribute box, and click the OK button.<br />
</li>
<li>Click the OK button again.<br />
</li>
</ol>
If the vendor of your RADIUS-compliant network access server
has extended attributes and that vendor does not appear in the list of
extended attributes supported by BorderManager Authentication Service,
you can request that Novell make the vendor's attribute extensions
available: Simply send an e-mail message to Novell at <a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107">BMASComments@Novell.com</a>.<br />
You can also use this e-mail address to request that Novell add
attributes to the attribute dictionary file. (Note: The RADIUS server
does not recognize attributes that your network access server does not
support.) Novell plans to update the attribute dictionary file and make
these updates available on the Novell Support Connection World-Wide Web
site at http://support.novell.com/products/bmas. If you are a
BorderManager Authentication Service customer, you may want to check
this site periodically.<br />
<i>NetWare Connection</i>, December 1998, p. 28<br />
<a href="http://www.blogger.com/blogger.g?blogID=3705868336102557107" name="d12pohn"></a><h3>
Setting Accounting and Auditing Parameters</h3>
BorderManager
Authentication Service allows you to configure its accounting and
auditing services. The following is a list of accounting and auditing
parameters for BorderManager Authentication Service and the default
settings for these parameters:<br />
<ul>
<li>serverType = [accounting/authentication] (The default setting is both accounting and authentication.)<br />
</li>
<li>acctPath = <<i>RADIUS accounting directory</i>> (The default setting is SYS:\ETC\RADIUS\ACCT for NetWare and C:\NOVELL\BMAS\ACCT for Windows NT.)<br />
</li>
<li>acctPort = <<i>UDP port for RADIUS accounting</i>> (The default setting is 1646.)<br />
</li>
<li>fileFormat = [standard/comma] (The default setting is comma, meaning comma delimited.)<br />
</li>
<li>rollOver = [daily/weekly/monthly] (The default setting is daily.)<br />
</li>
<li>RADIUS SystemLog [On\Off] (The default setting is On.)<br />
</li>
<li>RADIUS SystemLog <<i>file_location</i>> (The default setting is SYS:\ETC\RADIUS\LOG for NetWare and C:\NOVELL\BMAS\LOG for Windows NT.)<br />
</li>
<li>RADIUS SystemLogInterval <<i>number_of_days</i>> (The default setting is 7.)<br />
</li>
</ul>
To change these auditing and accounting parameters when
BorderManager Authentication Service is running on a NetWare 4.11 or
above server, you enter the following commands at the server console:<br />
<ul>
<li>UNLOAD RADIUS<br />
</li>
<li>LOAD RADIUS <i>parameter</i><br />
</li>
</ul>
For example, if you wanted to set the accounting log file to
rollover on a monthly basis, you would unload RADIUS services and enter
the following command at the server console:<br />
<ul>
<li>LOAD RADIUS rollOver = monthly<br />
</li>
</ul>
To change RADIUS accounting parameters for BorderManager
Authentication Service on a Windows NT server, you would complete the
following steps:<br />
<ol>
<li>Select Settings from the Start menu on the Windows NT server console.<br />
</li>
<li>Select Control Panel, and then double-click Services.<br />
</li>
<li>Select BorderManager Authentication Service.<br />
</li>
<li>Click Stop, and then click Startup.<br />
</li>
<li>In the Log On As field, enter the username you use to authenticate to BorderManager Authentication Service.<br />
</li>
<li>Enter your password.<br />
</li>
<li>Select Automatic from the Startup Type list.<br />
</li>
<li>Enter parameter options in the Startup Parameters field.<br />
</li>
<li>After you enter the parameter options, click Start.<br />
</li>
</ol>
<i>NetWare Connection</i>, December 1998, p. 30<br />
* <i>Originally published in Novell Connection Magazine</i><br />
<hr />
<div class="flyspec">
Disclaimer</div>
<div class="flyspec">
The origin of this information may be
internal or external to Novell. While Novell makes all reasonable
efforts to verify this information, Novell does not make explicit or
implied claims to its validity.</div>
</div>
<br />Computer !http://www.blogger.com/profile/17986004803115235464noreply@blogger.com0tag:blogger.com,1999:blog-3705868336102557107.post-70755431456439413822012-10-03T18:14:00.000-07:002012-10-03T18:14:04.554-07:00DHCP server feature ใน Cisco router<div class="MsoNormal">
<span style="font-family: Garamond;">DHCP server feature </span><span lang="TH" style="font-family: "Angsana New"; font-size: 14pt;">ใน </span><span style="font-family: Garamond;">Cisco router</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "Angsana New"; font-size: 14pt;">ใน </span><span style="font-family: "Angsana New"; font-size: 14pt;">Cisco IOS version <span lang="TH">ตั้งแต่ </span>12.0 <span lang="TH">เป็นต้นมา </span>Cisco <span lang="TH">ได้เพิ่ม </span>feature <span lang="TH">หลายๆอย่างเพื่อรองรับรูปแบบ </span>office <span lang="TH">ที่เป็นขนาดเล็ก ที่ </span>Cisco <span lang="TH">เรียกว่า </span>SOHO (Small Office Home Office)<span> </span><span lang="TH">สำหรับตอนนี้ผมจะเขียนถึง </span><span> </span>feature <span lang="TH">นึงที่ค่อนข้อางเป็นหัวใจของการสื่อสานในระบบ </span>network <span lang="TH">นั่นก็คือ </span><span> </span>DHCP (Dynamic Host Control Protocol) <span lang="TH">ซึ่งโดยปกติ </span><span> </span>features <span lang="TH">นี้จะพบได้ในรูปแบบที่เป็น </span>server <span lang="TH">แต่หลายคนอาจจะยังไม่ทราบว่าเราสามารถ </span>configure <span lang="TH">ให้ </span>router <span lang="TH">ทำงานเพื่อทดแทน </span>DHCP server <span lang="TH">ได้ </span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "Angsana New"; font-size: 14pt;">ผมคงเว้นเรื่องรายละเอียดของ </span><span style="font-family: "Angsana New"; font-size: 14pt;">DHCP <span lang="TH">เพราะหลายๆคนน่าจะทราบดีแล้ว หรือถ้าต้องการทราบก็สามารถหาอ่านได้โดยง่ายจาก </span>Internet <span lang="TH">เรามาเริ่มดูกันที่ </span>configuration <span lang="TH">เลยดีกว่า</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "Angsana New"; font-size: 14pt;">การ </span><span style="font-family: "Angsana New"; font-size: 14pt;">Configuring DHCP</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"> </span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">Cisco <span lang="TH">ได้เริ่มเพิ่ม</span> feature <span lang="TH">เรื่องของ </span>DHCP server <span lang="TH">อย่างเป็นทางการใน </span>IOS 12.0(1) T <span lang="TH">และได้เพิ่ม </span>feature <span lang="TH">ต่างๆเพื่อเพิ่มความสามารถเรื่อยมาในส่วนนี้</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "Angsana New"; font-size: 14pt;">เรามาดูหน้าตาของ </span><span style="font-family: "Angsana New"; font-size: 14pt;">configuration <span lang="TH">เพื่อให้ </span>router <span lang="TH">ทำตัวเป็น </span>DHCP server <span lang="TH">แบบง่ายๆ กันก่อนนะครับ <span> </span><span> </span></span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"> </span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">!</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">ip dhcp pool net<span lang="TH">01</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"><span> </span>network <span lang="TH">10.20.1.0 255.255.255.0</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"><span> </span>default-router <span lang="TH">10.20.1.1</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"><span> </span>dns-server <span lang="TH">10.20.1.</span>2</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"><span> </span>lease <span lang="TH">0 0 3</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">!</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">( <span lang="TH">ผมอนุมานเอาเองนะครับว่า ท่านผู้อ่านคุ้นเคยกับการอ่าน </span>configuration <span lang="TH">ในรุปแบบของ </span>Cisco <span lang="TH">ดีแล้ว</span>)</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "Angsana New"; font-size: 14pt;">แค่นี้เองครับ </span><span style="font-family: "Angsana New"; font-size: 14pt;">router <span lang="TH">ก็จะทำตัวเสมือนกับ </span>DHCP server <span lang="TH">คือสามาถรับ </span>request <span lang="TH">จาก </span>PC <span lang="TH">หรือ </span>DHCP client <span lang="TH">อื่นๆ และแจก </span>IP address <span lang="TH">กลับไปได้</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "Angsana New"; font-size: 14pt;">มาพิจารณาสิ่งที่ต้องทำอย่างแรก คือการกำหนด </span><span style="font-family: "Angsana New"; font-size: 14pt;">pool <span lang="TH">ของ </span>ip address <span lang="TH">โดยจากตัวอย่างเราสร้าง </span>pool <span lang="TH">ขึ้นมาใช้ชื่อว่า </span>net01 <span lang="TH">และคำสั่งที่ใช้คือ<span> </span></span>ip dhcp pool <span lang="TH">หลังจากนั้น ก็ใช้คำสั่งตามตัวอย่างเพื่อกำหนดค่าอื่นๆ โดยในตัวอย่างนี้ เรากำหนดให้ </span>router <span lang="TH">สามารถจ่าย </span>IP address <span lang="TH">ตั้งแต่ </span>10.20.1.1 <span lang="TH">จนถึง </span>10.20.1.254 (<span lang="TH">ด้วยคำสั่ง </span>network 10.20.1.0 255.255.255.0 ) <span lang="TH">และกำหนดให้ใช้ </span>10.20.1.1 <span lang="TH">เป็น </span>ip address <span lang="TH">ของ </span>default gateway ( default-router 10.20.1.1 ) <span> </span><span lang="TH">และ </span>10.20.1.2 <span lang="TH">เป็น </span>ip address <span lang="TH">ของ </span>DNS server</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "Angsana New"; font-size: 14pt;">นอกจากนี้เรายังใช้คำสั่ง </span><span style="font-family: "Angsana New"; font-size: 14pt;">lease <span lang="TH">เพื่อกำหนดระยะเวลา </span>lease time <span lang="TH">ของ </span>IP address <span lang="TH">โดย </span>parameters <span lang="TH">ที่ใช้ จะเป็น วัน ชั่วโมง นาที เพราะฉะนั้นคำสั่งที่เราใช้ </span>lease 0 0 3 <span lang="TH">คือกำหนดให้ </span>IP address <span lang="TH">มีอายุแค่ </span>3 <span lang="TH">นาที</span></span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "Angsana New"; font-size: 14pt;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "Angsana New"; font-size: 14pt;">ในกรณีที่เราต้องการยกเว้น </span><span style="font-family: "Angsana New"; font-size: 14pt;">ip address <span lang="TH">บางตัวเพราะจะไปซ้ำกับ </span>IP address <span lang="TH">ที่มีอยู่แล้วใน </span>network <span lang="TH">เช่น </span>IP address <span lang="TH">ของ </span>server <span lang="TH">และ แน่นอน </span>IP address <span lang="TH">ของ </span>Ethernet interface <span lang="TH">บน </span>router <span lang="TH">เราจะใช้คำสั่ง </span>ip dhcp excluded-address <span lang="TH"></span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"> </span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">!</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">ip dhcp excluded-address <span lang="TH">10.20.1.1</span></span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "Angsana New"; font-size: 14pt;">!</span><span style="font-family: "Angsana New"; font-size: 14pt;"></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"> </span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "Angsana New"; font-size: 14pt;">มาดู </span><span style="font-family: "Angsana New"; font-size: 14pt;">config <span lang="TH">เต็มๆนะครับ</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">!</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">ip dhcp excluded-address <span lang="TH">10.20.1.1</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">!</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">ip dhcp pool net<span lang="TH">01</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"><span> </span>network <span lang="TH">10.20.1.0 255.255.255.0</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"><span> </span>default-router <span lang="TH">10.20.1.1</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"><span> </span>dns-server <span lang="TH">10.20.1.</span>2</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"><span> </span>lease <span lang="TH">0 0 3</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">!</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">interface fa0/0</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"><span> </span>ip address 10.20.1.1 255.255.255.0</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">!</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "Angsana New"; font-size: 14pt;">ทบทวนนะครับ ในตัวอย่างนี้เรายกเว้น </span><span style="font-family: "Angsana New"; font-size: 14pt;">10.20.1.1 <span lang="TH">ออกจาก </span>range <span lang="TH">ของ </span>ip address <span lang="TH">ที่เราจะกำหนด ต่อมาเราให้ชื่อของ </span>range <span lang="TH">ของ </span>ip address <span lang="TH">ว่าชื่อ </span>net01 <span lang="TH">โดยกำหนด</span> range <span lang="TH">ของ </span>ip address <span lang="TH">ที่จะให้ </span>router <span lang="TH">ทำการแจกคือตั้งแต่ </span>10.20.1.1 <span lang="TH">จนถึง </span>10.20.1.254 <span lang="TH">และมีข้อมูลของ </span>default gateway <span lang="TH">และ </span>DNS server <span lang="TH">รวมไปด้วยโดย </span>IP address<span lang="TH"> ที่แจกให้จะอายุ </span>3 <span lang="TH">นาที</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "Angsana New"; font-size: 14pt;">เพิ่มเติมนิดนึงนะครับ</span><span style="font-family: "Angsana New"; font-size: 14pt;"> Cisco router <span lang="TH">จะพิจารณา </span>DHCP request <span lang="TH">ที่ได้รับว่าเข้ามาทาง </span>interface <span lang="TH">ไหน </span>(<span lang="TH">หรือที่เรียกว่า </span>inbound interface) <span lang="TH">แล้วก็จะดูว่า </span>inbound interface <span lang="TH">นั้นมี </span>subnet <span lang="TH">อะไรเพื่อที่จะเลือกใช้ </span>pool <span lang="TH">ของ </span>IP <span lang="TH">ได้ถูกต้อง เช่น ถ้ามี </span>Ethernet interface <span lang="TH">จำนวน </span>2 interfaces <span lang="TH">และเราต้องการ </span>config <span lang="TH">ให้แจก </span>IP address <span lang="TH">ทั้ง </span>2 interfaces <span lang="TH">สิ่งที่เราต้อง </span>config <span lang="TH">ก็คือการ </span>config pool <span lang="TH">ขึ้นมา </span>2 pools <span lang="TH">เท่านั้นเองครับ ดูตัวอย่าง</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"> </span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">!</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">ip dhcp excluded-address <span lang="TH">10.20.1.1</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">ip dhcp excluded-address 10.20.1.2</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">ip dhcp excluded-address 20.20.2.1</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">!</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">ip dhcp pool net10</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"><span> </span>network <span lang="TH">10.20.1.0 255.255.255.0</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"><span> </span>default-router <span lang="TH">10.20.1.1</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"><span> </span>dns-server <span lang="TH">10.20.1.</span>2</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"><span> </span>lease <span lang="TH">0 0 3</span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">!</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">ip dhcp pool net20</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"><span> </span>network 20.20.2.0 255.255.255.0</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"><span> </span>default-router 20.20.2.1</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"><span> </span>dns-server 9.1.1.1</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">!</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">interface fa0/0</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"><span> </span>ip address 10.20.1.1 255.255.255.0</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">!</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">interface fa0/1</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"><span> </span>ip address 20.20.2.1 255.255.255.0</span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;">!<span lang="TH"></span></span></div>
<div class="MsoNormal">
<span style="font-family: "Angsana New"; font-size: 14pt;"> </span></div>
<span lang="TH" style="font-family: "Angsana New"; font-size: 14pt;">เอาละครับคงพอสำหรับ </span><span style="font-family: "Angsana New"; font-size: 14pt;">DHCP <span lang="TH">คราวหน้าผมจะเขียนถึงอีก </span>feature <span lang="TH">นึงที่เรียกว่า </span>DNS Spoofing <span lang="TH">ใน </span>Cisco router <span lang="TH">ซึ่งเป็น </span>feature <span lang="TH">ที่ </span>config <span lang="TH">ไม่ยากและน่าสนใจทีเดียว</span></span>Computer !http://www.blogger.com/profile/17986004803115235464noreply@blogger.com0tag:blogger.com,1999:blog-3705868336102557107.post-32421942343176625642012-10-03T18:13:00.003-07:002012-10-03T18:13:24.084-07:00การconfig DNS (Spoofing)ใน Cisco router <div class="MsoNormal">
<b><span lang="TH" style="font-family: "; font-size: 14;">การ</span></b><b><span style="font-family: Garamond;">config</span></b><b><span lang="TH" style="font-family: "; font-size: 14;"> </span></b><b><span style="font-family: Garamond;">DNS (Spoofing)</span></b><b><span lang="TH" style="font-family: "; font-size: 14;">ใน </span></b><b><span style="font-family: Garamond;">Cisco router</span></b></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<b><span lang="TH" style="font-family: "; font-size: 14;">อะไรคือ</span></b><b><span style="font-family: Garamond;"> DNS </span></b><span style="font-family: Garamond;"></span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">DNS </span><span lang="TH" style="font-family: "; font-size: 14;">ถ้าอธิบายแบบง่ายๆ ก็คือวิธีการ </span><span style="font-family: Garamond;">(</span><span lang="TH" style="font-family: "; font-size: 14;">หรือบริการ</span><span style="font-family: Garamond;">) </span><span lang="TH" style="font-family: "; font-size: 14;">ที่ช่วยให้เราไม่ต้องจำ </span><span style="font-family: Garamond;">ip address </span><span lang="TH" style="font-family: "; font-size: 14;">ในการติดต่อสื่อสารบน </span><span style="font-family: Garamond;">TCP</span><span style="font-family: Garamond;">/IP </span><span lang="TH" style="font-family: "; font-size: 14;">โดยให้เราใช้วิธีจำชื่อหรือที่อยู่ที่เป็นภาษามนุษย์มากขึ้น </span><span lang="TH" style="font-family: Garamond;"><span> </span></span><span lang="TH" style="font-family: "; font-size: 14;">เช่น ถ้าเราต้องการไปที่ </span><span style="font-family: Garamond;">website </span><span lang="TH" style="font-family: "; font-size: 14;">ของ </span><span style="font-family: Garamond;">Cisco </span><span lang="TH" style="font-family: "; font-size: 14;">เราก็เพียงพิมพ์ </span><span style="font-family: Garamond;">www.cisco.com </span><span lang="TH" style="font-family: "; font-size: 14;">บน </span><span style="font-family: Garamond;">web browser </span><span lang="TH" style="font-family: "; font-size: 14;">ของเรา แล้วเจ้า </span><span style="font-family: Garamond;">DNS </span><span lang="TH" style="font-family: "; font-size: 14;">ก็จะทำการเปลี่ยนจากชื่อ </span><span style="font-family: Garamond;"><a href="http://www.cisco.com/">www.cisco.com</a> </span><span lang="TH" style="font-family: "; font-size: 14;">ที่จำได้ง่ายให้เป็น </span><span style="font-family: Garamond;">198.133.219.25 </span><span lang="TH" style="font-family: "; font-size: 14;">ซึ่งเป็น </span><span style="font-family: Garamond;">ip address </span><span lang="TH" style="font-family: "; font-size: 14;">ของ </span><span style="font-family: Garamond;">Cisco website </span><span lang="TH" style="font-family: "; font-size: 14;">ทั้งหมดนี้ทาง </span><span style="font-family: Garamond;">technical term </span><span lang="TH" style="font-family: "; font-size: 14;">เราเรียกว่าการทำ </span><span style="font-family: Garamond;">name lookup</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "; font-size: 14;">เหมือนเดิมนะครับ ผมคงต้องขอไม่พูดถึง </span><span style="font-family: Garamond;">DNS </span><span lang="TH" style="font-family: "; font-size: 14;">ในรายละเอียดเพราะคิดว่าท่านผู้อ่านสามารถหาข้อมูลเพิ่มเติมได้ง่ายมาก ทั้งบน </span><span style="font-family: Garamond;">Internet </span><span lang="TH" style="font-family: "; font-size: 14;">และในหนังสือหลายๆเล่ม</span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "; font-size: 14;"> </span></div>
<div class="MsoNormal">
<b><span lang="TH" style="font-family: "; font-size: 14;">แล้วอะไรคือ </span></b><b><span style="font-family: Garamond;">DNS Spoofing? </span></b></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">DNS Spoofing </span><span lang="TH" style="font-family: "; font-size: 14;">คือการทำให้ </span><span style="font-family: Garamond;">router </span><span lang="TH" style="font-family: "; font-size: 14;">ทำตัวเป็น </span><span style="font-family: Garamond;">DNS server </span><span lang="TH" style="font-family: "; font-size: 14;">หรือเรียกให้ถูกๆก็คือ </span><span style="font-family: Garamond;">proxy DNS server </span><span lang="TH" style="font-family: "; font-size: 14;">ในกรณีที่ </span><span style="font-family: Garamond;">router </span><span lang="TH" style="font-family: "; font-size: 14;">ไม่สามารถติดต่อกับ </span><span style="font-family: Garamond;">DNS server </span><span lang="TH" style="font-family: "; font-size: 14;">ได้เช่น </span><span style="font-family: Garamond;">link </span><span lang="TH" style="font-family: "; font-size: 14;">ที่เชื่อมไปยัง </span><span style="font-family: Garamond;">headoffice </span><span lang="TH" style="font-family: "; font-size: 14;">หรือ </span><span style="font-family: Garamond;">ISP</span><span style="font-family: Garamond;"> </span><span lang="TH" style="font-family: "; font-size: 14;">ที่มี </span><span style="font-family: Garamond;">DNS server </span><span lang="TH" style="font-family: "; font-size: 14;">อยู่เกิด</span><span style="font-family: Garamond;">down</span><span lang="TH" style="font-family: "; font-size: 14;"> เราก็สามารถ</span><span style="font-family: Garamond;"> config</span><span lang="TH" style="font-family: "; font-size: 14;"> </span><span style="font-family: Garamond;">router </span><span lang="TH" style="font-family: "; font-size: 14;">ที่เรามีอยู่ให้ทำงานแทนที่ </span><span style="font-family: Garamond;">DNS server </span><span lang="TH" style="font-family: "; font-size: 14;">ชั่วคราว</span><span lang="TH" style="font-family: Garamond;"> </span><span lang="TH" style="font-family: "; font-size: 14;">เสมือนว่าเรามี </span><span style="font-family: Garamond;">local DNS server </span><span lang="TH" style="font-family: "; font-size: 14;">อยู่ ดังนั้น</span><span style="font-family: Garamond;">DNS spoofing </span><span lang="TH" style="font-family: "; font-size: 14;">เหมาะสำหรับ </span><span style="font-family: Garamond;">office </span><span lang="TH" style="font-family: "; font-size: 14;">ที่เป็นลักษณะ </span><span style="font-family: Garamond;">remote office </span><span lang="TH" style="font-family: "; font-size: 14;">หรือ</span><span style="font-family: Garamond;">office </span><span lang="TH" style="font-family: "; font-size: 14;">ที่มีขนาดเล็กที่อาศัย </span><span style="font-family: Garamond;">WAN link </span><span lang="TH" style="font-family: "; font-size: 14;">ในการติดต่อกับ </span><span style="font-family: Garamond;">DNS server.</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "; font-size: 14;">ถ้าใครคุ้นเคยกับ </span><span style="font-family: Garamond;">Windows </span><span lang="TH" style="font-family: "; font-size: 14;">ดี</span><span lang="TH" style="font-family: Garamond;"> </span><span lang="TH" style="font-family: "; font-size: 14;"><span> </span>ประโยชน์ของ</span><span style="font-family: Garamond;">DNS Spoofing </span><span lang="TH" style="font-family: "; font-size: 14;">จะคล้ายๆกับ </span><span style="font-family: Garamond;">local host file </span><span lang="TH" style="font-family: "; font-size: 14;">ที่ </span><span style="font-family: Garamond;">Windows </span><span lang="TH" style="font-family: "; font-size: 14;">ใช้ในเรื่องของการทำ </span><span style="font-family: Garamond;">name lookup </span><span lang="TH" style="font-family: "; font-size: 14;">ระหว่าง </span><span style="font-family: Garamond;">ip address </span><span lang="TH" style="font-family: "; font-size: 14;">กับ </span><span style="font-family: Garamond;">NetBios name</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<b><span style="font-family: Garamond;">Configuring DNS Spoofing</span></b></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "; font-size: 14;">จากข้อมูลใน</span><span style="font-family: Garamond;">Cisco.com</span><span lang="TH" style="font-family: "; font-size: 14;"><span> </span></span><span style="font-family: Garamond;">feature </span><span lang="TH" style="font-family: "; font-size: 14;">ที่รองรับการทำ </span><span style="font-family: Garamond;">DNS Spoofing </span><span lang="TH" style="font-family: "; font-size: 14;">เริ่มมีใน </span><span style="font-family: Garamond;">IOS 12.2(2) T , 12.2(4) T, </span><span lang="TH" style="font-family: "; font-size: 14;">และเหมือนว่า</span><span style="font-family: Garamond;">12.3(2)T </span><span lang="TH" style="font-family: "; font-size: 14;">จะเป็น </span><span style="font-family: Garamond;">official release </span><span lang="TH" style="font-family: "; font-size: 14;">สำหรับ </span><span style="font-family: Garamond;">DNS Spoofing</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "; font-size: 14;">ในการที่จะให้ </span><span style="font-family: Garamond;">DNS spoofing </span><span lang="TH" style="font-family: "; font-size: 14;">ทำงานอย่างถูกต้อง เราต้อง </span><span style="font-family: Garamond;">config </span><span lang="TH" style="font-family: "; font-size: 14;">คำสั่งด้านล่างก่อน </span><span style="font-family: Garamond;">(</span><span lang="TH" style="font-family: "; font-size: 14;">คำสั่งใดคำสั่งหนึ่ง</span><span style="font-family: Garamond;">) </span><span lang="TH" style="font-family: "; font-size: 14;">ซึ่งได้แก่</span><span style="font-family: Garamond;"></span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<ul style="margin-top: 0cm;" type="disc">
<li class="MsoNormal"><span lang="TH" style="font-family: "; font-size: 14;">มีคำสั่ง </span><span style="font-family: Garamond;">no ip domain-lookup </span><span lang="TH" style="font-family: "; font-size: 14;">หรือ</span><span style="font-family: Garamond;"></span></li>
<li class="MsoNormal"><span lang="TH" style="font-family: "; font-size: 14;">ไม่มีการ </span><span style="font-family: Garamond;">config </span><span lang="TH" style="font-family: "; font-size: 14;">โดยใช้คำสั่ง </span><span style="font-family: Garamond;">ip name-server x.x.x.x<span> </span></span></li>
</ul>
<div class="MsoNormal" style="margin-left: 18pt;">
<span lang="TH" style="font-family: "; font-size: 14;">หรือ</span><span style="font-family: Garamond;"></span></div>
<ul style="margin-top: 0cm;" type="disc">
<li class="MsoNormal"><span lang="TH" style="font-family: "; font-size: 14;">ในกรณีที่</span><span style="font-family: Garamond;">router </span><span lang="TH" style="font-family: "; font-size: 14;">ไม่สามารถ </span><span style="font-family: Garamond;">connect </span><span lang="TH" style="font-family: "; font-size: 14;">ไปถึง </span><span style="font-family: Garamond;">DNS server </span><span lang="TH" style="font-family: "; font-size: 14;">เช่น </span><span style="font-family: Garamond;">Interface down </span><span lang="TH" style="font-family: "; font-size: 14;">หรือ ไม่มี </span><span style="font-family: Garamond;">routing path </span><span lang="TH" style="font-family: "; font-size: 14;">ใน </span><span style="font-family: Garamond;">routing table</span></li>
</ul>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "; font-size: 14;">ที่นี้เรามาดูคำสั่งบังคับที่ต้องมีเพื่อ </span><span style="font-family: Garamond;">activate </span><span lang="TH" style="font-family: "; font-size: 14;">การทำงานของ </span><span style="font-family: Garamond;">DNS service process </span><span lang="TH" style="font-family: "; font-size: 14;">บน </span><span style="font-family: Garamond;">router </span><span lang="TH" style="font-family: "; font-size: 14;">ก็จะมี</span><span style="font-family: Garamond;"></span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "; font-size: 14;"> </span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">no ip domain-lookup</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">ip dns server</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">ip dns spoofing</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<b><span style="font-family: Garamond;">no ip domain-lookup</span></b></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "; font-size: 14;">คำสั่งนี้คงคุ้นเคยกันดีนะครับ เป็นคำสั่งที่บอก </span><span style="font-family: Garamond;">router </span><span lang="TH" style="font-family: "; font-size: 14;">ว่าไม่ต้องพยายามติดต่อกับ </span><span style="font-family: Garamond;">DNS server (</span><span lang="TH" style="font-family: "; font-size: 14;">คิดว่าหลายๆท่านคงรำคาญเหมือนผมเวลาไม่มีคำสั่งนี้ เพราะถ้าเราพิมพ์คำสั่งผิดไป </span><span style="font-family: Garamond;">router</span><span lang="TH" style="font-family: "; font-size: 14;">จะพยายามติดต่อกับ </span><span style="font-family: Garamond;">DNS server </span><span lang="TH" style="font-family: "; font-size: 14;">เพื่อดูว่าที่เราพิมพ์ไปนั้นอาจจะเป็นชื่อ </span><span style="font-family: Garamond;">host </span><span lang="TH" style="font-family: "; font-size: 14;">ตัวใดตัวหนึ่งรึเปล่าซึ่งน่ารำคาญทีเดียวนะครับเพราะจะต้องเสียเวลารอ</span><span style="font-family: Garamond;">)</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<b><span style="font-family: Garamond;">ip dns server</span></b></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "; font-size: 14;">คำสั่งนี้เป็นการบอก </span><span style="font-family: Garamond;">router </span><span lang="TH" style="font-family: "; font-size: 14;">ให้ทำตัวเป็น </span><span style="font-family: Garamond;">DNS server </span><span lang="TH" style="font-family: "; font-size: 14;">ด้วย</span><span style="font-family: Garamond;">(</span><span lang="TH" style="font-family: "; font-size: 14;">นอกเหนือจากการ </span><span style="font-family: Garamond;">routing </span><span lang="TH" style="font-family: "; font-size: 14;">และอีกหลายอย่างที่เรา </span><span style="font-family: Garamond;">config </span><span lang="TH" style="font-family: "; font-size: 14;">ไป</span><span style="font-family: Garamond;">) </span><span lang="TH" style="font-family: "; font-size: 14;">โดยการ</span><span style="font-family: Garamond;">activate DNS server</span><span lang="TH" style="font-family: "; font-size: 14;"> </span><span style="font-family: Garamond;">process </span><span lang="TH" style="font-family: "; font-size: 14;">ใน </span><span style="font-family: Garamond;">router</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<b><span style="font-family: Garamond;">ip dns spoofing [spoofing ip address]</span></b></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "; font-size: 14;">คำสั่งนี้เป็นการบอกให้ </span><span style="font-family: Garamond;">router </span><span lang="TH" style="font-family: "; font-size: 14;">ทำการ </span><span style="font-family: Garamond;">spoof </span><span lang="TH" style="font-family: "; font-size: 14;">หรือ </span><span style="font-family: Garamond;">“</span><span lang="TH" style="font-family: "; font-size: 14;">สวมรอย</span><span style="font-family: Garamond;">” </span><span lang="TH" style="font-family: "; font-size: 14;">โดยถ้าเห็น </span><span style="font-family: Garamond;">DNS queries </span><span lang="TH" style="font-family: "; font-size: 14;">เข้ามา </span><span style="font-family: Garamond;"><span> </span>router </span><span lang="TH" style="font-family: "; font-size: 14;">จะทำการตอบกลับด้วยข้อมูล </span><span style="font-family: Garamond;">record (</span><span lang="TH" style="font-family: "; font-size: 14;">ชื่อและ </span><span style="font-family: Garamond;">ip address) </span><span lang="TH" style="font-family: "; font-size: 14;">ที่เรา</span><span style="font-family: Garamond;">config</span><span lang="TH" style="font-family: "; font-size: 14;">ให้ </span><span style="font-family: Garamond;">router </span><span lang="TH" style="font-family: "; font-size: 14;">ซึ่งจะอธิบายเพิ่มเติมด้านล่าง</span><span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "; font-size: 14;">เรามี </span><span style="font-family: Garamond;">option </span><span lang="TH" style="font-family: "; font-size: 14;">ให้เลือกว่าจะใส่ </span><span style="font-family: Garamond;">ip address </span><span lang="TH" style="font-family: "; font-size: 14;">หลังคำสั่ง </span><span style="font-family: Garamond;">ip dns spoofing </span><span lang="TH" style="font-family: "; font-size: 14;">โดยถ้าเราใส่ </span><span style="font-family: Garamond;">ip address<span> </span></span><span lang="TH" style="font-family: "; font-size: 14;">ตามหลังคำสั่ง ก็จะเป็นการกำหนด </span><span style="font-family: Garamond;">ip address </span><span lang="TH" style="font-family: "; font-size: 14;">ที่</span><span style="font-family: Garamond;">router</span><span lang="TH" style="font-family: "; font-size: 14;">ใช้ในการตอบ </span><span style="font-family: Garamond;">DNS queries </span><span lang="TH" style="font-family: "; font-size: 14;">เช่นถ้าเรา </span><span style="font-family: Garamond;">config </span><span lang="TH" style="font-family: "; font-size: 14;">ด้วยคำสั่ง</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">ip dns spoofing 1.1.1.1</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">client </span><span lang="TH" style="font-family: "; font-size: 14;">ที่ทำการทำ </span><span style="font-family: Garamond;">DNS queries </span><span lang="TH" style="font-family: "; font-size: 14;">จะคิดว่า </span><span style="font-family: Garamond;">DNS server </span><span lang="TH" style="font-family: "; font-size: 14;">ที่ตอบกลับคือ </span><span style="font-family: Garamond;">server </span><span lang="TH" style="font-family: "; font-size: 14;">ที่มี </span><span style="font-family: Garamond;"><span> </span>address 1.1.1.1 </span><span lang="TH" style="font-family: "; font-size: 14;">แต่ถ้าเราไม่ใส่ </span><span style="font-family: Garamond;"><span> </span>router</span><span lang="TH" style="font-family: "; font-size: 14;">จะใช้ </span><span style="font-family: Garamond;">ip address </span><span lang="TH" style="font-family: "; font-size: 14;">ของ </span><span style="font-family: Garamond;">inbound interface </span><span lang="TH" style="font-family: "; font-size: 14;">ที่ได้รับ </span><span style="font-family: Garamond;">DNS queries</span><span lang="TH" style="font-family: "; font-size: 14;">ในการตอบกลับซึ่งเป็น </span><span style="font-family: Garamond;">default configuration </span><span lang="TH" style="font-family: "; font-size: 14;">ของ</span><span style="font-family: Garamond;"> router (</span><span lang="TH" style="font-family: "; font-size: 14;">งงไม๊ครับ คือสรุปว่า</span><span style="font-family: Garamond;">router </span><span lang="TH" style="font-family: "; font-size: 14;">หลอกให้อุปกรณ์อื่นเข้าใจว่าได้รับคำตอบจาก </span><span style="font-family: Garamond;">ip address 1.1.1.1)</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "; font-size: 14;">หลังจาก </span><span style="font-family: Garamond;">DNS service </span><span lang="TH" style="font-family: "; font-size: 14;">ทำงานแล้ว เราก็ต้องใส่ข้อมูลของชื่อและ </span><span style="font-family: Garamond;">ip address </span><span lang="TH" style="font-family: "; font-size: 14;">หรือที่เราเรียกว่า </span><span style="font-family: Garamond;">resource record </span><span lang="TH" style="font-family: "; font-size: 14;">ใน </span><span style="font-family: Garamond;">DNS </span><span lang="TH" style="font-family: "; font-size: 14;">ให้ </span><span style="font-family: Garamond;">router </span><span lang="TH" style="font-family: "; font-size: 14;">สามารถค้นหา </span><span style="font-family: Garamond;">(name lookup)</span><span lang="TH" style="font-family: "; font-size: 14;"> ซึ่งคำสั่งที่ใช้ก็คือคำสั่ง<b> </b></span><b><span style="font-family: Garamond;">ip host </span></b><span lang="TH" style="font-family: "; font-size: 14;">และ<b> </b></span><b><span style="font-family: Garamond;">ip domain name <span> </span></span></b><b><span lang="TH" style="font-family: "; font-size: 14;"></span></b></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "; font-size: 14;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "; font-size: 14;">ตอนนี้เรามาดู </span><span style="font-family: Garamond;">configuration </span><span lang="TH" style="font-family: "; font-size: 14;">แบบเต็มๆเพื่อความเข้าใจนะครับ</span><span style="font-family: Garamond;"></span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">!</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">no ip domain-lookup</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">ip dns server </span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">ip dns spoofing 1.1.1.1</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">!</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">ip domain name tnet.com</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">ip host test.tnet.com<span> </span></span><span lang="TH" style="font-family: "; font-size: 14;">1.2.3.4</span><span style="font-family: Garamond;"></span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">!</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "; font-size: 14;">ทีนี้ดูผลของ </span><span style="font-family: Garamond;">query </span><span lang="TH" style="font-family: "; font-size: 14;">ด้วยคำสั่ง </span><span style="font-family: Garamond;">nslookup </span><span lang="TH" style="font-family: "; font-size: 14;">จาก </span><span style="font-family: Garamond;">Windows </span><span lang="TH" style="font-family: "; font-size: 14;"></span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">C:\>nslookup</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">> test</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">Server:<span> </span>[1.1.1.1</span><span lang="TH" style="font-family: "; font-size: 14;">]</span><span style="font-family: Garamond;"></span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">Address:<span> </span>1.1.1.1</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">Non-authoritative answer:</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">Name:<span> </span><span> </span>test</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">Address:<span> </span></span><span lang="TH" style="font-family: "; font-size: 14;">1.2.3.4</span><span style="font-family: Garamond;"></span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">> test.tnet.com</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">Server:<span> </span>[1.1.1.1</span><span lang="TH" style="font-family: "; font-size: 14;">]</span><span style="font-family: Garamond;"></span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">Address:<span> </span>1.1.1.1</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">Non-authoritative answer:</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">Name:<span> </span>test.tnet.com</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">Address:<span> </span></span><span lang="TH" style="font-family: "; font-size: 14;">1.2.3.4</span><span style="font-family: Garamond;"></span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">> </span><span lang="TH" style="font-family: "; font-size: 14;">1.2.3.4</span><span style="font-family: Garamond;"></span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">Server:<span> </span>[1.1.1.1</span><span lang="TH" style="font-family: "; font-size: 14;">]</span><span style="font-family: Garamond;"></span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">Address:<span> </span>1.1.1.1</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">Name: <span> </span>test.tnet.com</span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;">Address:<span> </span></span><span lang="TH" style="font-family: "; font-size: 14;">1.2.3.4</span><span style="font-family: Garamond;"></span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<div class="MsoNormal">
<span lang="TH" style="font-family: "; font-size: 14;">สำหรับผู้ที่เข้าใจ </span><span style="font-family: Garamond;">DNS</span><span lang="TH" style="font-family: "; font-size: 14;">ดีอยู่แล้ว โปรดสังเกตนะครับว่าเราไม่ต้องยุ่งกับ </span><span style="font-family: Garamond;">PTR</span><span style="font-family: Garamond;"> record (</span><span lang="TH" style="font-family: "; font-size: 14;">สำหรับ </span><span style="font-family: Garamond;">reverse lookup) </span><span lang="TH" style="font-family: "; font-size: 14;">นะครับ </span><span style="font-family: Garamond;">DNS process </span><span lang="TH" style="font-family: "; font-size: 14;">ใน </span><span style="font-family: Garamond;">cisco router </span><span lang="TH" style="font-family: "; font-size: 14;">ฉลาดพอที่จะทำ </span><span style="font-family: Garamond;">reverse lookup </span><span lang="TH" style="font-family: "; font-size: 14;">ให้เอง</span><span style="font-family: Garamond;"></span></div>
<div class="MsoNormal">
<span style="font-family: Garamond;"> </span></div>
<span lang="TH" style="font-family: "; font-size: 14;">ก็คงพอแค่นี้นะครับสำหรับ </span><span style="font-family: Garamond;">DNS spoofing </span><span lang="TH" style="font-family: "; font-size: 14;">ที่จริงมีคำสั่งที่เกี่ยวกับการ </span><span style="font-family: Garamond;">config</span><span lang="TH" style="font-family: "; font-size: 14;"> </span><span style="font-family: Garamond;">DNS </span><span lang="TH" style="font-family: "; font-size: 14;">ใน </span><span style="font-family: Garamond;">Cisco router </span><span lang="TH" style="font-family: "; font-size: 14;">ค่อนข้างเยอะทีเดียว สำหรับผู้ที่ต้องการรู้เพิ่มเติม เข้าไปดูที่</span><span style="font-family: Garamond;">http://www.cisco.com/univercd/cc/td/doc/product/software/ios</span><span lang="TH" style="font-family: "; font-size: 14;">122/122</span><span style="font-family: Garamond;">newft/</span><span lang="TH" style="font-family: "; font-size: 14;">122</span><span style="font-family: Garamond;">t/</span><span lang="TH" style="font-family: "; font-size: 14;">122</span><span style="font-family: Garamond;">t</span><span lang="TH" style="font-family: "; font-size: 14;">2/</span><span style="font-family: Garamond;">ftddns.htm </span><span lang="TH" style="font-family: "; font-size: 14;">นะครับ</span>Computer !http://www.blogger.com/profile/17986004803115235464noreply@blogger.com0tag:blogger.com,1999:blog-3705868336102557107.post-50379549509428477402012-10-03T18:12:00.003-07:002012-10-03T18:12:35.676-07:00ทำความเข้าใจกับ IEEE 802.1x and EAP ที่จริงมีอีกหลายเรื่องมากที่ผมอยากเขียนถึงทั้งที่ตัวเองพอรู้และอยากรู้
เพิ่มเติม แต่ดูเหมือนว่าตอนนี้คงไม่มีเรื่องไหน hot เท่าเรื่องเกี่ยวกับ
security ผมก็เลยไปค้นๆดูว่าเรื่องไหนที่น่าสนใจดี ก็เลยเลือกเอาเรื่องของ
IEEE 802.1x กับ EAP
มาเล่าให้ฟังเพราะดูเป็นเรื่องที่มีคนพูดถึงมากทีเดียวโดยเฉพาะผู้ที่ต้อง
ยุ่งเกี่ยวกับ security ใน wireless network โดยเฉพาะ security feature
ที่ทุกคนกำลังรอคอยเช่น WPA, 802.11i ก็อาศัย 802.1x กับ EAP
เป็นพื้นฐานของการทำ authentication ด้วย ในตอนท้ายของบทความนี้
ผมเอาตัวอย่างการ config มาให้ดูด้วย<br /><br /><span style="font-weight: bold;">เข้าใจที่มาของ IEEE 802.1x</span><br /><br />ความ
คิดของการพัฒนา IEEE 802.1x ก็เพื่อการป้องกัน network
ด้วยการที่เราสามารถระบุ(authenticate)ได้ว่าใครกำลังพยายามเข้ามาใช้
network หรือที่เรียกว่า Identity-based networking
โดยรูปแบบที่ง่ายที่สุดก็คือการใช้ user ID (username + password) แต่
802.1x ได้พัฒนาต่อยอดโดยเพิ่มความสามารถในการควบคุม access ในระดับ
network และสามารถทำงานร่วมกับ authentication server
ในการจำกัดความสามารถที่แต่ละคนได้รับ เช่น ถ้าเห็นว่า user
เป็นวิศวกรก็ให้สามารถใช้ bandwidth ได้ 100 Mbps แต่ถ้า user
เป็นนักบัญชีก็อาจให้ใช้ได้แค่ 10 Mbps<br /><br /><span style="font-weight: bold;">แล้วอะไรคือ IEEE 802.1x</span><br />802.1x
เป็นมาตรฐานรับรองโดย IEEE สำหรับ port-based network access control
หรือมาตรฐานที่ใช้ในการควบคุมการใช้งาน (access control)
ทั้งการระบุผู้ที่สามารถเข้าใช้networkได้ (authentication)
และระบุสิ่งหรือ resource ที่ผู้ใช้งานได้รับอนุญาติให้ใช้ได้
(authorization) ในระดับ port<br /><br />port ในที่นี้ ถ้าเป็น wired LAN
ก็จะหมายถึง physical port ของ switch ถ้าเป็น wireless LAN ก็คือการ
association (ก็คือความสามารถในการติดต่อสื่อสาร) ระหว่าง client กับ
access point ใน network แบบ …ไม่ใช่ TCP/IP port นะครับ<br /><br /><br />สัง
เกตุนิดนึงนะครับว่า 802.1X จะทำงานที่ layer 2
จึงทำให้อุปกรณ์networkจำเป็นต้องเป็น switch และเน้นการคุยกันแบบ
point-to-pointเพราะฉะนั้นถ้ามี PCs หลายๆตัวต่อกับ Hub แล้วต่อกับ switch
อีกที อย่างนี้ 802.1X ไม่work ครับ<br /><br /><span style="font-weight: bold;">Terminology</span><br />ก่อนจะลง details กัน เราต้องมารู้จักคำศัพท์ต่างๆที่ใช้ในโลกของ 802.1x ดูรูปประกอบนะครับ<br /><br />(ถ้ารูปไม่ขึ้น ให้ไปที่ http://tnet.50megs.com/image002.jpg )<br /><br /><img src="http://tnet.50megs.com/image002.jpg" /><br /><br /><br />Supplicant คือ end-device ที่จะต้องถูก authenticate โดยส่วนใหญ่ก็คือ PC หรือ laptops ที่ users ใช้<br />Authenticator
คือ อุปกรณ์ที่ทำหน้าที่ authenticate โดยจะคุยกับ Authentication server
ว่าจะดำเนินการอย่างไรกับ supplicant ที่ต่อเข้ามา<br />Authentication Server คือ server ที่เก็บ database ของสิทธิ์ของ end-device หรือ users ต่างๆ ส่วนใหญ่ก็จะใช้ RADIUS server<br /><br />อีก
คำศัพท์ที่ควรรู้คือ PAE หรือ Port Access Entity
ซึ่งหมายถึงส่วนที่ฝังอยู่ในอุปกรณ์ทั้ง 3
ตัวด้านบนที่ใช้ในกระบวนการที่เกี่ยวข้องกับ 802.1x เช่น software agent
ที่ลงที่ supplicant หรือ service ใน authenticator (เช่น switch)
เพราะฉะนั้น PAE จะไม่ได้เฉพาะเจาะจงถึง software หรืออุปกรณ์ใด<br /><br />สุดท้ายก็คือ EAP หรือ Extensible Authentication Protocol ซึ่งเป็นหัวใจของ 802.1x ที่เราจะพูดถึงต่อไป<br /><br /><br /><span style="font-weight: bold;">แล้ว 802.1x ทำงานอย่างไร</span><br /><br />เริ่ม
ต้นด้วยภาพการ authenticate ทั้ง flow คือตั้งแต่ supplicant (PC/ User)
ผ่าน Authenticator (Switch หรือ Access point) จนถึง Authentication
server (เช่น RADIUS server)<br /><br />802.1x จะเน้น “วิธีการส่ง”
“ข้อมูลการของการ authenticate” ระหว่าง supplicant (PC/User) กับ
Authenticator (Switch/ Access point) ทีนี้คงพอเดาออกใช้ไม๊ครับว่า
“ข้อมูลของการ authenticate” ก็คือ EAP นั่นเอง และ “การส่ง” ข้อมูล EAP
นี้ 802.1x ใช้ protocol ที่เรียกว่า EAPOL หรือ EAP encapsulation over
LAN<br /><br />ทีนี้ระหว่าง Authenticator (Switch/ Access point) กับ
Authentication server (เช่น RADIUS server) ก็จะคุยกันด้วย authentication
protocol เช่น Radius โดย EAP จะถูก encapsulate ใน Radius อีกที<br /><br />ดูรูปดีกว่านะครับ<br />(ถ้ารูปไม่ขึ้น ให้ไปที่ http://tnet.50megs.com/image003.gif )<br /><br /><img src="http://tnet.50megs.com/image003.gif" /><br /><br />ที
นี้มาดูกันใน details ว่า EAP ทำงานอย่างไรบ้างจากรูปนะครับ จะเห็นว่าเป็น
2-way challenge และ Authenticator จะเป็นคล้ายๆตัว relay message โดย
supplicant จะถูก challenge ให้บอกข้อมูลว่าเป็นใคร (Identity)
ซึ่งอาจเป็นได้ตั้งแต่ MAC address, ID, หรือ Certificate ต่างๆ แล้ว
authenticator จะส่งข้อมูลนี้ผ่านไปยัง Authentication server
(เส้นประสีเขียวในรูป)เพื่อตรวจสอบว่าจะอนุญาติให้ supplicant นี้ใช้งาน
network ได้หรือไม่อย่างไร ถ้าถูกต้อง authenticator ก็จะเปิดให้ใช้ได้<br /><br />OTP คือ One Time Password นะครับ<br /><br />(ถ้ารูปไม่ขึ้น ให้ไปที่ http://tnet.50megs.com/image005.jpg)<br /><br /><img src="http://tnet.50megs.com/image005.jpg" /><br /><br /><br /><span style="font-weight: bold;">การ configuration</span><br />เป็น
ตัวอย่างการ config ที่ Cisco switch นะครับ โดยเราต้อง enable AAA ซะก่อน
และระบุว่าเราจะใช้ authentication แบบ 802.1x (“dot1x” ในชุดคำสั่ง)
และใช้ Radius ( “group radius” ในชุดคำสั่ง)<br /><br /><span style="color: #3333ff; font-weight: bold;">Switch(config)# aaa new-model</span><br /><br /><span style="color: #3333ff; font-weight: bold;">Switch(config)# aaa authentication dot1x default group radius</span><br /><br />หลังจากนั้นก็เข้าไปที่ระดับ interface เพื่อใช้งาน 802.1x<br /><br /><span style="color: #3333ff; font-weight: bold;">Switch(config)# interface fastethernet0/1</span><br /><br /><span style="color: #3333ff; font-weight: bold;">Switch(config-if)# dot1x port-control auto</span><br /><br />ส่วนสุดท้ายก็ต้องระบุว่า Radius server ของเรา IP address อะไร และ encryption key คืออะไร<br /><br /><span style="color: #3333ff; font-weight: bold;">Switch(config)# radius-server host 172.l20.39.46 auth-port 1612 key rad123</span><br /><br />ใน
ตัวอย่างนี้ IP address ของ Radius server คือ 172.120.39.46 และ
encryption key คือ rad123 ในตัวอย่างเราบอกว่าให้ใช้ port 1612
ในการคุยกับ Radius server<br /><br />ถ้าเป็น Aironet ก็ง่ายมากเลยเพราะใช้ Web เข้าไป config ได้ครับ<br /><br /><br />ที่เหลือคือการ config ตัว supplicant (PC) กับ Radius server ซึ่งก็แตกต่างกันไป ขึ้นอยู่กับ software หรือ OS ที่ใช้ครับComputer !http://www.blogger.com/profile/17986004803115235464noreply@blogger.com0tag:blogger.com,1999:blog-3705868336102557107.post-31606579404450045782012-10-03T18:10:00.002-07:002012-10-03T18:10:41.506-07:00การติดตั้ง chillispot, FreeRadius, syslog-ng บน ubuntu เพื่อทำตาม พรบ.ตอมพิวเตอร์ท่านที่เคยไปพักตามโรงแรมหรือสถานที่ท่องเที่ยว/จุดพักเิดินทาง ฯลฯ
คงเคยเห็นมีบริการ Wi-Fi และมีการขายบัตรอินเตอร์เ้น็ต หลาย ๆ ที่ดังกล่าว
ได้นำเอาโปรแกรม chillispot และ FreeRaDius ไปประยุกต์ใช้งาน
นั่นคือเมื่อเราเชื่อมต่อ Wi-Fi
ได้แล้ว พอเข้าเว็บไซต์ก็จะมีหน้าต่างให้เราป้อน username และ password
ก่อนจึงจะใช้งานได้<br />
<br />
ในสถานการณ์ปัจจุบัน พรบ.คอมพิวเตอร์ 2550
ได้บังคับใช้งานแ้ล้ว เราสามารถนำเอาโปรแกรม chillispot, FreeRadius,
syslog-ng มาประยุกต์ใช้งานให้เข้ากับ พรบ.ได้ เพราะ พรบ.ได้ระบุว่า
ผู้ให้บริการจะต้องสามารถระบุตัวตนของผู้ใช้งานได้ พร้ออมเก็บข้อมูลการ
จราจรคอมพิวเตอร์ไม่น้อยกว่า 90 วัน ซึ่ง chillispot + freeradius +
syslog-ng สามารถที่จะช่วยได้ ไม่เว้นแ่ต่ plawan centralized log
ก็ได้นำซอฟต์แวร์ชุดนี้มาใช้งานเช่นกัน<br />
<br />
การติดตั้งในที่นี้เป็นการติดตั้งตามรูปคอนฟิกข้างล่าง
โดยติดตั้ง FreeRadius และ syslog-ng ไว้บน Server ที่วางอยู่ในตำแหน่ง DMZ
และติดตั้ง Chillispot ให้ทำหน้าที่เป็น Authentication Gateway
ไ้ว้ในตำแน่ง Internal ซึ่งจะเห็นว่าถ้าเป็นเครือข่ายขนาดใหญ่ และมีหลาย
Internal Network ก็สามารถใช้ FreeRadius และ syslog-ng ร่วมกันได้
โดยส่วนประกอบของ chillispot ก็ประกอบด้วย dhcp, firewall, และ nat
อยู่ในตัว การทำงานของ chillispot จะต้องทำงานร่วมกับ FreeRadius
ซึ่งวิธีการติดตั้ง FreeRadius ดูได้ ที่นี่
โดยในที่นี้ผู้เขียนติดตั้ง chillispot บน ubuntu 8.10 ส่วน FreeRadius
ติดตั้งบน ubuntu 8.04 (ไม่ใช้ ubuntu 8.10
เพราะเจอปัญหาบางอย่างที่้ัยังแก้ไม่ได้)<br />
<br />
<img height="320" src="http://www.itmanage.info/technology/linux/ubuntu/chillihospot/network.png" width="400" /><br />
<span class="style83">หมายเหตุ</span> FreeRadius,
chillispot และ syslog-ng สามารถติดตั้งในเครื่องเดียวกันได้
ซึ่งจะเหมาะสมกับหน่วยงานขนาดเล็ก ด้วยการปรับค่าคอนฟิกบางส่วน<br />
<span class="style79">ขั้นตอนการติดตั้ง Freeradius </span><br />
การติดตั้ง Freeradius สำหรับวิธีการของผู้เขียนดูวิธีได้ ที่นี่<br />
<br />
โดยบนเครื่อง FreeRadius
จะต้องมีการคอนฟิกอนุญาตให้เข้าไปใช้งาน FreeRadius ที่ไฟล์
/etc/freeradius/client.conf ดังนี้<br />
<span class="style84">client 172.24.51.16 {<br />
secret = radiussecret<br />
shortname = chilli<br />
}</span><br />
<br />
จากค่า client ข้างบนอาจจะมีการสงสัยกันว่าทำไม่อนุญาต IP <span class="style84">172.24.51.252</span>
เข้าไปใช้งาน คำตอบก็คือว่าที่ Firewall มีการทำ NAT ระหว่าง Internal
กับ DMZ ดังนั้น IP ที่ส่งไปยัง FreeRadius จึงเป็น IP ของ Firewall ฝั่ง
Internal คือ 172.24.51.16<br />
<br />
ในการติดตั้งใช้งาน ที่ Firewall ต้องทำให้เครื่อง
Authentication Gateway สามารถเชื่อมต่อไปยังเครื่องที่เป็น FreeRadius
ได้ ไม่นั้นก็จะไม่สามารถติดตั้ง FreeRadius ได้<br />
<div class="style79">
<strong>ขั้นตอน</strong>การติดตั้ง chillispot บนเครื่อง Authentication Gateway</div>
<div class="style83">
เซ็ตค่า Network</div>
<ol>
<li>ทำการ Enable packet forwarding ด้วยการแก้ไขไฟล์<span class="style85"> /etc/sysctl.conf</span> ด้วยการเอาเครื่องหมาย # หน้าคำว่า <span class="style85">net.ipv4.ip_forward=1</span> ออก เพื่อสั่งให้ packet forwarding ของ ipv4 ทำงาน</li>
<li>ทำการรันคำสั่งต่อไปนี้ เพื่อให้มีผลทันที ให้เครื่องสามารถ forward packet ทำตัวเป็นเราเตอร์ได้<br />
<span class="style84">echo 1 | tee /proc/sys/net/ipv4/ip_forward</span><br />
ถ้าผลที่ได้เป็น 1 ถือว่าทำการ Enable packet forwarding สำเร็จ<br />
</li>
<li>ทำการ Restart network ด้วยคำสั่งต่อไปนี้<br />
<span class="style84">sysctl -p</span><br />
<span class="style84">/etc/init.d/networking restart</span></li>
</ol>
<div class="style83">
Enable TUN/TAP device driver support</div>
<ol>
<li>ทำการ Enable TUN/TAP device drive support ด้วยการเพิ่มคำว่า <span class="style85">tun</span> ต่อท้ายไฟล์ <span class="style85">/etc/modules</span></li>
<li>จากนั้นทำการ Enable โดยไม่ต้อง reboot ด้วยการรันคำสั่งต่อไปนี้<br />
<span class="style84">modprobe tun</span></li>
</ol>
<div class="style83">
Install Chillispot</div>
<div class="style75">
โปรแกรม chillispot เป็น Opensource
ที่ใช้ติดตั้งบน Gateway Server เพื่อทำหน้าที่ควบคุมการใช้งานของ user
ที่วิ่งผ่านให้มีการป้อน username และ password
ก่อนจึุงจะใช้งานได้ ซึ่งจะทำงานร่วมกับโปรแกรม Radius
ซึ่งทำหน้าที่บริหารจัดการฐานข้อมูลของ user โดยโปรแกรม chillispot กับ
FreeRadius อาจจะติดตั้งอยู่บนเครื่องเดียวกันหรือต่างเครื่องกันได้ </div>
<div class="style75">
การติดตั้ง chillispot จะต้องใช้การ์แลน 2 การ์ด ซึ่งมีขั้นตอนต่อไปนี้<br />
</div>
<ol>
<li>ทำการติดตั้ง chillispot โดยใ้้ช้คำสั่งต่อไปนี้<br />
<span class="style84">apt-get install chillispot</span><br />
จากนั้นให้เติมรายละเอียดดังต่อไปนี้<br />
<span class="style85">IP address of radius server 1:</span><br />
<span class="style84">127.0.0.1</span>(ของผู้เีขียนชี้ไปยัง Freeradius ซึ่งอยู่อีกเครื่องจึงกำหนดเป็น 192.168.9.12)<br />
<span class="style85">Radius shared secret:</span> <br />
<span class="style84">radiussecret</span> (ค่านี้ต้องตรงกับ Radius Server)<br />
<span class="style85">Ethernet interface for DHCP to listen: </span><br />
<span class="style84">eth1</span><br />
<span class="style85">URL of UAM server: </span><br />
<span class="style84">https://192.168.182.1/cgi-bin/hotspotlogin.cgi </span> (เปลี่ยนเป็นค่าอื่นได้)<br />
<span class="style85">URL of UAM homepage: </span><br />
<span class="style84">https://192.168.182.1/welcome.html</span><br />
<span class="style85">Shared password between chillispot and webserver: </span><br />
<span class="style84">uamsecret</span></li>
<li>ต่อไปทำการแก้ไขไฟล์ /etc/default/chillispot เพื่อ Enable captive portal ด้วยการกำหนดค่าให้ <br />
<span class="style84">ENABLED=1</span></li>
<li>ทำการแก้ไขไฟล์คอนฟิกของ chillispot คือไฟล์
/etc/chilli.conf โดยค่าที่สำคัญมาจากขั้นตอนของการติดตั้งที่ได้ทำมาแล้ว
และให้แก้ไขค่าให้เหมาะสม ดังต่อไปนี้<br />
<span class="style74">net 192.168.182.0/24<br />
dns1 61.19.253.134<br />
dns2 61.19.253.136<br />
radiusserver1 127.0.0.1 (ของผู้เีขียนเป็น 192.168.99.12)<br />
radiusserver2 127.0.0.1 (ของผู้เีขียนเป็น 192.168.99.12)<br />
radiussecert radiussecret<br />
dhcpif eth1<br />
uamserver https://192.168.182.1/cgi-bin/hotspotlogin.cgi<br />
uamhomepage https://192.168.182.1/welcome.html<br />
uamsecret uamsecret<br />
uamlisten 192.168.182.1<br />
uamallowed www.google.co.th,192.168.182.0/24</span><br />
<br />
โดยค่าของ dns ต้องสามารถใช้งานได้จริง เพราะเป็นค่าที่จะต้องจ่ายให้กับเครื่อง Client</li>
</ol>
<span class="style84"><span class="style83">ติดตั้ง Firewall สำหรับ Chillispot</span><br />
</span>chillispot จะต้องมีการติดตั้ง Firewall
(iptables) เพื่อกำหนดให้แพ็กเกตของข้อมูลจากเครื่อง Client ที่วิ่งผ่าน
ต้องผ่าน Service ที่เป็น chillispot เพื่อให้ Client ทุกคนต้องมีการป้อน
username และ password ก่อนถึงจะใช้งานได้ โดย Firewall ของ Chillspot
จะมีมาให้แล้วกับการติดตั้ง ซึ่งมีขั้นตอนการนำมาใช้ดังต่อไปนี้<br />
<ol>
<li>ทำการกำหนด firewall โดยทำการสร้างไฟล์
chilli.iptables ด้วยการคัดลอกมาจากไฟล์ firewall.iptables ที่มากับ
chillispot ไปไว้ในตำแหน่ง /etc/init.d ด้วยคำสั่งดังนี้<br />
<span class="style84">cp /usr/share/doc/chillispot/firewall.iptables /etc/init.d/chilli.iptables</span></li>
<li>กำหนดให้ไฟล์ chilli.iptables สามารถ execute ได้ด้วยคำสั่ง<br />
<span class="style84">chmod a+x /etc/init.d/chilli.iptables</span></li>
<li>กำหนดให้กฎ firewall มีการ start ทุกครั้งเมื่อมีการเิปิดเครื่องด้วยคำสั่ง<br />
<span class="style84">ln -s /etc/init.d/chilli.iptables /etc/rcS.d/S41chilli.iptables</span><br />
</li>
<li>โดยค่าดีฟอลต์ไฟร์วอลล์จะทำการกำหนดค่าให้ eth0=internet, eth1= LAN แต่ถ้าคุณต้องการเปลี่ยนค่าก็สามารถเปลี่ยนแปลงได้ </li>
<li>หากต้องการให้เครื่องลูกสามารถทดสอบการเชื่อมต่อโดยใ้ช้โปรโตคอล ICMP หรือ ping ได้ ให้เพิ่มกฎของ iptables ดังนี้<br />
<span class="style74">#Allow ping to myserver<br />
SERVER_IP="192.168.182.1"<br />
iptables -A INPUT -p icmp --icmp-type 8 -s 0/0 -d
$SERVER_IP -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT<br />
iptables -A OUTPUT -p icmp --icmp-type 0 -s $SERVER_IP -d 0/0 -m state --state ESTABLISHED,RELATED -j ACCEPT</span><br />
</li>
<li>ทำการ Enable firewall script ด้วยคำสั่ง<br />
<span class="style74">/etc/init.d/chilli.iptables</span></li>
</ol>
<div class="style83">
ติดตั้ง Apache และ PHP</div>
<ol>
<li>ติดตั้ง Apache Web Server ด้วยคำสั่ง<br />
<span class="style84">apt-get install apache2</span></li>
<li>start apache ด้วยคำสั่ง<br />
<span class="style84">/etc/init.d/apache2 start</span></li>
<li>ตรวจสอบว่า apache ทำงานหรือไม่ด้วยคำสั่ง<br />
<span class="style84">netstat -lnt</span><br />
ถ้าทำแล้วจะต้องมีคำว่า<br />
<span class="style74">tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN</span></li>
<li>ติดตั้ง PHP5 ด้วยคำสั่ง<br />
<span class="style84">apt-get install php5</span></li>
<li>restart apache ด้วยคำสั่ง<br />
<span class="style84">/etc/init.d/apache2 restart</span></li>
</ol>
<div class="style83">
สร้างหน้าต่าง Login</div>
<ol>
<li>โดยปกติตำแหน่งที่เป็น ScriptAlias /cgi-bin/ ของ apache จะอยู่ที่ /usr/lib/cgi-bin/</li>
<li>ให้ทำการเปลี่ยนไดเร็กทอรีเข้าไปยังตำแหน่งดังกล่าว
แล้วใ้ช้ีคำสั่ง ls จะเห็นชื่อไฟล์ชื่อว่า hotspotlogin.cgi
ซึ่งเป็นไฟล์ที่ถูกสร้างขึ้นในขั้นตอนการติดตั้ง chillispot</li>
<li>ทำการแก้ไขไฟล์ดังกล่าวโดยให้เอาเครื่องหมาย # หน้าคำว่า $uamsecret และ $userpassword ออกและำกำหนดค่าเป็นดังนี้<br />
<span class="style84">$uamsecret = "uamsecret";<br />
$userpassword=1;</span></li>
<li> เมื่อแก้ไขเสร็จแล้วทำการ restart chillispot ด้วยคำสั่ง<br />
/etc/init.d/chillispot start</li>
<li>ทำการสร้างไฟล์ welcome.html ด้วยคำสั่ง<br />
<span class="style84">vim /var/www/welcome.html</span></li>
<li>ทำการเพิ่มข้อความต่อไปนี้ลงไปในไฟล์ welcome.html<br />
<span class="style74"><html><br />
<head><title> Welcome to Our Hotspot, Wireless Network </title></head><br />
<body><br />
<center><br />
<H1><font color="red">TESTING ONLY</font></H1><br />
<img src="chillispot.png"><br />
<H3><font color="blue">Welcome to Our Hotspot, Wireless Network.</font></H3><br />
<p>You are connected to an authentication and restricted network access point.<br />
<H3><a href="http://192.168.182.1:3990/prelogin">Click here to login</a></H3><br />
<p><br />
<p>Enjoy.<br />
</center><br />
</body><br />
</html></span></li>
<li>ถ้าต้องการรูป chillispot.png ให้ทำการดาว์นโหลดโดยใช้คำสั่ง<br />
<span class="style84">wget http://mamboeasy.psu.ac.th/~wiboon.w/images/stories/chillispot/chillispot.png<br />
cp chillispot.png /var/www</span></li>
</ol>
<div class="style83">
เซ็ตอัพ SSL</div>
<ol>
<li>ติดตั้ง SSL โดยใช้คำสั่งต่อไปนี้<br />
<span class="style84">apt-get install ssl-cert</span></li>
<li>สร้างไดเร็กทอรี่ขึ้นมาเพื่อเก็บ Certificate ที่ถูกสร้างขึ้น โดยใช้คำสั่ง<br />
<span class="style84">mkdir /etc/apache2/ssl</span></li>
<li>ทำการสร้าง self-signed cerfiticate ด้วยคำสั่งดังต่อไปนี้<br />
<span class="style84">make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem</span></li>
<li>แล้วจะถูกถามคำถามต่าง ๆ แต่ใน ubuntu 8.10 อาจจะถามแค่ hostname<br />
Country Name : <span class="style74">ป้อน TH</span><br />
State or Province Name : <span class="style74">ป้อนจังหวัด</span><br />
Locality Name : <span class="style74">ป้อนชื่อที่เหมาะสม</span><br />
Organization : ป้อนชื่อองค์กร<br />
hostname : <span class="style74">localhost (ควรจะใช้ hostname ที่เป็นจริง ของผู้เขียนแค่ทดลอง)</span><br />
Email : <span class="style74">ป้อนอีเมล</span>์<br />
</li>
<li>ทำการ install module ssl ด้วยคำสั่ง<br />
<span class="style84">a2enmod ssl</span></li>
<li>ให้รันคำสั่งต่อไปนี้เพื่อ active new configuration<br />
<span class="style84">/etc/init.d/apache2 restart</span></li>
<li>สร้าง virtual host ชื่อ hotspot ขึ้นมาด้วยคำสั่งต่อไปนี้<br />
<span class="style84">vim /etc/apache2/sites-available/hotspot</span></li>
<li>เพิ่มข้อความต่อไปนี้ลงไปในไฟล์<br />
<span class="style74">NameVirtualHost 192.168.182.1:443<br />
<VirtualHost 192.168.182.1:443><br />
ServerAdmin adisorn.k@cattelecom.com<br />
DocumentRoot "/var/www"<br />
ServerName "192.168.182.1"<br />
<Directory "/var/www/"><br />
Options Indexes FollowSymLinks MultiViews<br />
AllowOverride None<br />
Order allow,deny<br />
allow from all<br />
</Directory><br />
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br />
<Directory "/usr/lib/cgi-bin/"><br />
AllowOverride None<br />
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
ErrorLog /var/log/apache2/hotspot-error.log<br />
LogLevel warn<br />
CustomLog /var/log/apache2/hotspot-access.log combined<br />
ServerSignature On<br />
SSLEngine on<br />
SSLCertificateFile /etc/apache2/ssl/apache.pem<br />
</VirtualHost></span></li>
<li><span class="style75">ทำการ Enable SSL VirtualHost ด้วยคำสั่งต่อไปนี้</span><span class="style74"><br />
</span><span class="style84">a2ensite hotspot</span></li>
<li class="style75">ทำการ reload apache ด้วยคำสั่ง<br />
/etc/init.d/apache2 reload</li>
<li><span class="style75">การ Listen port ของ https
(SSL) โดย default จะเป็นพอร์ต 443 ให้ทำการแก้ไขค่าคอนฟิกที่เกี่ยวกับ
port ของ SSL ที่ไฟล์ /etc/apache2/ports.conf ให้มีค่าเป็นดังนี้<br />
<br />
</span><img border="1" height="181" src="http://www.itmanage.info/technology/linux/ubuntu/chillihospot/p1.png" width="400" /><br />
<br />
</li>
<li>เปลี่ยนแปลงค่าให้มีการ Listen port ที่เป็น default
http (80) ด้วยการแก้ไขไฟล์
/etc/apache2/site-available/default โดยให้มีโครงสร้างของ VirtualHost
เป็นดังนี้<br />
<span class="style84">NameVirtualHost *:80<br />
<VirtualHost *:80><br />
…<br />
…<br />
</VirtualHost></span><br />
<br />
</li>
<li>ทำการกำหนดค่า ServerName ในไฟล์ /etc/apache2/apache2.conf ให้มีค่าดังนี้<br />
<span class="style84">ServerName 192.168.182.1</span> (ของผู้เขียนไม่ได้กำหนดค่านี้ก็ทำงานได้)<br />
<br />
</li>
<li>ทำการ restart apache ด้วยคำสั่ง <br />
<span class="style84">/etc/init.d/apache restart</span><br />
<br />
</li>
<li>เืมื่อเอาเครื่อง client มาเชื่อมใช้งานหลังเครื่อง
Authentications Gateway ก็ได้จะรับ IP address ที่ Authentications
Gateway จ่ายมาให้โดย ค่า Gateway IP ที่ได้ เป็นค่าที่ชี้ไปยัง
Authentication Server ดังนั้นเมื่อเปิดใ้ช้งาน Browser ตัว Authentication
Gateway จะบังคับให้มีการ Redirect ไปยัง https ดังรูป ให้คลิ๊กที่คำว่า
Continue to this website (not recommended)<br />
<br />
<img border="1" height="236" src="http://www.itmanage.info/technology/linux/ubuntu/chillihospot/p2.png" width="400" /><br />
<br />
</li>
<li>จากนั้นจะได้หน้าต่างแจ้งข้อมูลดังรูป ให้คลิ๊กที่ Link --> Click Here to login<br />
<br />
<img border="1" height="183" src="http://www.itmanage.info/technology/linux/ubuntu/chillihospot/p3.png" width="400" /><br />
<br />
</li>
<li>จากนั้นจะได้หน้า่ต่างให้ป้อน username และ password ดังรูป<br />
<br />
<img border="1" height="153" src="http://www.itmanage.info/technology/linux/ubuntu/chillihospot/p4.png" width="400" /><br />
<br />
</li>
<li>ถ้า Login ถูกต้องจะได้ผลดังรูป<br />
<br />
<img border="1" height="186" src="http://www.itmanage.info/technology/linux/ubuntu/chillihospot/p5.png" width="400" /><br />
</li>
</ol>
<span class="style79">กรณีที่ต้องการบังคับให้ผู้ใช้งานเว็บต้องใช้งานผ่าน Proxy ต้องทำดังขั้นตอนต่อไปนี้</span><br />
<ol>
<li>ติดตั้ง squid ด้วยคำสั่ง<br />
<span class="style84">apt-get install squid</span></li>
<li>แก้ไขไฟล์คอนฟิกของ squid คือไฟล์ /etc/squid/squid.conf ดังนี้
<ol>
<li>เอาเครื่องหมาย # ไปไว้หน้าคำว่า http_port 3128 เพื่อกำหนดให้เป็นคอมเมนต์</li>
<li>หาข้อความว่า # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS แล้วข้อความเพิ่มเติมอีก 3 บรรทัดต่อไปนี้<br />
<span class="style84">acl chillispot src 192.168.182.0/255.255.255.0<br />
http_port 192.168.182.1:3128 transparent<br />
http_access allow chillispot</span><br />
<em>คำอธิบาย</em><br />
<span class="style85"># http_port 3128 เป็นการยกเลิกการทำงานของโปรแกรมแบบไม่ทำ transparent<br />
visible_hostname ต้องกำหนดชื่อเครื่องให้ระบบ หากไม่กำหนด อาจมีปัญหาในการ start service<br />
acl chillispot src เป็นการกำหนดค่าเน็ตเวิร์กของเครือข่ายที่จะอนุญาตให้ใช้งานผ่านโปรแกรม Squid<br />
http_port x.x.x.x.3128 transparent เป็นการกำหนดให้พอร์ต 3128 เป็น transparent proxy<br />
http_access allow กำหนดค่า Access Control ให้เน็ตเวิร์ควง chillispot สามารถใช้งานผ่าน transparent proxy ได้</span></li>
<li>หาคำว่า visible_hostname แล้วใส่ชื่อหลังคำดังกล่าวเช่น<br />
<span class="style84">visible_hostname myproxy</span><br />
</li>
</ol>
</li>
<li>สั่งให้โปรแกรม squid ทำงานด้วยคำสั่ง<br />
<span class="style84">/etc/init.d/squid start</span></li>
<li>ทำการส่งต่อ packet ที่เข้ามาทางพอร์ต 80 ไปยัง squid
พอร์ต 3128 ด้วย คำสั่ง iptables โดยเพิ่มในไฟล์
/etc/init.d/chilli.iptables ดังนี้<br />
<span class="style84">iptables -t nat -A PREROUTING -i tun0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128</span></li>
<li>ทำการอนุญาตให้ใช้งาน INPUT ที่เป็น syn flag ดังนี้<br />
<span class="style84">iptables -A INPUT -i tun0 -p tcp -m tcp --dport 3128 --syn -j ACCEPT</span></li>
<li>ต้องเิพิ่ม rule ต่อไปนี้เพื่อป้องกันการเ้้ข้าใช้งานระบบโดยการแอบตั้งค่า proxy เอง<br />
<span class="style84">iptables -t nat -I PREROUTING -p tcp -m tcp –dport 3128 -j DROP</span></li>
</ol>
<div class="style83">
การจัดการเรื่อง Log</div>
การจัดการเรื่อง Log
ในที่นี้จะเลือกข้อมูลการจราจรที่สำคัญจากเครื่องที่เป็น Authentication
Gateway และ Log ของ Server อื่น ๆ (ถ้ามี) ส่งไปยังเครื่อง Centralized
Log Server เหตุผลที่เรามีการคัดเฉพาะส่วนที่ำจำเป็นก็คือ
เพื่อไม่ให้ปริมาณทราฟฟิกของข้อมูลการจราจร
ทำให้การใช้งานระบบเครือข่ายคอมพิวเตอร์ช้าลง หรือเปลืองแบนด์วิดธ์ของระบบ<br />
<br />
สำหรับเซอร์วิสที่สำคัญที่จะ้ต้องส่งต่อข้อมูลการจราจรคอมพิวเตอร์ได้แก่
squid และ radius ขณะเดียวกันเราจะต้องใช้หลักการของ IPTABLES
เพื่อทำการคัดเลือกข้อมูลเบื้องต้นสำหรับการใช้งานผ่านพอร์ตต่าง ๆ
ที่เป็นเซอร์วิสพื้นฐานเพื่อจัดเก็บข้อมูลการจราจรคอมพิวเตอร์ เช่น http,
https, ftp, smtp, imap, pop3, IM เป็นต้น<br />
<br />
<span class="style83">Install Time Server</span><br />
ด้วย
พรบ.ได้กำหนดว่าต้องตั้งนาฬิกาของอุปกรณ์บริการทุกชนิดให้ตรงกับเวลาอ้างอิง
สากล (Stratum0) ซึ่งเราควรจะติดตั้ง NTP Server ไว้บน Server
เครื่องใดเครืองหนึ่ง ซึ่งในที่นี้เลือกเครื่องที่เป็น Log Server
เพื่อกระจายสัญญาณนาฬิกาให้กับเครื่อง Server และเครื่อง Workstation อืน ๆ
ทั้งหมดในระบบเป็นลำดับที่ 1 ส่วนลำดับที่ 2 และ 3
ให้อ้างอิงไปยังฐานฐานเวลาภายนอก
โดยรูปแบบการอ้างอิงฐานเวลาเป็นดังรูปข้างล่าง<br />
<br />
<img border="1" height="335" src="http://www.itmanage.info/technology/linux/ubuntu/chillihospot/ntp.png" width="400" /><br />
รูปแสดงการอ้างอิงฐานเวลา<br />
<br />
ส่วนตารางข้างล่างเป็นการอิงเวลามาตรฐานของประเทศไทย<br />
<br />
<img height="240" src="http://www.itmanage.info/technology/linux/ubuntu/chillihospot/clock_ref.png" width="400" /><br />
ตารางแสดงการอิงเวลามาตรฐานของประเทศไทย<br />
<span class="style83"><br />
ขั้นตอนการติดตั้ง NTP Server ที่เครื่อง Log Server เป็นดังนี้</span><br />
<ol>
<li>ติดตั้ง ntp ด้วยสั่ง <br />
<span class="style84">apt-get instal ntp</span></li>
<li>ทำการสำเนาไฟล์คอนฟิกของ ntp ไปไว้เป็นอีกชื่อดังนี้<br />
<span class="style84">cp /etc/ntp.conf /etc/ntp.conf.bak</span></li>
<li>แก้ไขไฟล์ /etc/ntp.conf ให้มีค่าเป็นดังนี้<br />
<span class="style85">restrict default kod nomodify notrap noquery nopeer<br />
restrict 127.0.0.1<br />
# อนุญาตให้ Internal network เข้าใช้งาน<br />
restrict 172.24.51.0 mask 255.255.255.0 nomodify notrap<br />
server 203.185.69.60 dynamic<br />
server time.navy.mi.th dynamic<br />
server time.nist.gov dynamic<br />
server 127.127.1.0 # local clock<br />
fudge 127.127.1.0 stratum 10<br />
driftfile /var/lib/ntp/ntp.drift
<br />
broadcastdelay 0.008<br />
keys /etc/ntp/keys</span></li>
<li>ตรวจสอบ Remote Server ที่ต้องการใช้อ้างอิงฐานเวลา ใช้คำสั่งดังนี้<br />
<span class="style84">apt-get install ntpdate<br />
ntpdate -b 203.185.69.60<br />
ntpdate -b time.navy.mi.th<br />
ntpdate -b time.nist.gov</span></li>
<li>สั่ง restart service ด้วยคำสั่ง<br />
<span class="style84">/etc/init.d/ntp restart</span></li>
<li>หลังจากที่ Server ทำงานปกติไม่มีการแจ้ง error ใด ๆ สามารถตรวจสอบตารางการทำงานของ Server ด้วยคำสั่ง<br />
<span class="style84">ntpq -pn</span><br />
ซึ่งจะได้ผลดังนี้<br />
<br />
<span class="style85">remote refid st t when poll reach delay offset jitter<br />
==========================================<br />
203.185.69.60 .INIT. 16 u - 64 0 0.000 0.000 0.000<br />
118.175.67.83 .INIT. 16 u - 64 0 0.000 0.000 0.000<br />
192.43.244.18 .INIT. 16 u - 64 0 0.000 0.000 0.000<br />
127.127.1.0 .LOCL. 10 l 54 64 7 0.000 0.000 0.001<br />
</span><br />
</li>
<li>สามารถใช้เครื่อง Linux เครื่องอื่นในระบบทดสอบการทำงานของ Server ได้ด้วยคำสั่ง<br />
ntpdate <ip address> ใส่ ip address ของเครื่อง NTP Server</li>
</ol>
<span class="style83">ขั้นตอนการติดตั้ง NTP Server ที่เครื่อง Server เครื่องอื่น (NTP client) เป็นดังนี้</span><br />
<ol>
<li>ติดตั้ง ntp ด้วยสั่ง <br />
<span class="style84">apt-get instal ntp</span></li>
<li>ทำการสำเนาไฟล์คอนฟิกของ ntp ไปไว้เป็นอีกชื่อดังนี้<br />
<span class="style84">cp /etc/ntp.conf /etc/ntp.conf.bak</span></li>
<li>แก้ไขค่าคอนไฟล์ของเครื่อง Linux Server อื่น ๆ ที่ไฟล์ /etc/ntp.conf ดังนี้<br />
<span class="style85">server 192.168.9.12 </span><span class="style75">## ip address ของ NTP Server</span><span class="style85"><br />
restrict 127.0.0.1<br />
driftfile /var/lib/ntp/ntp.drift </span></li>
</ol>
หมายเหตุ : สำหรับการทำ NTP Server จะมีการใช้งานโปรโตคอล
NTP ซึ่งทำงานที่ port 123 ดังนั้นต้องดูเรื่องของ Firewal ให้เปิด port
ดังกล่าวด้วย<br />
<span class="style83">การติดตั้ง syslog-ng ที่ centralized log</span><br />
<ol>
<li>ติดตั้ง syslog-ng ด้วยคำสั่ง<br />
<span class="style84">apt-get install syslog-ng</span></li>
<li>สำเนาไฟล์คอนฟิกของ syslog-ng คือไฟล์ /etc/syslog-ng/syslog-ng.conf ด้วยคำสั่ง<br />
<span class="style84">cp /etc/syslog-ng/syslog-ng.conf /etc/syslog-ng/syslog-ng.conf.bak</span></li>
<li>แ้ำก้ไขค่าคอนฟิกในไฟล์ /etc/syslog-ng/syslog-ng.conf
ตามความเหมาะสม ซึ่งในที่นี้ให้แก้ไขค่าในส่วนของ options
ซึ่งมีโครงสร้างเป็นดังนี้<br />
<span class="style74">options {<br />
- - - - -<br />
- - - - -<br />
- - - - -<br />
} </span><br />
โดยให้เพิ่มข้อความต่อไปนี้ลงไปในส่วนของ options
เพื่อให้ syslog-ng ทำการเก็บชื่อ hostname ของเครื่องที่ส่ง log เข้ามา<br />
<span class="style74">keep_hostname (yes);</span><br />
</li>
<li>จากรูปเครือข่ายของผู้เขียนจะเห็นว่าโปรแกรม Freeraius
ติดตั้งอยู่ีที่เดียวกับเครื่อง Centralized log ซึ่งปกติแล้ว detail file
ซึ่งเป็นไฟล์ที่เก็บข้อมูลการ Login เข้าใช้งานโปรแกรม Freeradius
จะอยู่ในตำแหน่ง
/var/log/freeradius/radacct/ipaddress_of_client/detail-Ymd โดยค่า Ymd
คือ Year month day
ซึ่งชื่อไฟล์จะมีการแปรเปลี่ยนตามปีเดือนวัน ฉะนั้นถ้าต้องการให้สามารถส่ง
detail file ดังกล่าวไปยัง syslog ได้
เราจะต้องทำการเปลี่ยนชื่อไฟล์ดังกล่าวให้มีชื่อที่คงที่คือไม่มีปีเดือน
วัน ด้วยการเปลี่ยนตัวแปร detailfile ในไฟล์ /etc/freeradius/radiusd.conf
ดังนี้<br />
ให้เปลี่ยนค่า <span class="style84">detailfile = ${radacctdir}/%{Client-IP-Address}/detail-%Y%m%d</span> เป็น<br />
<span class="style84">detailfile = ${radacctdir}/%{Client-IP-Address}/details</span><br />
หมายเหตุ ถ้าไม่ต้องการส่ง freeradius detail file ไปยัง syslog ก็ไม่ต้องทำขั้นตอนนี้</li>
<li>เพิ่ม log rotate ของ freeeradius ในส่วนของ detail
file เื่ืพื่อแก้ปัญหาขนาดไฟล์ที่อาจจะใหญ่เกินไป
ด้วยการเพิ่มข้อมูลต่อไปนี้ไปต่อท้ายของไฟล์ /etc/logrotate.d/freeradius<br />
<br />
<span class="style84">/var/log/radius/radacct/172.24.51.16/details {<br />
rotate 13<br />
weekly<br />
missingok<br />
notifempty<br />
compress<br />
}</span><br />
หมายเหตุ ค่า 172.24.51.16 เป็น IP address ของเครื่อง
client ที่เข้ามาใช้งาน freeradius server ซึ่งจากรูปคือเครื่อง
172.24.51.252 แต่มีการใช้งานผ่าน firewall ที่มีการทำ nat
จึงต้องเปลี่ยนค่า IP เป็น 172.24.51.16</li>
<li>สั่งให้มีการส่งขอมูลของ freeradius server
ซึ่งในที่นี้คือ detail file ดังที่กล่าวมาไปยัง syslog-ng agent
ด้วยการสร้างไฟล์ขึ้นมาหนึ่งไฟล์ในที่นี้คือ /etc/init.d/rc.capture
และให้ป้อนข้อมูลต่อไปนี้เข้าไปในไฟล์<br />
<span class="style84">#!/bin/bash<br />
tail -F /var/log/radius/radacct/127.0.0.1/details | logger -t freeradius -p local3.info&</span> </li>
<li>จากนั้นสั่งให้สามารถรันได้และสร้าง Link ให้ทำงานทุกครั้งหลังเิปิดเครื่องด้วยคำสั่ง<br />
<span class="style84">chmod a+x /etc/init.d/rc.capture<br />
ln -s /etc/init.d/rc.capture /etc/rcS.d/S88rccapture</span></li>
<li>ซึ่งเมื่อเราไปเปิด log file ของ syslog-ng
(/var/log/syslog) ก็จะเห็นค่าของการ login เข้าใช้งาน freeradius
เหมือนกับค่าในไฟล์ detail file ของ freeradius ดังรูป<br />
<br />
<img border="1" height="281" src="http://www.itmanage.info/technology/linux/ubuntu/chillihospot/syslog_file_freeradius.png" width="400" /><br />
</li>
</ol>
<span class="style83">การติดตั้ง syslog-ng ที่เครื่อง Authentication Gateway</span><br />
<ol>
<li>ติดตั้ง syslog-ng ด้วยคำสั่ง<br />
<span class="style84">apt-get install syslog-ng</span></li>
<li>กำหนดให้เครื่อง Authentication Gateway ส่ง log ไปยัง
Centralized log ด้วยการเพิ่มเติมค่าคอนฟิกในไฟล์
/etc/syslog-ng/syslog-ng.conf ดังนี้<br />
<span class="style84">destination remote {<br />
udp("192.168.9.12" port(514));<br />
};<br />
log {source(s_all); filter(f_messages); destination(remote); };<br />
log {source(s_all); filter(f_kern); destination(remote); };</span><br />
<br />
สคริปต์ข้างบนเป็นการส่ง log ไปยังเครื่อง 192.168.9.12</li>
<li>ทำการส่งค่า log ของ squid
(/var/log/squid/access.log) ไปยัง syslog-ng agent ซึ่งก็คือส่งไปยัง
syslog-ng agent ของเครื่องตัวเอง และหลังจากนั้น syslog-ng agent
ในเครื่องตัวเองก็จะส่งต่อไปยัง remote syslog ต่อไป โดยการส่งมี 2
วิธีคือ
<div class="style85">
วิธีที่ 1 ส่ง log ของ squid
ที่เก็บไว้ในไฟล์ /var/log/squid/access.log
ในลักษณะที่สำเนาต่อไปยังยังเครื่อง centralized log ซึ่งทำได้ดังนี้</div>
<ol>
<li>ด้วยการสร้างไฟล์หนึ่งไฟล์ในที่นี้ชื่อว่า <span class="style74">/etc/init.d/rc.capture</span> และมีข้อความในไฟล์ดังนี้<br />
<span class="style84">#!/bin/bash</span><br />
<span class="style84">tail -F /var/log/squid/access.log | logger -t squid -p local3.info</span></li>
<li>จากนั้นสั่งให้สามารถรันได้และสร้าง Link ให้ทำงานทุกครั้งหลังเิปิดเครื่องด้วยคำสั่ง<br />
<span class="style84">chmod a+x /etc/init.d/rc.capture<br />
ln -s /etc/init.d/rc.capture /etc/rcS.d/S88rccapture</span></li>
<li>เมื่อเราไปเิปิดดู log ที่ไฟล์ /var/log/syslog ของเครื่อง Centralized log จะได้ Log ของ squid ดังรูป<br />
<br />
<img height="151" src="http://www.itmanage.info/technology/linux/ubuntu/chillihospot/syslog_file_squid.png" width="400" /><br />
รูปแสดง Log ของ squid บนเครื่อง Centralized Log<br />
</li>
</ol>
<div class="style85">
วิธีที่ 2 ส่ง log ของ squid
ไปยังเครื่อง Centralized log โดยไม่มีการเก็บ squid log
(/var/log/squid/access.log) ไว้ในเครื่องของตัวเอง ทำดังนี้</div>
<ol>
<li>แก้ไขไฟล์ /etc/squid/squid.conf โดยแก้ไขค่าดังนี้<br />
ของเดิม<br />
<span class="style84">access_log /var/log/squid/access.log squid</span><br />
แก้ไขเป็น<br />
<span class="style84">access_log syslog:local7.info</span> หรือ<br />
<span class="style84">access_log syslog:local0.notice</span> หรือ<br />
<span class="style84">access_log syslog:local0.warning</span> หรือแบบอื่น ขึ้นอยู่กับ facility และ priority<br />
</li>
<li>สั่ง reconfigure squid ด้วยคำัสั่ง<br />
<span class="style84">squid -k reconfigure</span><br />
<br />
</li>
</ol>
</li>
<li>ที่ผ่านมาจะเราสามารถเก็บ Log ของ Freeradius
ซึ่งอยู่บนเครื่อง Centralized Log และเก็บ Log ของ Squid ที่อยู่ ณ
เครื่อง Authentication Gateway ได้แล้ว ซึ่งเป็น Log หลัก
ที่ควรจะเก็บเอาไว้ ต่อไปนี้ก็จะขึ้นอยู่กับนนโยบายของแต่ละหน่วยงานว่ามี
การเปิดให้ใช้งานโปรโตคอลอื่น ๆ บน Authentication Gateway นอกเหนือจาก web
หรือไม่ ซึ่งถ้าไม่เป็น การเก็บ Log แค่นี้ก็อาจจะเพียงพอแล้ว เพราะทุก
application ที่ผู้ใช้ใช้งาน มีการใช้ผ่่าน squid อย่า่งเดียว
แต่ถ้ามีการใช้งานโปรโตคอลอื่น ๆ ด้วย ก็จะ้ต้องมีการเก็บ Log
เพิ่มเติมต่อไป</li>
<li>ในกรณีที่ต้องการเก็บ Log
ของทราฟฟิกทั้งหมดที่เข้าทางขา eth1 (ซึ่ง chillispot จะสร้าง interface
ที่เป็น tun0 ขึ้นมา) และออกทางขา eth0 ของ Authentication Gateway
ให้เพิ่มคำสั่ง iptables ลงไปในไฟล์ <span class="style74">/etc/init.d/rc.capture </span>โดยให้เพิ่มคำสั่งต่อไปนี้ลงไป<br />
<span class="style84">iptables -A FORWARD -i tun0 -o eth0 -j LOG --log-level info --log-prefix "FORWARD "</span></li>
</ol>
<div class="style83">
การส่ง Log จาก Server อื่น ๆ ไปยัง Centralized Log</div>
<ol>
<li><span class="style75">ติดตั้ง NTP Server ที่เครื่อง Server เครื่องอื่น (NTP client) ตามวิธีการที่ได้กล่าวมาแล้วข้างบน</span><br />
</li>
<li>ติดตั้ง syslog-ng ด้วยคำสั่ง<br />
<span class="style84">apt-get install syslog-ng</span></li>
<li>กำหนดให้เครื่อง Server อื่น ๆ ส่ง log ไปยัง Centralized log ด้วยการเพิ่มเติมค่าคอนฟิกในไฟล์ /etc/syslog-ng/syslog-ng.conf ดังนี้<br />
<span class="style84">destination remote {<br />
udp("202.129.16.26" port(514));<br />
};<br />
log {source(s_all); filter(f_messages); destination(remote); };<br />
log {source(s_all); filter(f_kern); destination(remote); };</span><br />
<br />
สคริปต์ข้างบนเป็นการส่ง log ไปยังเครื่อง 202.129.16.26</li>
<li>แ้ก้ไขการกำหนดค่า log ของ Apache ที่ไฟล์คอนฟิกของ Apache (/etc/apache2/sites-available/default) เป็นดังนี้
ของเดิม<br />
<span class="style84">LogLevel warn</span><br />
แก้ไขเป็น<br />
<span class="style84">LogLevel notice</span><br />
<br />
</li>
</ol>
<blockquote>
<span class="style88">กรณี Apache Web Server ให้ทำดังนี้</span><br />
<span class="style85">วิธีที่ 1 ทำการส่ง log
ที่ถูกเก็บเอาไว้ในเครื่อง Web Server แล้ว (/var/log/apache2/access.log)
และให้สำเนาส่งไปยัี่งครื่อง Centralized log ด้วย ทำดังนี้</span><br />
<ol>
<li> สร้างไฟล์ขึ้นมาหนึ่งไฟล์ในที่นี้ชื่อว่า <span class="style74">/etc/init.d/rc.capture</span> และมีข้อความในไฟล์ดังนี้<br />
<span class="style84">#!/bin/bash</span><br />
<span class="style84">tail -F /var/log/apache2/access.log | logger -t apache2_copy -p local3.info</span></li>
<li>จากนั้นสั่งให้สามารถรันได้และสร้าง Link ให้ทำงานทุกครั้งหลังเิปิดเครื่องด้วยคำสั่ง<br />
<span class="style84">chmod a+x /etc/init.d/rc.capture<br />
ln -s /etc/init.d/rc.capture /etc/rcS.d/S88rccapture</span></li>
<li>เมื่อเราไปเิปิดดู log ที่ไฟล์ /var/log/syslog ของเครื่อง Centralized log จะได้ Log ของ apache ดังรูป<br />
<br />
<img border="1" height="197" src="http://www.itmanage.info/technology/linux/ubuntu/chillihospot/syslog_file_apache2.png" width="400" /><br />
<br />
จากรูปจะเห็นคำว่า <span class="style84">ns2</span> ซึ่งเป็นชื่อ host ของ Web Server และคำว่า <span class="style84">apache2_copy</span> ซึ่งเป็นข้อความที่อยู่หลัง <span class="style79">-t </span>ของคำสั่งที่กล่าวมา โดยเราสามารถที่จะเปลี่ยนแปลงค่าได้ตามความเหมาะสม เพื่อให้บ่งบอกได้ว่าเป็น log ประเภทไหน</li>
</ol>
<div class="style85">
วิธีที่ 2 กำหนดให้ส่ง log จาก Apache
Web Server (/var/log/apache2/access.log) ไปยัง Centralized Log
โดยไม่มีการสำเนาเก็บไว้ที่ Apache Web Server ทำดังนี้</div>
<ol>
<li>แก้ไขคอนฟิกไฟล์ของ Apache (/etc/apache2/sites-available/default) ในส่วนของ Log ดังนี้<br />
ของเดิม<br />
<span class="style84">CustomLog /var/log/apache2/access.log combined</span><br />
แก้ไขเป็น<br />
<span class="style84">CustomLog "|/usr/bin/logger -t apache2 -p local1.info" combined</span></li>
<li>สั่ง restart apache ด้วยคำสั่ง<br />
<span class="style84">/etc/init.d/apache2 restart</span></li>
<li>เมื่อเราไปเิปิดดู log ที่ไฟล์ /var/log/syslog ของเครื่อง Centralized log จะได้ Log ของ apache ดังรูป<br />
<br />
<img border="1" height="218" src="http://www.itmanage.info/technology/linux/ubuntu/chillihospot/syslog_file_apache2_logger.png" width="400" /></li>
</ol>
</blockquote>
<div class="style83">
การสั่งให้ Centralized log มีการเก็บ Log แบบกลั่นกรอง (Filter)</div>
ที่ผ่านมาการเก็บ Log ของ Centralized Log Server
มีการเก็บ log ไว้ที่ไฟล์ /var/log/syslog ทั้งหมด
ซึ่งจะยากต่อการมอนิเตอร์ วิธีการแก้ทำได้ด้วยการสั่งให้ syslog-ng
มีการเก็บ log แบบกลั่นกรองคือกำหนดให้มีการเก็บ log
ของแต่ละโปรแกรมหรือแต่ละบริการ แยกไฟล์ต่างหาก <br />
ซึ่งสามารถทำได้ด้วยการแก้ไขไฟล์ /etc/syslog-ng/syslog-ng.conf แล้วเพิ่มค่าการ Filter ดังต่อไปนี้<br />
<ul>
<li>สำหรับฟิลเตอร์โปรแกรม Freeraduis<br />
<br />
<span class="style84">filter f_radius { match("radius"); };<br />
destination d_radius {<br />
file("/var/log/$HOST/$YEAR/$MONTH/radius.$YEAR-$MONTH-$DAY"<br />
owner(root) group(adm) perm(665)<br />
create_dirs(yes) dir_perm(0775));<br />
};<br />
log { source(s_all); filter(f_radius); destination(d_radius); };</span><br />
<br />
</li>
<li>สำหรับฟิลเตอร์โปรแกรม squid<br />
<br />
<span class="style84">filter f_squid { match("squid"); };<br />
destination d_squid {<br />
file("/var/log/$HOST/$YEAR/$MONTH/squid.$YEAR-$MONTH-$DAY"<br />
owner(root) group(adm) perm(665)<br />
create_dirs(yes) dir_perm(0775));<br />
};<br />
log { source(s_all); filter(f_squid); destination(d_squid); };</span><br />
<br />
</li>
<li>สำหรับฟิลเตอร์โปรแกรม apache<br />
<br />
<span class="style84">filter f_apache { match("apache"); };<br />
destination d_apache {<br />
file("/var/log/$HOST/$YEAR/$MONTH/apache.$YEAR-$MONTH-$DAY"<br />
owner(root) group(adm) perm(665)<br />
create_dirs(yes) dir_perm(0775));<br />
};<br />
log { source(s_all); filter(f_apache); destination(d_apache); };</span></li>
</ul>
<div class="style85">
หมายเหตุ คำว่า match สำมารถใช้คำว่า program แทนได้</div>
ซึ่งเมื่อเราทำการฟิลเตอร์แล้ว เมื่อเข้าไปดูไฟล์ในไดเร็กทอรี่ที่กำหนด ก็จะได้ไฟล์เป็นดังรูป<br />
<img height="89" src="http://www.itmanage.info/technology/linux/ubuntu/chillihospot/p6.png" width="318" /><br />
รูปแสดง ไฟล์ที่เก็บ Log ซึ่งผ่านการ Filter แล้ว บน
Centralized log ซึ่งเป็น Log ของ radius ที่ส่งมาจาก Server มีชื่อ
Hostname เป็น qc<br />
<br />
<img height="86" src="http://www.itmanage.info/technology/linux/ubuntu/chillihospot/p7.png" width="302" /><br />
รูปแสดง ไฟล์ที่เก็บ Log ซึ่งผ่านการ Filter แล้ว
บน Centralized log ซึ่งเป็น Log ของ squid ที่ส่งมาจาก Server มีชื่อ
Hostname เป็น chilli<br />
<br />
<img height="96" src="http://www.itmanage.info/technology/linux/ubuntu/chillihospot/p8.png" width="309" /><br />
รูปแสดง ไฟล์ที่เก็บ Log ซึ่งผ่านการ Filter แล้ว บน
Centralized log ซึ่งเป็น Log ของ apache ที่ส่งมาจาก Server มีชื่อ
Hostname เป็น ns2<br />
<div class="style79">
การเพิ่มชื่อผู้ใช้งานบน FreeRadius</div>
เป็นการเพิ่มข้อมูลเข้าไปยังฐานข้อมูล MySQL ของ FreeRadius ซึ่งมีวิธีการเพิ่มที่สามารถทำได้ 3 วิธีคือ<br />
<ol>
<li>
การเพิ่มผ่านโปรแกรม phpmyprepaid ซึ่งจะไ่ม่ขอกล่าวเพราะสามารถทำได้ง่ายผ่าน GUI <br />
</li>
<li>
การเพิ่มผ่านโปรแกรม phpmyadmin <br />
โดยตารางข้อมูลที่ใช้ี่สำหรับการเพิ่ม user
ในเบื้องต้นมี 2 ตารางคือ ตาราง radcheck ซึ่งมีไว้เพื่อเก็บข้อมูลที่เป็น
username และ password ของผู้ใช้งาน และตารางที่สองชื่อ radreply
มีไว้สำหรับเก็บข้อมูลที่เกี่ยวกับคุณสมบัติการใช้งานของผู้ีใช้
เช่นเวลาในการใช้งานทั้งหมด (Session-Timeout) และเวลาที่เป็นที่เป็น Idle
(Idle-Timeout) โดยข้อมูลตัวอย่างเป็นดังรูป<br />
<br />
ตัวอย่างข้อมูลในตาราง radcheck<br />
<img border="1" height="74" src="http://www.itmanage.info/technology/linux/ubuntu/chillihospot/radcheck.png" width="410" /><br />
<br />
ตัวอย่างข้อมูลในตาราง radreply<br />
<img border="1" height="119" src="http://www.itmanage.info/technology/linux/ubuntu/chillihospot/radreply.png" width="409" /><br />
<br />
<br />
</li>
<li>การเพิ่มผู้ใช้งานด้วยการ import text file ผ่าน phpmyadmin โดยมีขั้นตอนดังนี้
<ol>
<li>สร้าง text file เพื่อสร้างรายชื่อผู้ใช้งานในตาราง radcheck และตาราง radreply ให้มีนามสกุลเป็น *.sql<br />
<br />
ตัวอย่างการเพิ่มรายชื่อผู้ใช้งานในตาราง radcheck<br />
<span class="style84">INSERT INTO radcheck VALUES ('', 'somsak', 'User-Password', '==', 'test123'),<br />
('', 'somchai', 'User-Password', '==', 'test123');</span><br />
<br />
ตัวอย่างการเพิ่มรายชื่อผู้ใช้งานในตาราง radreply<br />
<span class="style84">INSERT INTO radreply VALUES ('', 'somsak', 'Session-Timeout', ':=', 10800),<br />
('', 'somsak', 'Idle-Timeout', ':=', 1200);</span><br />
</li>
<li>เปิด phpmyadmin แล้วเลือกเมนู import เพื่อทำการ
import text file จากนั้นกดปุ่ม Browse เพื่อเลือก text file
ที่ได้สร้างไว้ จากนั้นกดปุ่ม Go เพื่อทำการ import text file<br />
</li>
</ol>
</li>
</ol>
<span class="style79">ยังมีต่ออีกเร็ว ๆ นี้ครับ</span>Computer !http://www.blogger.com/profile/17986004803115235464noreply@blogger.com0tag:blogger.com,1999:blog-3705868336102557107.post-87834928606160411492012-10-03T18:06:00.000-07:002012-10-03T18:06:04.991-07:00วิธีรักษาความปลอดภัยให้ระบบ wireless ของคุณวิธีรักษาความปลอดภัยให้ระบบ wireless ของคุณ<br />
<br />
<img height="240" id="il_fi" src="http://static.ddmcdn.com/gif/wireless-network-1a.jpg" style="padding-bottom: 8px; padding-right: 8px; padding-top: 8px;" width="360" /> <br />
ระบบรักษาความปลอดภัยของ Wireless นั้น เท่าที่ได้สืบค้นจากผลิตภัณฑ์ในตลาด ก็จะมีฟีเจอร์หลักๆ ซึ่งสามารถจัดกลุ่มได้ดังต่อไปนี้ <br />
<br />
<strong>Authentication</strong><br />
<br />
<br />
เป็นเทคโนโลยีที่ปิดกั้นการเข้าใช้ระบบเครือข่าย
โดยแนวคิดพื้นฐานคือหากมี Client ใดต้องการติดต่อกับระบบเครือข่าย
จะต้องผ่านขั้นตอน Authentication นี้ก่อน
โดยจะมีเซิร์ฟเวอร์ที่แยกตัวออกมาทำงานด้านนี้โดยเฉพาะ นั่นคือ
Authentication Server โดย Authentication ในยุคต้น ๆ ของเทคโนโลยีนี้
จะเน้นไปที่เรื่องของ Remote Access ซึ่งเซิร์ฟเวอร์ที่คอยทำงานด้านนี้คือ
RADIUS Server (Remote Access Dial In User Service) และในภายหลัง RADIUS
Server ก็ได้ล้ำหน้าเข้ามาทำหน้าที่ในระบบ LAN
และต่อเนื่องมาจนมารับหน้าที่ใน Wireless Network ในที่สุด<br />
ในหัวข้อของ Authentication นี้ จะโยงและแตกกระจายไปเป็นฟีเจอร์ย่อย ๆ
อีกหลาย ๆ อย่าง เช่น การสร้างฐานข้อมูลของผู้ที่ได้รับอนุญาต,
ความสามารถในการกำหนด Account แบบชั่วคราว, การดึงเอาฐานข้อมูลของ User
จากระบบอื่น ๆ เช่น จาก Windows 2000 ADS มาเป็นฐานข้อมูลสำหรับทำ
Authentication, ฯลฯ ยิ่งฟีเจอร์มากก็ยิ่งแพงครับ<br />
<br />
<strong>Encryption</strong><br />
คือกลไกที่จะคอยแจกจ่าย Encryption key ไปยัง Wireless Client
แต่ละตัวหลังจากที่ได้ผ่านขั้นตอนของ Authentication แล้ว
ซึ่งมักจะเข้าใจผิดกันว่านี่คือหน้าที่โดยตรงของ RADIUS Server
แต่ในความเป็นจริงแล้ว นี่คือการหยิบยื่นหน้าที่อีกอย่างหนึ่งให้กับ RADIUS
Server มากกว่า และเรียกชื่อเซิร์ฟเวอร์ตัวนี้ใหม่ว่า Wi-Fi RADIUS Server<br />
<strong>Surveillance & Monitoring</strong><br />
คืออีกฟีเจอร์หนึ่งที่เพิ่มขึ้นมาตอบสนองความต้องการของระบบรักษาความ
ปลอดภัยใน Wireless network และยังช่วยให้ Wireless network
มีพื้นที่ครอบคลุมที่สมบูรณ์มากขึ้นด้วย โดยส่วนใหญ่แล้ว
ฟีเจอร์นี้จะทำงานประสานกับความสามารถที่มีมากับ Access Point เช่น <br />
การที่ Access Point สามารถจะตอบสนองต่อการร้องของจาก Software เพื่อให้รายงาน MAC address ของ Client ทั้งหมดที่กำลังติดต่ออยู่ <br />
หรือการที่ Access Point สามารถที่จะรายงานกลับมายังซอฟต์แวร์ได้ว่า
Client แต่ละตัวที่ติดต่ออยู่ด้วยนั้น มีระดับสัญญาณประเมินเป็น SN Ratio
(Signal-per-Noice) เท่าไหร่ <br />
หรือหากเก่งกว่านั้น AP จะบอกได้ว่า Client connection ที่เกิดขึ้นได้
มีระยะเวลานานเท่าไหร่แล้ว โดยในฟีเจอร์นี้
จะแตกขยายออกไปเป็นฟีเจอร์ประกอบอื่น ๆ อีกมากมาย เช่น Environment data
log เพื่อเก็บข้อมูลสถิติพฤติกรรมการใช้ Wireless ในแต่ละช่วงเวลา Alert /
Alarm เพื่อรายงานสภาพวิกฤตก่อนที่จะเกิด หรือแจ้งเตือนเมื่อ Wireless
network อยู่ในสภาพที่วิกฤตแล้ว<br />
<br />
<br />
ข้อมูลจาก <span class="style1">http://www.arip.co.th/</span>Computer !http://www.blogger.com/profile/17986004803115235464noreply@blogger.com0tag:blogger.com,1999:blog-3705868336102557107.post-45590110977144898022012-10-03T18:03:00.001-07:002012-10-03T18:03:29.166-07:00ระบบ Authentication Server แบบ แนวๆๆมันคือระบบ <span lang="en-us">authen </span>แบบ
ที่ทำขึ้นมาจากแนวคิด การนำหลักการ ของ <span lang="en-us">iptables </span> มาประยุกต์
ทำให้ สามารถ ระบุ <span lang="en-us">ip </span>แบบ <span lang="en-us">static ip
</span>อีกทั้งยังใช้ <span lang="en-us">dhcp </span>มาทำการแจก
<span lang="en-us">ip </span>ได้ พร้อมทั้งยังทำ <span lang="en-us">Vlan </span>
เข้ามาช่วย เหลือได้ อีกแนวทาง โดยที่ หลักการทำงานของมันจะ ใช้ระบบ สัญญาณ มา
จัดการ การทำงาน ในการ คิด เวลา จะต่ำได้สุด ที่ ทุก 1 นาที ถ้าน้อยกว่านี้ อาจจะ
คาดเคลือนๆ ซึ่ง ข้อดีของ ระบบ นี้ มาด้วยกัน หลากหลายอย่าง
<br />
1. สามารถทำ ระบบ <span lang="en-us">Authen </span>ได้โดย ง่าย ( ปรับ
ให้ใช้งานหรือไม่ใช้งานก็ได้ )<br />
2. สามารถ ระบุ ทางออกของ <span lang="en-us">Output LAN </span>ได้หลาย ทาง (
จะเรียกว่า ระบบ <span lang="en-us">Multi NAT </span>)<br />
2.1 โดย ที่ ยังสามารถที่จะ ระบุ ได้อีกว่า จะให้
<span lang="en-us">Output LAN </span>สามารถทำการ <span lang="en-us">Authen
</span>ได้หรือไม่<br />
2.2 ยังสามารถที่จะจัดการ <span lang="en-us">Forward port
</span>ไปยัง ขา ของฝ่ง <span lang="en-us">Multi NAT </span>ได้อีกด้วย<br />
3. ระบบ <span lang="en-us">Multiple WAN Load Balancer </span> คือ
สามารถทำการเชื่อมต่อได้มากกว่า 1 <span lang="en-us">ISP </span>
มากสุดที่ทำการเชื่อมต่อในตอนนี้คือ 16 เส้น <span lang="en-us">(ISP) <br />
4. </span>ระบบการจัดการเป็นแบบ <span lang="en-us">TEXT File </span>ทำให้การ
ตรวจสอบการใช้งาน ระบบ <span lang="en-us">Query </span>ทำงานได้ เร็ว แต่
ข้อมูลจะต้อง ห้าม ผิดผลาด <br />
5. ระบบ <span lang="en-us">Split </span>แยกเน็ตแยกเกมส์ สามารถ นำหลักการนี้มาใช้
งานในกรณี <span lang="en-us">PFMultiwan Authen </span>เรียกสั้นๆ ว่า<br />
<span lang="en-us">PF-Authen </span>หรือ <span lang="en-us">PF spot
</span>ก็แล้วแต่จะเรียก<br />
<br />
<div align="center">
<span lang="en-us"> < </span>ทำการดาวโหลด
ไฟล์ ได้ที่นี่เลยครับ <a href="http://3poe.no-ip.org/free/PFMULTIWAN_V1.tar.gz"> <span lang="en-us">PFMULTIWAN
V1</span></a><span lang="en-us"> ></span></div>
<br />
<span style="background-color: black;">ว </span><b><span style="color: white;">
<span style="background-color: black;">ขั้นตอนการ ลง </span><span lang="en-us">
<span style="background-color: black;">PFMultiwan Authen Server</span></span><span style="background-color: black;">
</span></span></b><br />
หลังจากทำการโหลด ตัวไฟล์มาแล้ว<br />
<div align="center">
<img border="0" height="543" src="http://3poe.no-ip.org/images/pfauthen/InsClear021.png" width="640" /></div>
<div align="center">
<img border="0" height="337" src="http://3poe.no-ip.org/images/pfauthen/InsClear022.png" width="525" /></div>
<div align="center">
<br /></div>
<div align="center">
<img border="0" height="337" src="http://3poe.no-ip.org/images/pfauthen/InsClear022.png" width="525" /></div>
<div align="center">
<br /></div>
<div align="center">
<img border="0" height="219" src="http://3poe.no-ip.org/images/pfauthen/InsClear023.png" width="585" /></div>
<div align="center">
<br /></div>
<div align="center">
<img border="0" height="501" src="http://3poe.no-ip.org/images/pfauthen/InsClear024.png" width="640" /></div>
<div align="center">
<br /></div>
<div align="center">
<img border="0" height="352" src="http://3poe.no-ip.org/images/pfauthen/InsClear025.png" width="640" /></div>
<div align="center">
<br /></div>
<div align="center">
<img border="0" height="396" src="http://3poe.no-ip.org/images/pfauthen/InsClear026.png" width="640" /></div>
<div align="center">
<br /></div>
<div align="center">
<img border="0" height="393" src="http://3poe.no-ip.org/images/pfauthen/InsClear027.png" width="640" /></div>
<div align="center">
<br /></div>
<div align="center">
<img border="0" height="396" src="http://3poe.no-ip.org/images/pfauthen/InsClear028.png" width="640" /></div>
<div align="center">
จะขึ้น มาดัง รูปด้าน ล่าง นี้นะครับ ให้ทำการตั้งค่า กันก่อน</div>
<div align="center">
<img border="0" height="622" src="http://3poe.no-ip.org/images/pfauthen/update001.jpg" width="640" /></div>
<div align="center">
<br /></div>
<div align="center">
<img border="0" height="456" src="http://3poe.no-ip.org/images/pfauthen/InsClear030.png" width="640" /></div>
<div align="center">
<img border="0" height="410" src="http://3poe.no-ip.org/images/pfauthen/InsClear031.png" width="640" /></div>
<div align="center">
<br /></div>
<div align="center">
<img border="0" height="501" src="http://3poe.no-ip.org/images/pfauthen/InsClear032.png" width="640" /></div>
<div align="center">
<img border="0" height="422" src="http://3poe.no-ip.org/images/pfauthen/InsClear033.png" width="621" /></div>
<div align="center">
<img border="0" height="437" src="http://3poe.no-ip.org/images/pfauthen/InsClear034.png" width="640" /></div>
<div align="center">
<img border="0" height="435" src="http://3poe.no-ip.org/images/pfauthen/InsClear035.png" width="640" /></div>
<div align="center">
<img border="0" height="407" src="http://3poe.no-ip.org/images/pfauthen/InsClear036.png" width="640" /></div>
<div align="center">
พอตั้งค่าเสร็จแล้ว ให้ไปที่ <span lang="en-us">putty shell
</span>จากนั้น พิมพ์ <span lang="en-us">pfserver </span>แล้วกดเลข 9 ครั้ง
หนึ่ง ระบบจะทำการ รี <span lang="en-us">Script </span>ทั้งหมด เพื่อให้ใช้งาน<br />
ได้ทันที แต่ถ้าจะให้ เวิร์ค จะต้องรีบูต ซัก ครั้งหนึ่ง ก่อน</div>
<div align="center">
<img border="0" height="640" src="http://3poe.no-ip.org/images/pfauthen/pfmul_004.jpg" width="461" /><br />
<br />
สิ้นสุด ขั้นการการ ลง ตัว <span lang="en-us">PFMultiwan + Authen Server </span>
กันแล้ว</div>
<div align="center">
<span style="color: white; font-size: medium;">
<span style="background-color: black;">จัดการทำการ อัพเดต ระบบ โดยกดเลข 8
เพื่อทำการ อัพเดต หลังจากอัพเดตแล้ว จะสามารถใช้งานส่วนของ
<span lang="en-us">Authentication Mode </span>ได้</span></span></div>
<div align="center">
จากนั้น มาดู วิธการใช้งาน <span lang="en-us">PF authen </span>
กันต่อ</div>
<div align="center">
<img border="0" height="611" src="http://3poe.no-ip.org/images/pfauthen/au001.jpg" width="640" /></div>
<div align="center">
<img border="0" height="594" src="http://3poe.no-ip.org/images/pfauthen/au002.jpg" width="634" /></div>
<div align="center">
<img border="0" height="594" src="http://3poe.no-ip.org/images/pfauthen/au003.jpg" width="573" /></div>
<div align="center">
<img border="0" height="466" src="http://3poe.no-ip.org/images/pfauthen/au004.jpg" width="640" /></div>
<div align="center">
<span style="color: white; font-size: medium;">
<span style="background-color: black;">มาดูการ จัดการ สำหรับ ลี</span><span style="background-color: black;">นุกซ์</span><span style="background-color: black;">ตัวอื่นๆ
กัน บ้างนะครับ</span></span></div>
<div align="center">
<img border="0" height="448" src="http://3poe.no-ip.org/images/pfauthen/pfspot-new001.jpg" width="634" /></div>
<div align="center">
<br /></div>
<div align="center">
<img border="0" height="441" src="http://3poe.no-ip.org/images/pfauthen/pfspot-new002.jpg" width="625" /></div>
<div align="center">
<br /></div>
<div align="center">
<img border="0" height="411" src="http://3poe.no-ip.org/images/pfauthen/pfspot-new003.jpg" width="640" /></div>
<div align="center">
<br /></div>
<div align="center">
<img border="0" height="407" src="http://3poe.no-ip.org/images/pfauthen/pfspot-new004.jpg" width="591" /></div>
<div align="center">
<br /></div>
<div align="center">
<img border="0" height="520" src="http://3poe.no-ip.org/images/pfauthen/pfspot-new005.jpg" width="640" /></div>
<div align="center">
<img border="0" height="329" src="http://3poe.no-ip.org/images/pfauthen/au005.jpg" width="640" /></div>
<div align="center">
<img border="0" height="420" src="http://3poe.no-ip.org/images/pfauthen/au006.jpg" width="617" /></div>
<div align="center">
<img border="0" height="293" src="http://3poe.no-ip.org/images/pfauthen/au007.jpg" width="640" /></div>
<div align="center">
<img border="0" height="322" src="http://3poe.no-ip.org/images/pfauthen/au008.jpg" width="640" /></div>
<div align="center">
<img border="0" height="436" src="http://3poe.no-ip.org/images/pfauthen/au009.jpg" width="640" /></div>
<div align="center">
<img border="0" height="286" src="http://3poe.no-ip.org/images/pfauthen/au010.jpg" width="640" /></div>
<div align="center">
<img border="0" height="492" src="http://3poe.no-ip.org/images/pfauthen/au011.jpg" width="640" /></div>
<div align="center">
<img border="0" height="509" src="http://3poe.no-ip.org/images/pfauthen/au012.jpg" width="640" /></div>
<div align="center">
<img border="0" height="518" src="http://3poe.no-ip.org/images/pfauthen/au013.jpg" width="640" /></div>
<div align="center">
<img border="0" height="286" src="http://3poe.no-ip.org/images/pfauthen/au014.jpg" width="640" /></div>
<div align="center">
<img border="0" height="492" src="http://3poe.no-ip.org/images/pfauthen/au015.jpg" width="640" /></div>
<div align="center">
<img border="0" height="404" src="http://3poe.no-ip.org/images/pfauthen/au016.jpg" width="640" /></div>
<div align="center">
<br /></div>
<div align="center">
ดูจากรูปน่าจะทำได้ในระดับหนึ่ง นะครับซึ่งการทำงาน ค่อนข้าง
ง่าย มากครับ ไม่ต้องสนใจ <span lang="en-us">Mysql </span>ไม่ต้องสนใจการ ทำ
<span lang="en-us">Table Field </span>ต่างๆ</div>
<div align="center">
หรือเรื่องของ <span lang="en-us">Chilli + coova + Radius
</span>ต่างๆ นะครับไม่ต้องสนใจมันเลยครับ ซึ่ง ในการสนใจ ถ้า พัฒนา
ในส่วนของเว็บได้ สามารถ นำ พวกนี้มา จัดการพัฒนามาใส่ เพิ่มได้เลยครับผม</div>
<div align="center">
<br /></div>
<div align="center">
มาดูวิดีโอการใช้งานแบบ คร่าวๆกัน นิดนะครับ เดี่ยวจะค่อยๆ เอามา
อัพเพิ่ม ครับ<br />
<a href="http://3poe.no-ip.org/images/pfauthen/pfauthvedio-001.exe">1. <span lang="en-us">Video 1</span></a></div>
Computer !http://www.blogger.com/profile/17986004803115235464noreply@blogger.com0tag:blogger.com,1999:blog-3705868336102557107.post-92092977644732884762011-12-27T19:22:00.001-08:002011-12-27T19:22:11.695-08:00Freeradius คืออะไร<div class="discussion-entry"> Freeradius เป็นโปรแกรมที่ใช้ในการจัดการแอคเค้าท์และใช้ในการตรวจสอบสิทธิ ตามมาตรฐาน IEEE 802.1X ตามคอนเซ็ปคือ AAA <br />
เรามาดูกันซิว่า AAA มาจากคำว่าอะไรบ้าง<br />
Accounting นั่นคือการจัดการแอคเค้าท์ในด้านต่างๆทั้งการสร้างแอคเค้าท์ ลบ และเพิ่มแอคเค้าท์ ตลอดจนการเพิ่มเติมคุณสมบัติต่างๆของแแต่ละแอคเค้าท์<br />
Authentication<br />
สิทธิ ตามวิธีการ A แรกที่ได้กล่าวมาในขั้นตอนนี้จะมีการแจ้งแมสเสจต่างๆว่าผ่านหรือไม่ ผ่าน การตรวจสอบสิทธิและเมื่อผ่านกระบวนการนี้ได้สำเร็จก็จะเข้าสู่กระบวนการสุด ท้าย นั่นคือ <br />
Authorize<br />
<br />
ทีนี้มาดูกระบวนการการทำงานของ freeradius กันดีกว่า<br />
<br />
เริ่ม แรกหลังจากที่ได้มีการสร้างแอคเคาท์เป็นที่เรียบร้อยแล้ว มีการใช้งานโปรแกรม radius-client ต่างๆเช่น Pgina, ntradping หรือโปรแกรมอื่นๆเพื่อล็อกอินหรือตรวจสอบสิทธิ ก็จะเข้าสู่กระบวนการต่างๆดังนี้<br />
1.โปรแกรม radius-client จะติดต่อโปรแกรม freeradius ตามหมายเลขไอพีและพอร์ทที่ได้กำหนดไว้ (โดยปรกติพอร์ทของโปรแกรมจะอยู่ที่1812 ตาม default)<br />
2.โปรแกรมจะนำชื่อแอคเค้าท์ รหัสผ่าน และค่า secret key ไปตรวจสอบว่าถูกต้องหรือไม่ในขั้นตอนนี้จะมีกระบวนการดังนี้<br />
<br />
2.1 (radius-client) >>>{username,password,secret key} >>>(freeradius)<br />
ในขั้นตอนนี้จะมีการส่งยูสเซอร์เนม พาสเวิร์ด และ ซีเคร็ดคีย์ไปยังเซอร์ฟเวอร์เพื่อใช้ ในการตรวจสอบความถูกต้อง<br />
<br />
2.2 (radius-client) >>>>{access-request}>>>>(freeradius)<br />
ในขั้นตอนนี้ทางฝั่งไคลเอ้นท์จะสร้างส้ญญาณร้องขอผลตอบกลับมาจากเซอร์ฟเวอร<br />
์หรือรอสัญญาณตอบรับความถูกผิดของข้อมูลที่ส่งจากขั้นตอนแรก<br />
<br />
2.3(radius-client) <<<<{access-reply}<<<<<<<<<(freeradius)<br />
ใน ขั้นตอนนี้เซอร์ฟเวอร์จะตอบกลับไปยังเครื่องไคลเอ้นท์ด้วยสัญญาณ access-reply โดยสัญญาณนี้จะประกอบไปด้วย2สัญญาณย่อยที่สำคัญแต่จะเกิดขึ้นเพียงแค่หนึ่ง สัญญาณ<br />
ต่อเงื่อนไขนั่นคือสัญญาณ access-accept และ access-reject โดยสัญญาณ <br />
access-accept นี้คือสัญญาณที่ใช้ตอบกลับไปยังไคลเอ้นท์ว่ายูสเซอร์เนม รหัสผ่าน และซีเคร็ดคีย์นั้นถูกต้องส่วนสัญญาณ access-reject นั้นจะตรงกันข้ามกับสัญญาณแรก โดยมีความหมายคือยูสเซอร์เนม รหัสผ่าน และซีเคร็ดคีย์ไม่ถูกต้องหรืออาจมี เฉพาะตัวหนึ่งตัวใดไม่ถูกต้องก็ได้ เป็นต้น<br />
<br />
ในโปรแกรม freeradius ต้องอาศัยฐานข้อมูลเพื่อดึงข้อมูลมาใช้ในการประมวลผลไม่ว่าจะเป็น<br />
ยู สเซอร์เนม และพาสเวิร์ด หรือเมสเสจและเงื่อนไขต่างๆของแต่ละยูสเซอร์ โดยในฐานข้อมูลจะมีตารางที่เกี่ยวข้องดังนี้ radcheck , radgroupcheck , radgroupreply,usergroup และ radacct มาดูแต่ละเทเบิลดีกว่า<br />
<br />
radcheck ในเทเบิลนี้จะมีฟิลด์ดังนี้ <br />
username เอาไว้กำหนดยูสเซอร์เนม<br />
Attribute เอาไว้กำหนดแอททริบิวท์ ว่าจะใช้อะไรเช่นต้องการการกำหนดพาสสเวิร์ดก็ใช้ Password เป็นต้น<br />
op เป็นสัญลักษณ์เอาไว้กำหนดรายละเอียดของแต่ละ Attribute <br />
value เอาไว้กำหนดค่าของแต่ละ Attribute<br />
<br />
มาดูตัวอย่างการกำนดหรือสร้างแอคเค้าท์กันดังนี้ <br />
insert into radcheck value(Null,'oportino','Password',':=','opor_test');<br />
อธิบาย ในขั้นตอนนี้เราก็ได้แอคเค้าท์ แล้วดังนี้ user=oportino มี password=opor_test เป็นต้น แต่ยังไม่สมบูรณ์นะเหลือที่เทเบิล usergroup อีกดูตัวอย่างข้างล่างประกอบด้วย <br />
<br />
usergroup <br />
username เอาไว้กำหนดยูสเซอร์เนม<br />
groupname เอาไว้เก็บชื่อกรุ๊ปหรือกำหนดกรุ๊ปให้แก่ยูสเซอร์นั้น<br />
<br />
มาดูตัวอย่างการกำนดหรืออสร้างแอคเค้าท์ให้สมบูรณ์ต่อจากตัวอย่างที่แล้วดังนี้ <br />
insert into usergroup value(Null,'oportino','User_blog');<br />
อธิบาย ในขั้นตอนนี้เราก็ได้แอคเค้าท์ที่ประจำกรุ๊ปแล้วนั่นคือ ยูสเซอร์ oportino มีกรุ๊ปที่สังกัดคือ User_blog เป็นต้น <br />
<br />
radgroupcheck เทเบิลนี้เอาไว้กำหนดนโยบายให้แต่ละกรุ๊ปนั่นคือสมาชิกใดถ้าอยู่ในกรุ๊ปนี้ก็จะถูกกำกนดตามเงื่อนไขที่ระบุ<br />
groupname กำหนดกรุ๊ปที่ต้องการทำนโยบาย<br />
Attribute เอาไว้กำหนดแอททริบิวท์ที่เป็นนโยบายระดับกรุ๊ปให้แก่กร๊ป<br />
op คือสัญลักษณ์ที่ระบุให้แต่ละแอททริบิวท์<br />
value คือค่าของแอททริบิวท์ที่กำหนดแต่ละกรุ๊ป<br />
*ดูการกำหนดท้ายบทความ<br />
<br />
radgroupreply เทเบิลนี้เอาไว้กำหนดเงื่อนไขและเมสเสจที่โชว์ให้แก่กรุ๊ปนั้นๆ เช่น หมดเวลาการล็อกอิน หรือหมดอายุการใช้งาน เป้นต้น โดยฟิลด์ต่างๆก็จะเหมือนกับ radgroupcheck และมีการใช้งานเหมือนกัน<br />
* ดูการใช้งานจริงท้ายบทความ<br />
<br />
<br />
เกริ่นมาพอสมควรแล้วคราวนี้มาดูการใช้งานจริงกันบ้าง<br />
**หมายเหต ทุกยูสเซอร์ต้องสังกัดกรุ๊ปด้วยโดยกรุ๊ปนั้นเรากำหนดขึ้นเอง จะใช้ชื่อกรุ๊ปอะไรก็ไดุ้<br />
<br />
ตกลงตามนี้ ยกตัวอย่างผมอยู่ในบริษัทแห่งหนึ่ง มี3แผนกที่ต้องการใช้งาน freeradius นั่นคือ<br />
แผนกบัญชี 10 คน มีชื่อแอคเค้าท์ดังนี้ acc1 - acc10<br />
แผนกการตลาด 5 คน มีชื่อแอคเค้าท์ดังนี้ market1 - market5<br />
และผู้บริหาร 7 คน มีชื่อแอคเค้าท์ดังนี้ vip1 - vip7<br />
<br />
เริ่มเลยละกัน <br />
1.กำหนดชื่อกรุ๊ป แผนกบัญชีคือ Accounting แผนกการตลาดคือ Margeting และผู้บริหารคือ VIP<br />
<br />
2. กำหนดยูสเซอร์เนมและพาสเวิร์ดให้แก่แต่ละแผนก<br />
insert into radcheck (Null,'acc1','Password',':=','acc1_pass'); ที่เหลือก็กำหนดเข้าไปจนถึง acc10<br />
insert into radcheck (Null,'market1','Password',':=','market1_pass'); ที่เหลือก็กำหนดเข้าไปจนถึง market5<br />
insert into radcheck (Null'vip1','Password',':=','vip1_password'); ที่เหลือก็กำหนดเข้าไปจนถึง vip7<br />
<br />
3.จับแต่ละยูสเซอร์มาสังกัดกรุ๊ปของตนเอง<br />
insert into radcheck (Null,'acc1','Accounting'); ที่เหลือก็กำหนดเข้าไปจนถึง acc10 ตรงตำแหน่งกรุ๊ปก็คงไว้<br />
insert into radcheck (Null,'market1','Margeting'); ที่เหลือก็กำหนดเข้าไปจนถึง market5 <br />
insert into radcheck (Null'vip1','VIP'); ที่เหลือก็กำหนดเข้าไปจนถึง vip7<br />
ทุกยูสเซอร์ก็จะมีกรุ๊ปอยู่แล้วตรงตามชื่อกรุ๊ปของแผนกตัวเอง<br />
<br />
4.จากนั้นกำหนดให้แต่ละกรุ๊ปหมดเวลาการใช้งานเมื่อใดดังนี้<br />
ี้insert into radgroupcheck (Null,'Accounting',Expiration',':=','Oct 30 2007'); <br />
insert into radgroupcheck (Null,'Margeting','Expiration',':=','Nov 10 2008');<br />
คราวนี้เมื่อยูสเซอร์นั้นล็อกอินในภายหลังที่เราระบุ พี่แกก็จะล็อกอินไม่ได้พร้อมมีเมสเสจกลับมาว่าหมดอายุการใช้งานแล้ว<br />
<br />
5.ต้องการให้กรุ๊ปของผู้บริหารนั่นคือ VIP ไม่มีวันหมดอายุการใช้งานกำหนดดังนี้<br />
insert into radgroupcheck (Null'VIP','Auth-Type',':=','Local');<br />
<br />
<br />
RADIUS ServerRADIUS Server คืออะไร<br />
<br />
<br />
RADIUS เป็นคำย่อของ Remote Authentication Dial-In User Service (RADIUS) คือ client/server security protocol ซึ่งเป็นผลงานของLucent InterNetworking Systems ที่ได้ทำการคิดค้นขึ้นมา เพื่อรวบรวม account ของ users ให้อยู่แต่เพียงที่เดียว เพื่อง่ายต่อการบริหาร ไม่ต้องทำหลายจุดหลายเซิฟเวอร์ เวลามี users ที่เซิฟเวอร์อื่นๆ ต้องการใช้งาน ก็จะส่งข้อมูลมาตรวจเช็คที่ RADIUS Server นี้ <br />
ทำไมถึงต้องใช้ RADIUS<br />
หาก ในระบบของท่านมีผู้ใช้งานอินเตอร์เน็ตจำนวนมาก ซึ่งยากต่อการควบคุมการใช้งาน โดยเฉพาะ ในสถานศึกษาที่มีผู้ใช้งานมากๆ RADIUS Server จึงมีความสำคัญเป็นอย่างมาก<br />
<br />
ข้อดีของ RADIUS Server<br />
- ควบคุมการใช้อินเตอร์เน็ตของ User ได้อย่างมีประสิทธิภาพ<br />
- สามารถเก็บ Log File เพื่อตรวจสอบหลังได้ ตามกฎหมายใหม่กำหนดdesktop<br />
- ตรวจสอบ User ที่กำลังใช้งานได้ แบบ Real time<br />
- กำหนดระยะเวลาการใช้งานของ User ได้ เช่น 1 ชั่วโมง, 2 วัน, 3 เดือน หรือ 10 นาที เป็นต้น<br />
- สามารถ Clear User ที่ไม่ต้องการให้ใช้งานในขณะ On line ได้<br />
<br />
RADIUS Server เหมาะสำหรับที่ไหน?<br />
- อพาร์ทเม้น ที่ให้บริการ อินเตอร์เน็ต ทั้งแบบฟรี และเก็บค่าบริการ<br />
- โรงแรม ที่ให้บริการ อินเตอร์เน็ต ทั้งแบบฟรี และเก็บค่าบริการ<br />
- โรงเรียน, สถานศึกษา ที่มีบริการอินเตอร์เน็ต หรือ เพื่อการเรียนการสอน เพื่อป้องการแอบใช้อินเตอร์เน็ต ขณะรับการสอน<br />
- ผู้ให้บริการ Wireless Internet (WiFi HotSpot)<br />
<br />
ที่มา : <a href="http://www.star-internet.com/web/content/view/35/1/" target="_blank">http://www.star-internet.com/web/content/view/35/1/</a><br />
<br />
<br />
มารู้จักกับ RADIUS กันเถอะ<br />
คือ วิธีการมาตรฐานของการแลกเปลี่ยนข้อมูลระหว่างอุปกรณ์ที่ควบคุมการใช้งานเน็ต เวิร์ค (Network Access Server) กับผู้ใช้งาน (Access Clients) และอุปกรณ์ที่ทำหน้าที่ตรวจสอบสิทธิ์การใช้งาน (Radius Server)<br />
<br />
<br />
<br />
องค์ประกอบพื้นฐานของ RADIUS Server1. Access Clients<br />
คือ เครื่องคอมพิวเตอร์หรืออุปกรณ์ที่ผู้ใช้งานสั่งให้ติดต่อระบบเพื่อใช้งาน เช่น เครื่องคอมพิวเตอร์ที่ลูกค้า Individual ใช้งาน โดยใช้ โปรแกรม Dial-Up Net working สั่งงาน Modem ให้ Connect เพื่อใช้งานอินเทอร์เน็ต<br />
<br />
2. Network Access Servers (NAS )<br />
คือ อุปกรณ์ที่ทำหน้าที่เชื่อมต่อและจัดการการติดต่อระหว่าง Access Clients และ RADIUS Server ซึ่ง NAS จะทำหน้าที่เป็น Client เชื่อมต่อกับ RADIUS Server ส่งผ่านและจัดการข้อมูลที่ใช้ในการตรวจสอบสิทธิ์ กำหนดสิทธิ์ ของ Access Clients เมื่อ Access Clients ร้องขอการต่อเชื่อมซึ่งจะต้องต่อเชื่อมมายัง NAS ผ่านโพรโตคอลที่ใช้ในการต่อเชื่อมต่าง ๆ เช่น PPP (Point-to-Point Protocol), SLIP (Serial Line Internet Protocol), Extensible Protocol อื่น ๆ เป็นต้น<br />
ซึ่งจำเป็นต้องมีการส่งผ่าน Username และ Password จาก Access Clients มายัง NAS หลังจากนั้น NAS จะส่งข้อมูลที่จำเป็นต่าง ๆ เช่น Username, Password, NAS IP Address, NAS Port Number และข้อมูลอื่น ๆ ไปที่ RADIUS Server เพื่อขอตรวจสอบสิทธิ์ (Request Authentication)<br />
<br />
3. RADIUS Server<br />
ทำการตรวจสอบสิทธิ์โดยใช้ข้อมูลที่ NAS ส่งมา (Access-Request) กับข้อมูลที่จัดเก็บไว้ใน RADIUS Server เอง หรือจากฐานข้อมูลภายนอก อื่น ๆ เช่น MS SQL Server, Oracle Database, LDAP Database หรือ RADIUS Server อื่น (ซึ่งเรียกการส่งผ่านการตรวจสอบสิทธิ์แบบนี้ว่า Proxy)<br />
ในกรณีที่ข้อมูลทั้งหมดถูกต้อง RADIUS Server จะส่งผลยินยอมการเชื่อมต่อ (Access-Accept) หรือ ไม่ยินยอม (Access-Reject) ในกรณีที่ข้อมูลไม่ถูกต้อง แก่ NAS หลังจากนั้น NAS จะเชื่อมต่อหรือยกเลิกการการต่อเชื่อมตามผลที่ได้รับจาก RADIUS Server ซึ่งตามปรกติแล้ว NAS จะขอบันทึกข้อมูลต่าง ๆ เช่น วันที่ เวลา Username และข้อมูลอื่น ๆ ไปที่ RADIUS Server (Accounting Request) เพื่อให้ RADIUS Sever จัดเก็บข้อมูลหรือส่งต่อไปที่ RADIUS Server อื่น จัดเก็บเพื่อใช้ในการประมวลผลอื่น ๆ ต่อไป<br />
<br />
<br />
RADIUS Package คือ ข้อมูลที่ถูกส่งหรือรับระหว่าง RADIUS Server และ RADIUS Client (หมายถึง NAS) มีรูปแบบที่ถูกกำหนดไว้ตามมาตรฐานของ RFC 2685 Remote Authentication Dial In User Service (RADIUS) และ 2866 RADIUS Accounting.<br />
<br />
มีคุณสมบัติดังนี้<br />
<br />
เป็นข้อมูลที่ส่งหรือรับกันระหว่าง RADIUS Server และ RADIUS Client<br />
อยู่ ในรูปแบบของการร้องขอและตอบกลับ (Request /Response) คือ RADIUS Client ส่งการร้องขอไปยัง RADIUS Server และ RADIUS Server ตอบกลับการร้องขอของ RADIUS Client<br />
แต่ละ Package จะต้องระบุจุดประสงค์ของการติดต่อ คือ Authentication หรือ Accounting<br />
แต่ละ Package จะบรรจุข้อมูลที่เรียกว่า Attributes ซึ่งใช้ในการตรวจสอบสิทธิ์กำหนดสิทธิ์ และเก็บบันทึกการใช้งาน <br />
<br />
การกำหนดค่าเบื้องต้นสำหรับ RADIUS Server และ Client<br />
RADIUS Server <br />
กำหนดเพื่อให้ RADIUS Server สามารถติดต่อกับ RADIUS Client แต่ละตัวได้ ซึ่งมีข้อมูลที่ต้องกำหนดให้ RADIUS Server ดังนี้<br />
<br />
IP Address ของ NAS<br />
RADIUS shared secret<br />
ยี่ห้อ และ รุ่นของ NAS ที่ใช้ในกรณีที่ไม่มีหรือไม่ทราบให้เลือกเป็น - Standard Radius -. <br />
** RADIUS Server จำเป็นต้องระบุ UDP Port เพื่อใช้สำหรับรับและส่ง Authentication และ Accounting Package ระหว่าง RADIUS Server และ RADIUS Client<br />
<br />
RADIUS Client<br />
ต้องกำหนดค่าต่าง ๆ บน NAS เพื่อให้สามารถติดต่อกับ RADIUS Server ซึ่งต้องกำหนดค่าต่าง ๆ เหล่านี้บน NAS ทุกตัวที่ติดต่อกับ RADIUS Server<br />
<br />
IP Address ของ RADIUS Server<br />
RADIUS shared secret<br />
UDP Port เพื่อใช้สำหรับส่งและรับ Authentication และ Accounting Package <br />
** สำหรับ RADIUS shared secret และ UDP Port จะต้องกำหนดให้ตรงกับที่ระบุไว้ที่ RADIUS Server<br />
<br />
RADIUS Shared Secret ใช้สำหรับตรวจสอบความถูกต้องของการติดต่อระหว่าง RADIUS Server กับ RADIUS Client ซึ่ง Shared Secret จะเป็นตัวหนังสือ (ตัวเล็กและตัวใหญ่มีความแตกต่างกัน) หรือตัวเลขที่ต้องกำหนดให้ตรงกันทั้ง RADIUS Server และ RADIUS Client แต่ RADIUS Client แต่ละตัวไม่จำเป็นต้องกำหนด Shared Secretให้เหมือนกัน<br />
<br />
RADIUS Shared Secret จะกำหนดได้ 2 ตัว ดังนี้<br />
<br />
Authentication Shared Secret<br />
Accounting Shared Secret <br />
ในขณะที่มีการขอตรวจสอบสิทธิ์ (Authentication) การจัดส่ง Package Access-Request ระหว่าง NAS และ RADIUS Server เนื่องจากการส่ง Password จะต้องมีความปลอดภัยดังนั้นจึงมีการกำหนดโพรโตคอลเพื่อใช้ในการส่งและรับ ข้อมูล โพรโตคอลที่นิยมใช้คือ PAP, SHAP, MS-SHAP, MS-SHAP V2 และ EAP ซึ่งเป็นโพรโตคอลที่เกิดขึ้นใหม่ยังไม่แพร่หลายในขณะนี้<br />
<br />
<br />
อ้างถึง<br />
ตัวอย่าง ในโพรโตคอล PAP NAS จะต้องเข้ารหัส (Encrypt) Password ก่อนโดยใช้ Shared Secret และส่ง Package Access-Request นั้นออกไป เมื่อ RADIUS Server รับ Package Access-Request แล้วจะทำการถอดรหัส (Decrypt) Password ที่ถูกเข้ารหัสไว้โดยใช้ Shared Secret แล้วนำไปตรวจสอบ<br />
<br />
<br />
สำหรับในการส่งข้อมูล Accounting จะไม่มีการ Encrypt ข้อมูลแต่ RADIUS Server จะใช้ Shared Secret ในการตรวจสอบความถูกต้องของ NAS ที่จะติดต่อด้วย<br />
<br />
RADIUS Port RADIUS Server จำเป็นต้องระบุ UDP Port เพื่อใช้สำหรับรับและส่ง Authentication และ Accounting Package ระหว่าง RADIUS Server และ RADIUS Client ซึ่งเริ่มต้นที่ RADIUS ได้ถูกพัฒนาขึ้นผู้พัฒนาได้ใช้ Port 1645 สำหรับการส่งและรับ Package Authentication และ 1646 สำหรับการส่งและรับ Package Accounting แต่เนื่องจากมาตรฐานนั้นได้มีการกำหนด Port ดังกล่าวสำหรับ "datametrics" <br />
<br />
ดังนั้น Port ที่เป็นมาตรฐานในปัจจุบันนี้ คือ<br />
<br />
- 1812 สำหรับการส่งและรับ Package Authentication<br />
- 1813 สำหรับการส่งและรับ Package Accounting<br />
<br />
Password Protocols เนื่องจากการส่ง Access-Request ในขณะที่มีการขอ Authentication มีการส่ง Password จาก NAS ไปยัง RADIUS Server จึงจำเป็นต้องคำนึงถึงความปลอดภัยของ Password ดังกล่าว ดังนั้นจึงมีการสร้างโพรโตคอลสำหรับใช้งานในส่วนนี้ขึ้นซึ่งได้แก่<br />
<br />
PAP (Password Authentication Protocol)<br />
ในขณะที่มีการขอเชื่อมต่อ(User Negotiates) จาก Access Clients มายัง NASการส่ง Password ในขั้นตอนนี้จะยังไม่มีการเข้ารหัส (encrypt) ใด ๆ Password จะจัดส่งในรูปแบบ “Clear Text”<br />
<br />
เมื่อ NAS รวบรวมข้อมูลที่เพียงพอสำหรับสร้าง Access-Request แล้ว NAS จะ Encrypt Password โดยใช้ Authentication Shared Secret ที่ถูกกำหนดไว้ แล้วส่ง Access-Request ดังกล่าวไปยัง RADIUS Server<br />
<br />
เมื่อ RADIUS Server ได้รับ Access-Request จาก NAS แล้วจะทำการ Decrypt Password ที่ได้รับโดยใช้ Authentication Shared Secret ที่จัดเก็บไว้สำหรับ NAS ตัวดังกล่าว<br />
<br />
** โพรโตคอล PAP สามารถใช้ได้กับ RADIUS Server ทุกตัว<br />
<br />
CHAP (Challenge Handshake Authentication Protocol)<br />
สำหรับ CHAP ได้ถูกสร้างขึ้นเพื่อหลีกเลี่ยงการส่ง Password แบบ “Clear Text” ในขณะที่ User Negotiates เมื่อ NAS รับทราบแล้ว NAS จะสร้าง Challenge โดยสุ่มตัวอักษร แล้วส่งกลับไปยัง Access Client<br />
<br />
เมื่อ Access Client ได้รับ Challenge จะทำการสร้าง Digest คือ นำ Challenge ที่ได้รับมาต่อท้าย Password แล้วทำการ Encrypt แบบ one-way Encryption (MD5 Algorithm) แล้วส่ง Digest นั้นแทน Password ไปยัง NAS <br />
<br />
NAS สร้าง Access-Request สำหรับการ Authentication และส่งไปยัง RADIUS Server<br />
<br />
เนื่องจาก Digest ถูกสร้างแบบ one-way Encryption ไม่สามารถ Decrypt ได้<br />
<br />
RADIUS Server จึงจำเป็นต้องใช้ Attribute ที่เกี่ยวกับ CHAP Protocol ที่ถูกจัดส่งมาใน Access-Request Package ที่ได้รับจาก NAS ซึ่งมี 2 Attributes ที่เกี่ยวข้องดังนี้<br />
<br />
CHAP-Password : Attribute สำหรับ Digest (Password ที่ต่อท้ายด้วย Challenge แล้ว Encrypt ด้วย MD5 Algorithm)<br />
<br />
CHAP-Challenge : Attribute สำหรับ Challenge ที่ถูกสุ่มขึ้นโดย NAS<br />
<br />
RADIUS Server ใช้ Challenge จาก CHAP-Challenge ต่อท้าย Password ที<br />
ที่มา:cpe.rmuti.ac.th<br />
</div>Computer !http://www.blogger.com/profile/17986004803115235464noreply@blogger.com0tag:blogger.com,1999:blog-3705868336102557107.post-86154882679071798812011-12-27T19:19:00.001-08:002011-12-27T19:19:41.115-08:00มารู้จัก Freeradius ให้ลึกซึ้งกันดีกว่า<span style="font-family: Ms sans serif; font-size: x-small;"><span style="font-weight: bold;">Freeradius</span> เป็นโปรแกรมที่ใช้ในการจัดการแอคเค้าท์และใช้ในการตรวจสอบสิทธิ ตามมาตรฐาน IEEE 802.1X ตามคอนเซ็ปคือ AAA </span><br />
<span style="font-family: Ms sans serif; font-size: x-small;">เรามาดูกันซิว่า AAA มาจากคำว่าอะไรบ้าง</span><br />
<span style="font-family: Ms sans serif; font-size: x-small;"><span style="font-weight: bold;">Accounting</span> นั่นคือการจัดการแอคเค้าท์ในด้านต่างๆทั้งการสร้างแอคเค้าท์ ลบ และเพิ่มแอคเค้าท์ ตลอดจนการเพิ่มเติมคุณสมบัติต่างๆของแแต่ละแอคเค้าท์</span><br />
<span style="font-family: Ms sans serif; font-size: x-small;"><span style="font-weight: bold;">Authentication</span></span><br />
<span style="font-family: Ms sans serif; font-size: x-small;">สิทธิ ตามวิธีการ A แรกที่ได้กล่าวมาในขั้นตอนนี้จะมีการแจ้งแมสเสจต่างๆว่าผ่านหรือไม่ ผ่าน การตรวจสอบสิทธิและเมื่อผ่านกระบวนการนี้ได้สำเร็จก็จะเข้าสู่กระบวนการสุด ท้าย นั่นคือ </span><br />
<span style="font-family: Ms sans serif; font-size: x-small;"><span style="font-weight: bold;">Authorize</span></span><br />
<br />
<span style="font-family: Ms sans serif; font-size: x-small;">ทีนี้มาดูกระบวนการการทำงานของ freeradius กันดีกว่า</span><br />
<br />
<span style="font-family: Ms sans serif; font-size: x-small;">เริ่ม แรกหลังจากที่ได้มีการสร้างแอคเคาท์เป็นที่เรียบร้อยแล้ว มีการใช้งานโปรแกรม radius-client ต่างๆเช่น Pgina, ntradping หรือโปรแกรมอื่นๆเพื่อล็อกอินหรือตรวจสอบสิทธิ ก็จะเข้าสู่กระบวนการต่างๆดังนี้</span><br />
<span style="font-family: Ms sans serif; font-size: x-small;">1.โปรแกรม radius-client จะติดต่อโปรแกรม freeradius ตามหมายเลขไอพีและพอร์ทที่ได้กำหนดไว้ (โดยปรกติพอร์ทของโปรแกรมจะอยู่ที่1812 ตาม default)</span><br />
<span style="font-family: Ms sans serif; font-size: x-small;">2.โปรแกรมจะนำชื่อแอคเค้าท์ รหัสผ่าน และค่า secret key ไปตรวจสอบว่าถูกต้องหรือไม่ในขั้นตอนนี้จะมีกระบวนการดังนี้</span><br />
<br />
<span style="font-family: Ms sans serif; font-size: x-small;">2.1 (radius-client) >>>{username,password,secret key} >>>(freeradius)</span><br />
<span style="font-family: Ms sans serif; font-size: x-small;">ในขั้นตอนนี้จะมีการส่งยูสเซอร์เนม พาสเวิร์ด และ ซีเคร็ดคีย์ไปยังเซอร์ฟเวอร์เพื่อใช้ ในการตรวจสอบความถูกต้อง</span><br />
<br />
<span style="font-family: Ms sans serif; font-size: x-small;"> 2.2 (radius-client) >>>>{access-request}>>>>(freeradius)</span><br />
<span style="font-family: Ms sans serif; font-size: x-small;"> ในขั้นตอนนี้ทางฝั่งไคลเอ้นท์จะสร้างส้ญญาณร้องขอผลตอบกลับมาจากเซอร์ฟเวอร</span><br />
<span style="font-family: Ms sans serif; font-size: x-small;">์หรือรอสัญญาณตอบรับความถูกผิดของข้อมูลที่ส่งจากขั้นตอนแรก</span><br />
<br />
<span style="font-family: Ms sans serif; font-size: x-small;"> 2.3(radius-client) <<<<{access-reply}<<<<<<<<<(freeradius)</span><br />
<span style="font-family: Ms sans serif; font-size: x-small;">ใน ขั้นตอนนี้เซอร์ฟเวอร์จะตอบกลับไปยังเครื่องไคลเอ้นท์ด้วยสัญญาณ access-reply โดยสัญญาณนี้จะประกอบไปด้วย2สัญญาณย่อยที่สำคัญแต่จะเกิดขึ้นเพียงแค่หนึ่ง สัญญาณ</span><br />
<span style="font-family: Ms sans serif; font-size: x-small;">ต่อเงื่อนไขนั่นคือสัญญาณ access-accept และ access-reject โดยสัญญาณ </span><span style="font-family: Ms sans serif; font-size: x-small;"> </span><br />
<span style="font-family: Ms sans serif; font-size: x-small;">access-accept นี้คือสัญญาณที่ใช้ตอบกลับไปยังไคลเอ้นท์ว่ายูสเซอร์เนม รหัสผ่าน และซีเคร็ดคีย์นั้นถูกต้อง</span><span style="font-family: Ms sans serif; font-size: x-small;">ส่วน สัญญาณ access-reject นั้นจะตรงกันข้ามกับสัญญาณแรก โดยมีความหมายคือยูสเซอร์เนม รหัสผ่าน และซีเคร็ดคีย์ไม่ถูกต้องหรืออาจมี เฉพาะตัวหนึ่งตัวใดไม่ถูกต้องก็ได้ เป็นต้น</span><br />
<br />
<span style="font-family: Ms sans serif; font-size: x-small;">ในโปรแกรม freeradius ต้องอาศัยฐานข้อมูลเพื่อดึงข้อมูลมาใช้ในการประมวลผลไม่ว่าจะเป็น</span><br />
<span style="font-family: Ms sans serif; font-size: x-small;">ยู สเซอร์เนม และพาสเวิร์ด หรือเมสเสจและเงื่อนไขต่างๆของแต่ละยูสเซอร์ โดยในฐานข้อมูลจะมีตารางที่เกี่ยวข้องดังนี้ radcheck , radgroupcheck , radgroupreply,usergroup และ radacct มาดูแต่ละเทเบิลดีกว่า<br />
<br />
<span style="font-weight: bold;">radcheck</span> ในเทเบิลนี้จะมีฟิลด์ดังนี้ <br />
username เอาไว้กำหนดยูสเซอร์เนม<br />
Attribute เอาไว้กำหนดแอททริบิวท์ ว่าจะใช้อะไรเช่นต้องการการกำหนดพาสสเวิร์ดก็ใช้ Password เป็นต้น<br />
op เป็นสัญลักษณ์เอาไว้กำหนดรายละเอียดของแต่ละ Attribute <br />
value เอาไว้กำหนดค่าของแต่ละ Attribute<br />
<br />
มาดูตัวอย่างการกำนดหรือสร้างแอคเค้าท์กันดังนี้ <br />
insert into radcheck value(Null,'oportino','Password',':=','opor_test');<br />
อธิบาย ในขั้นตอนนี้เราก็ได้แอคเค้าท์ แล้วดังนี้ user=oportino มี password=opor_test เป็นต้น แต่ยังไม่สมบูรณ์นะเหลือที่เทเบิล usergroup อีกดูตัวอย่างข้างล่างประกอบด้วย </span><br />
<span style="font-weight: bold;">usergr</span><span style="font-family: Ms sans serif; font-size: x-small;"><span style="font-weight: bold;">oup </span><br />
username เอาไว้กำหนดยูสเซอร์เนม<br />
groupname เอาไว้เก็บชื่อกรุ๊ปหรือกำหนดกรุ๊ปให้แก่ยูสเซอร์นั้น<br />
</span><span style="font-family: Ms sans serif; font-size: x-small;">มาดูตัวอย่างการกำนดหรืออสร้างแอคเค้าท์ให้สมบูรณ์ต่อจากตัวอย่างที่แล้วดังนี้ <br />
insert into usergroup value(Null,'oportino','User_blog');<br />
อธิบาย ในขั้นตอนนี้เราก็ได้แอคเค้าท์ที่ประจำกรุ๊ปแล้วนั่นคือ ยูสเซอร์ oportino มีกรุ๊ปที่สังกัดคือ User_blog เป็นต้น </span><br />
<span style="font-family: Ms sans serif; font-size: x-small;"><br />
</span><span style="font-weight: bold;">radgroupcheck </span><span style="font-family: Ms sans serif;"><span style="font-size: x-small;"><span style="font-family: Ms sans serif;">เทเบิลนี้เอาไว้กำหนดนโยบายให้แต่ละกรุ๊ปนั่นคือสมาชิกใดถ้าอยู่ในกรุ๊ปนี้ก็จะถูกกำกนดตามเงื่อนไขที่ระบุ<br />
groupname กำหนดกรุ๊ปที่ต้องการทำนโยบาย<br />
Attribute เอาไว้กำหนดแอททริบิวท์ที่เป็นนโยบายระดับกรุ๊ปให้แก่กร๊ป<br />
op คือสัญลักษณ์ที่ระบุให้แต่ละแอททริบิวท์<br />
value คือค่าของแอททริบิวท์ที่กำหนดแต่ละกรุ๊ป<br />
*ดูการกำหนดท้ายบทความ<br />
<br />
<span style="font-weight: bold;">radgroupreply</span> เทเบิลนี้เอาไว้กำหนดเงื่อนไขและเมสเสจที่โชว์ให้แก่กรุ๊ปนั้นๆ เช่น หมดเวลาการล็อกอิน หรือหมดอายุการใช้งาน เป้นต้น โดยฟิลด์ต่างๆก็จะเหมือนกับ radgroupcheck และมีการใช้งานเหมือนกัน<br />
* ดูการใช้งานจริงท้ายบทความ<br />
<br />
<br />
<span style="font-weight: bold;">เกริ่นมาพอสมควรแล้วคราวนี้มาดูการใช้งานจริงกันบ้าง</span><span style="background-color: red; text-decoration: underline;">**หมายเหต ทุกยูสเซอร์ต้องสังกัดกรุ๊ปด้วยโดยกรุ๊ปนั้นเรากำหนดขึ้นเอง จะใช้ชื่อกรุ๊ปอะไรก็ได้</span><span style="font-weight: bold;">ุ</span><br />
<span style="font-weight: bold;">ตกลงตามนี้</span> ยกตัวอย่างผมอยู่ในบริษัทแห่งหนึ่ง มี3แผนกที่ต้องการใช้งาน freeradius นั่นคือ<br />
แผนกบัญชี 10 คน มีชื่อแอคเค้าท์ดังนี้ acc1 - acc10<br />
แผนกการตลาด 5 คน มีชื่อแอคเค้าท์ดังนี้ market1 - market5<br />
และผู้บริหาร 7 คน มีชื่อแอคเค้าท์ดังนี้ vip1 - vip7<br />
<br />
เริ่มเลยละกัน <br />
1.กำหนดชื่อกรุ๊ป แผนกบัญชีคือ Accounting แผนกการตลาดคือ Margeting และผู้บริหารคือ VIP<br />
<br />
2. กำหนดยูสเซอร์เนมและพาสเวิร์ดให้แก่แต่ละแผนก<br />
insert into radcheck (Null,'acc1','Password',':=','acc1_pass'); ที่เหลือก็กำหนดเข้าไปจนถึง acc10<br />
insert into radcheck (Null,'market1','Password',':=','market1_pass'); ที่เหลือก็กำหนดเข้าไปจนถึง market5<br />
insert into radcheck (Null'vip1','Password',':=','vip1_password'); ที่เหลือก็กำหนดเข้าไปจนถึง vip7<br />
<br />
3.จับแต่ละยูสเซอร์มาสังกัดกรุ๊ปของตนเอง<br />
insert into radcheck (Null,'acc1','Accounting'); ที่เหลือก็กำหนดเข้าไปจนถึง acc10 ตรงตำแหน่งกรุ๊ปก็คงไว้<br />
insert into radcheck (Null,'market1','Margeting'); ที่เหลือก็กำหนดเข้าไปจนถึง market5 <br />
insert into radcheck (Null'vip1','VIP'); ที่เหลือก็กำหนดเข้าไปจนถึง vip7<br />
ทุกยูสเซอร์ก็จะมีกรุ๊ปอยู่แล้วตรงตามชื่อกรุ๊ปของแผนกตัวเอง</span></span></span><br />
<span style="font-weight: bold;"><span style="background-color: black;"></span><span style="font-weight: bold;"></span></span><span style="font-size: x-small;"><span style="font-family: Ms sans serif;">4.จากนั้นกำหนดให้แต่ละกรุ๊ปหมดเวลาการใช้งานเมื่อใดดังนี้<br />
ี้insert into radgroupcheck (Null,'Accounting',Expiration',':=','Oct 30 2007'); <br />
insert into radgroupcheck (Null,'Margeting','Expiration',':=','Nov 10 2008');<br />
คราวนี้เมื่อยูสเซอร์นั้นล็อกอินในภายหลังที่เราระบุ พี่แกก็จะล็อกอินไม่ได้พร้อมมีเมสเสจกลับมาว่าหมดอายุการใช้งานแล้ว</span></span><span style="font-family: Ms sans serif; font-size: x-small;"><br />
</span><span style="font-family: Ms sans serif; font-size: x-small;">ต้องการให้กรุ๊ปของผู้บริหารนั่นคือ VIP ไม่มีวันหมดอายุการใช้งานกำหนดดังนี้</span><br />
<span style="font-family: Ms sans serif; font-size: x-small;">insert into radgroupcheck (Null'VIP','Auth-Type',':=','Local');<br />
<br />
5.</span>Computer !http://www.blogger.com/profile/17986004803115235464noreply@blogger.com0tag:blogger.com,1999:blog-3705868336102557107.post-57519039377012485682011-04-18T22:37:00.000-07:002012-12-03T22:07:44.895-08:00ตัวติดตั้ง freeradius2.1.7+coova1.0.14 บนcc5หาหมูทดลองครับ <img alt="ยิงฟันยิ้ม" border="0" src="http://www.linuxthai.org/forum/Smileys/default/grin.gif" /> ตัวscript ติดตั้งนี้ดัดแปลงมาจากของ คุณ ลูกตาล ม.บู<br />
เอา มาจากของคุณ jakieboy + คุณ gigaza ขอขอบคุณทุกท่าน ณที่นี้ด้วยครับ รูปร่างตัว ม.บู อาจจะยังไม่ดีเท่าไหร่นะครับแต่ใช้งานได้ไม่มีปัญหา หากไม่ชอบก็สามารถ ไปเอาม.บูของท่านอื่นมาแทนหลังจากลง เสร็จแล้วได้<br />
<br />
การ เก็บ log ต่างจะเป็นค่า default ของ cc หากมีโอกาสอาจจะทำ script ติดตั้งในส่วน syslog หรือเก็บ log ต่างๆ อีกที เพราะตอนนี้ยังเลือกไม่ถูกว่าจะเก็บแบบไหนครับ <img alt="ฮืม" border="0" src="http://www.linuxthai.org/forum/Smileys/default/huh.gif" /><br />
<div class="quoteheader">
<a href="http://www.linuxthai.org/forum/index.php?topic=7880.msg65500#msg65500">อ้างจาก: wanyen ที่ ตุลาคม 01, 2009, 04:50:02 PM</a></div>
<div class="quote">
สิ่งนี้จะทำให้ความหวังของผมเป็นจริงหรือป่าวครับ อิอิ<br />
<br />
Gcc, kernel-sourcecode ของ ClarkConnect enterprise-5.0 ครับ <br />
<a href="http://122.155.1.135/%7Ekings/addon/gcc/Gcc5.rar" target="_blank">http://122.155.1.135/~kings/addon/gcc/Gcc5.rar</a><br />
<br />
ลงเสร็จแล้ว ไม่ต้องใช้คำสั่งพวกนี้อีกน่ะครับ<br />
# yum upgrade<br />
# yum clean all<br />
# yum groupinstall "Development Tools"<br />
# yum install kernel-sourcecode<br />
# yum install kernel-devel kernel-PAE-devel<br />
<br />
<br />
เคดิส หยิบมาจากเว็บ king-network โดยคุณ ฮ่องเต้ฟูหลิง™ </div>
<br />
<br />
ตัว setup <span style="color: red;">updateวันที่ 15/10/2552</span><br />
<span style="color: red;">*script นี้จะทำการ ลง developtool (เนื่องจากต้อง compile coova)หาก internet โหลดนอกประเทศ ช้า ให้ลองหาโหลด ตัว developtool ที่เขาทำไว้แล้วมาใช้นะครับจะได้ไม่เสียเวลาโหลดประมาณ 77 M หากใครคิดว่า เนทออกนอก พอใช้ได้ก็ ให้ติดตั้งแบบเดิมนะครับตัว script จะจัดการ download ให้</span><br />
<br />
<a href="http://upload.one2car.com/download.aspx?pku=232B68C44AFR765PA5SAOHADD3VEAH" target="_blank"><img alt="" border="0" src="http://i284.photobucket.com/albums/ll1/sohilmomin2000/download-button.jpg" /></a><br />
<br />
<span style="color: green;">เดี๋ยวแก้บั๊กหมดจะทำไฟล์ setup ให้ใหม่นะครับ ตอนนี้ใครเจอบั๊กอะไรก็บอกด้วยนะครับ</span><br />
changelog <span style="color: red;">15/10/2552</span><br />
-เปลี่ยนfreeradius เป็น เวอร์ชัน 2.1.7<br />
-เปลี่ยนจาก chilli มาเป็น coova 1.0.14<br />
-แก้ไข ม.บู ให้ใช้กับ freeradius 2.x.x<br />
แก้ไขหน้า adduser แบบหลายคน ให้เวลา แสดงข้อมูล password ตรงกับที่กรอก แต่เวลาลงDB เป็น MD5<br />
<br />
changelog <span style="color: red;">28/9/2552</span><br />
<br />
-แก้ไข ม.บู <br />
manage_group.php <br />
สามารถกำหนด เวลาเล่นสูงสุดต่อวันได้ (ทดสอบแล้วใช้งานได้)<br />
กำหนดเวลาที่สามารถเล่นได้ต่อlogin 1 ครั้ง (ทดสอบแล้วใช้งานได้)<br />
จำกัด download upload (ทดสอบแล้ว<span style="color: blue;">จำกัดได้จริงแค่ download</span>)<br />
กำหนดวันหมดอายุ (ทดสอบแล้วใช้งานได้แต่ถ้าหมดอายุแล้ว <span style="color: blue;">เวลาlogin จะขึ้นว่าข้อมูล ไม่ถูกต้องเหมือนพิมพ์พาสผิด ไม่ได้แจ้งว่าหมดอายุ คาดว่าต้องเปลี่ยนไปใช้ freeradius 2 เพราะ freeradius 1.1.8 ไม่มี module rlm_expiration</span>)<br />
changelog <span style="color: red;">27/9/2552</span><br />
-แก้ไข script installmain ที่มีบั๊ก copy ไฟล์ directory.conf<br />
-แก้ไข ม.บู <br />
manage_group.php <br />
สามารถกำหนด เวลาเล่นสูงสุดต่อวันได้ (ทดสอบแล้ว)<br />
กำหนดเวลาที่สามารถเล่นได้ต่อlogin 1 ครั้ง (ทดสอบแล้ว)<br />
จำกัด download upload (ทดสอบแล้วจำกัดได้จริงแค่ download)<br />
กำหนดวันหมดอายุ (แก้ไขให้ add ลง database table group ยังไม่ได้ทดสอบการใช้งาน)<br />
แก้ไขเมื่อ edit แล้ว ชื่อ group จะไม่ซ้ำกันใน table groupradreply<br />
<br />
changelog <span style="color: red;">26/9/2552</span><br />
-แก้ไขไฟล์ radius.conf ให้สามารถกำหนดเวลาใช้งานใน ม.บูได้<br />
-แก้ไขไฟล์ php ใน ม.บู บางส่วน<br />
หน้า block web และ ไฟล์ของ squid แก้ไฟล์ processscript.php ให้สามารถ blockweb ได้ทันทีเมื่อบันทึก<br />
แก้หน้าจัดการในส่วน admin ให้ redirect ไปหน้า index.php เมื่อไม่ได้ login<br />
-เพิ่มไฟล์ directory.conf ลง ในconfig ของ httpd เพื่อป้องกันการเข้าถึงไฟล์ config.inc.php<br />
<br />
<br />
<span style="color: green;"><br />
วิธีลง</span><br />
<br />
1.ขั้น แรก ลง clark 5.0 ให้เรียบร้อยก่อน ตอนเลือก package ผมเลือกลงหมดเลย ใครเลือกไม่หมดก็ตามใจ แต่ไม่รู้มีปัญหารึเปล่า แต่ที่ต้องเลือกแน่ๆ ก็คือ webserver mysql webproxy 3 อย่างนี้ต้องลง<br />
<br />
2.หลังจากลงเสร็จเซตให้ต่อเนทได้เรียบร้อยก็ไปเปิดการทำงานของ โปรแกรมข้างล่างนี้<br />
เปิดการทำงาน mysql<br />
<a href="http://img.ihere.org/" target="_blank"><img alt="" border="0" src="http://img.ihere.org/uploads/69b0e6c13b.jpg" /></a><br />
<br />
เปิดการทำงาน webproxy<br />
<a href="http://img.ihere.org/" target="_blank"><img alt="" border="0" src="http://img.ihere.org/uploads/e5116b80e5.jpg" /></a><br />
<br />
เปิดการทำงาน webserver <br />
<a href="http://img.ihere.org/" target="_blank"><img alt="" border="0" src="http://img.ihere.org/uploads/4c18ad7f5a.jpg" /></a><br />
<br />
3.หลังจากลงเรียบร้อย<br />
ให้ใช้ winscp อัพไฟล์ cc5chilli.tar.gz ไปไว้บน server<br />
<a href="http://img.ihere.org/" target="_blank"><img alt="" border="0" src="http://img.ihere.org/uploads/a58fd0510c.jpg" /></a><br />
<br />
4.เปิด putty แล้วไป path ที่เก็บ cc5chilli.tar.gz ไว้ <br />
แล้วแตก ด้วยคำสั่ง tar zxpf cc5chilli.tar.gz จะได้ folder cc5chilli<br />
<br />
5.ใช้ winscp เข้าไปแก้ไขไฟล์ config ที่อยู่ในวงแดงคือส่วนที่เราต้องแก้เป็นข้อมูลของเราเอง <br />
exinterface คือ การ์ดที่ต่อ internet ถ้าต่อแบบ eth ก็ใส่ ethหมายเลข ต่อแบบ ppp ก็ใช้ pppตัวเลข<br />
mynet คือ network ของเรา สังเกตว่าหน้าเครื่องหมาย <span style="color: red;">/</span> จะต้องมี เครื่องหมาย <span style="color: red;">\</span>นำหน้าด้วย<br />
myuamlister คือ ip ของเครื่อง server chilli<br />
mydhcpif คือ การ์ดที่ทำหน้าที่แจก dhcp ของ chillispot<br />
ส่วนอันอื่นก็ตามชื่อมันเลยครับ<br />
<a href="http://img.ihere.org/" target="_blank"><img alt="" border="0" src="http://img.ihere.org/uploads/6eaeffcd62.jpg" /></a><br />
หลังจากแก้ไขเสร็จแล้วก็ save ครับ<br />
<br />
6.ใช้ putty เข้าไป ที่ folder cc5chilli รันคำสั่ง ./config<br />
7.รันคำสั่ง ./installmain เครื่องจะใช้เวลาลงไม่นานครับ แล้วเครื่องจะ restart ก็สามารถใช้งานได้ทันที<br />
<a href="http://img.ihere.org/" target="_blank"><img alt="" border="0" src="http://img.ihere.org/uploads/f2141a61c8.jpg" /></a><br />
<br />
<br />
ปล.<br />
phpmyadmin เข้าผ่านทาง <a href="https://ip/" target="_blank">https://ip</a>ที่กรอกในmyuamlisten:81/mysql<br />
user root<br />
password ก็ตามที่เราเซต<br />
<br />
หน้าจัดการ ม.บู เข้าทาง http://ipที่กรอกในmyuamlisten/authen/admin<br />
user: administrator<br />
password : password<br />
<br />
เวปไหนที่เราblock ผม set ให้มัน redirect ไป google นะครับ ใครจะให้มันไปไหนไปแก้เอาเองใน squid.conf<br />
<br />
<span style="color: red;">ปล2. ตัว script ต่างๆไม่ได้มีการเข้ารหัสใดๆทั้งสิ้น หากท่านสนใจวิธีการ setup ให้ ดูตาม script เลยครับ </span><br />
<br />
ที่ผมลงใน vmware ครับ โดย จำลองให้มี 3 interface <br />
โดยตัวที่ต่อเนท แบบ eth มี 2 ตัว คือ eth0 eth1 ส่วน eth2 เป็น interface ที่ทำ chilli โดยผมลง cc5 เลือก package ทั้งหมด เปิด service squid mysql webserver เสร็จแล้วก็ ใช้ script โดย ต้องทำการ config ที่ ไฟล์ config ของ script ก่อน จากนั้น ก็รัน ./config ตามด้วย ./installmain เสร็จแล้วพอมัน restart ก็ใช้ได้เลยครับ<br />
<br />
ใครที่ต่อแบบ ppp ตรง exinterface ก็ใส่เป็น pppหมายเลข นะครับ<br />
<span style="color: red;"> </span><br />
<span style="color: red;"> </span>Computer !http://www.blogger.com/profile/17986004803115235464noreply@blogger.com0tag:blogger.com,1999:blog-3705868336102557107.post-30452728431653295082011-04-18T22:35:00.000-07:002012-10-03T17:58:06.120-07:00แจกจริง Authentication ตัวเต็ม ไม่มีแก้โค้ด<div class="post">
ตัวนี้อ้างอิงจาก <br />
<br />
<a href="http://forum.ubuntuclub.com/forum?topic=19606.0" target="_blank">http://forum.ubuntuclub.com/forum?topic=19606.0</a><br />
<br />
ลองพิจารณากันดูนะครับ <br />
<br />
download ได้ที่ <br />
<a href="http://www.upload-thai.com/download.php?id=85d462459743c6861b0e10a048e4eb06" target="_blank">http://www.upload-thai.com/download.php?id=85d462459743c6861b0e10a048e4eb06</a><br />
<br />
ขอแตกกระทู้ ออกมาจากกระทู้ของ ท่าน maya_java นะครับ</div>
<br />
เท่าที่ download มาดู ยังไม่ได้ลองครับ คู่มือ เล็ก ๆ น้อย ๆ ที่เขาเขียนบอกไว้<br />
<br />
=============================================================================<br />
ไปแก้ค่า config ตรงไฟล์ php.ini ตรงนี้สำคัญมาก ห้ามข้าม เพราะต้องให้ตัวแปร Global ที่เขียนในภาษา php สามารถใช้งานได้<br />
<br />
ไปแก้ที่<br />
<br />
<br />
<br />
php.ini<br />
<br />
จากเดิม <br />
<br />
register_global = Off<br />
<br />
<br />
<br />
เปลี่ยนเป็น<br />
<br />
register_global = On<br />
<br />
<br />
<br />
<br />
<br />
ต่อไปก็เป็นในเรื่องของการกำหนดสิทธิ์ ตรงนี้ก็สำคัญมาก<br />
<br />
ต้อง folder phpwifi->admin<br />
<br />
<br />
<br />
กำหนดให้เป็นสิทธิ์ 755 ทุกไฟล์ เล้นแต่ folder upload ให้เป็น 777 เท่านั้น<br />
<br />
<br />
<br />
และกลุ่มก็ต้องเป็นของ root:apache อันนี้อ้างจาก Linux CentOS<br />
<br />
<br />
<br />
root:wheel อันนี้อ้างจาก Unix FreeBSD<br />
<br />
<br />
<br />
OS อื่นอาจไม่เหมือนกัน<br />
<br />
<br />
<br />
ตรง /etc/squid/<br />
<br />
กำหนด blockx.txt และ files.txt<br />
<br />
กำหนดเป็น 777 น่ะคับ<br />
<br />
และที่ห้ามข้ามขั้นตอนนี้ คือ กำหนดสิทธ์ 755 ให้ freeradius <br />
ตรง /etc/raddb/<br />
cd /etc/raddb/<br />
chmod -R 755 *<br />
chown root:apache *<br />
<br />
<br />
<br />
ส่วนฐานข้อมูลของระบบนี้อยู่ที่ folder backupsql ชื่อ portsproDB.sql<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitCttYUfnfoBXBXXj8R_LCp_MREyJuZAFk6FfEIu0kzm90nfXoMNcKNZsvJ4aIqSXctS_OGBnTYQ-0YeEbKcfG5UoqbO5TaI_iE6v7Qvt2ZFAVqzuweZ4ym-og1b3nea0TOyt5kOuSH74/s1600/authentication_server.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitCttYUfnfoBXBXXj8R_LCp_MREyJuZAFk6FfEIu0kzm90nfXoMNcKNZsvJ4aIqSXctS_OGBnTYQ-0YeEbKcfG5UoqbO5TaI_iE6v7Qvt2ZFAVqzuweZ4ym-og1b3nea0TOyt5kOuSH74/s1600/authentication_server.png" /></a></div>
<br />
<br />
หรือ ง่ายๆก็ สามารถใช้กับระบบฐานข้อมูล ของ ม.บูรพา ได้ ผมพัตนามาจาก ม.บูรพา ครับ แต่ห้ามเปิดระบบ Nas น่ะคับ เพราะผมใช้ช่องว่างของตาราง Nas มาใช้งาน<br />
<br />
<br />
<br />
shell script ตอนติดตั้งใช้ของ ม.บูรพาได้ครับ อันเดียวกัน<br />
<br />
<br />
<br />
Authen ตัวนี้เป็นเต็มสมบูรณ์ครับ ไม่มีตุกติกเรื่องโค้ด เสริมให้ตั้งเยอะด้าน function ขายได้เลย<br />
<br />
<br />
<br />
ส่วนที่เหลือใครอยากไปพัฒนาต่อก็ได้ครับ!<br />
<br />
<div class="post">
authen ตัวนี้รองรับทุก OS server Linux,Unix ใช้ได้ ลงเพิ่มแค่ freeradius,chillispot ก็พอ</div>
<br />
ผมคิดว่า จะเอารวมกับของท่าน maya เหมือนกัน หรือไม่ก็ดัดแปลงเข้าไปใน กระทู้นี้ <br />
<a href="http://www.linuxthai.org/forum/index.php?topic=7880.0" target="_blank">http://www.linuxthai.org/forum/index.php?topic=7880.0</a> เดี๋ยวลองดูก่อนComputer !http://www.blogger.com/profile/17986004803115235464noreply@blogger.com1