Preface
This is the most comprehensive material that you fill find in the “!wild net!” , it will explain in theory how stuff works and how components fit with each-other.For a techical aproach and “how to make an hostpost” you must wait.
HotSpot
So what is an hotspot first?Most people know what this is , but for the people that don’t know I will give a simple answer.
If you go to an airport or an hotel you find the “free access point”, you connect to it and you think that now you gona surf the web free of charge.
Well, then you open your browser and an redirect gives you an login/password page with option to buy traffic and access.
This is a hotspot [ :/ ]
A normal open-source Hotspot is made of 3 components:
- ChilliSpot (acting as NAS) [Network Access Server]
- FreeRadius (acting as AAA) [An AAA Server is a server or servers that provide authentication, authorization and accounting services.]
- Postgressql (responsible for the Accounts data)
NAS / ChilliSpot
NAS stands for Network Access Server. The term network access server refer to a server devoted entirely to managing network access, ChilliSpot is meant to act as a gateway to guard access to a protected network. So, ChilliSpot is the initial entry point to the network, it is the first “device” in the network to provide services to an end user. After the client is connected ChilliSpot redirect the user on the authentication page requesting Username & Password credentials, and acts as a gateway for all further services. Typical Chillispot Operation Sequence:- Call arrival on tcp 0 0 192.168.10.15:3990 0.0.0.0:* LISTEN
- Prompt for username and password
- Request authentication from AAA server
- Confirm authentication information with AAA server
- If the authentication is OK, proceed to service.
- User authentication (first A)
- User authorization (second A)
- Accounting (last A)
Freeradius provides:
- authentication services; checks passwords (static or dynamic)
- provides authorization information to Chillispot
All communications regarding RADIUS accounting are done with an Accounting-Request packet. Chillispot that is participating in the RADIUS accounting process will generate an Accounting Start packet, which is a specific kind of Accounting-Request packet. This packet includes information on which service has been provisioned and on the user for which these services are provided. The packet is sent to the RADIUS accounting server, which will then acknowledge receipt of the data. When the client is finished with the network services, it will send to the accounting server an Accounting Stop packet (again, a specialized Accounting-Request packet), which will include the service delivered; usage statistics such as time elapsed, amount transferred, average speed; and other details. The accounting server acknowledges receipt of the stop packet, and all is well.
- Packet Types
The Access-Request packet is used by the service consumer when it is requesting a particular service from a network. The client sends a Request packet to the RADIUS server with a list of the requested services
Access-Accept
Packets sent by the RADIUS server to the client to acknowledge that the client’s request is granted.
Access-Reject
The RADIUS server is required to send an Access-Reject packet back to the client if it must deny any of the services requested in the Access-Request packet.
Access-Challenge
If a server receives conflicting information from a user, requires more information, or simply wishes to decrease the risk of a fraudulent authentication, it can issue an Access-Challenge packet to the client. The client, upon receipt of the Access-Challenge packet, must then issue a new Access-Request with the appropriate information included.
Accounting-Request
Accounting-Request packets are sent from the client to the server. When the server receives this request packet, it is required to transmit an acknowledgment to the client unless it cannot handle or process the packet.
Accounting-Response
The Accounting-Response packets are primarily designed as acknowledgment packets to be sent from the accounting server to the client, indicating that the request from the client has been received and logged.
- Packet Attributes
- User-Name
- User-Password
- Chap password
- Session-Timeout
- Acct-Status-Type
- Idle-Timeout
- NAS-IP-Address
- Terminate-Action
- Acct-Session-ID
- Acct-Authentic
- Acct-Session-Time
- Acct-Terminate-Cause indicates the reason, if possible and applicable, that a user’s session was ended
PostgreSql
Responsible for data management.Here is the place where data is stored end this is the end point of the data.
Here we go , let’s see our database.
su - postgres
psql radius radius=# \l List of databases Name | Owner | Encoding -----------+----------+---------- postgres | postgres | UTF8 radius | postgres | UTF8 template0 | postgres | UTF8 template1 | postgres | UTF8 List of relations Schema | Name | Type | Owner --------+----------------------------------+----------+-------- public | hotspot_account | table | radius public | hotspot_account_generator | table | radius public | hotspot_account_generator_id_seq | sequence | radius public | hotspot_account_id_seq | sequence | radius public | hotspot_db_version | table | radius public | hotspot_db_version_id_seq | sequence | radius public | hotspot_rate | table | radius public | hotspot_rate_id_seq | sequence | radius public | hotspot_setting | table | radius public | hotspot_setting_id_seq | sequence | radius public | hotspot_ticket | table | radius public | hotspot_ticket_accounting | table | radius public | hotspot_ticket_accounting_id_seq | sequence | radius public | hotspot_ticket_id_seq | sequence | radius public | nas | table | radius public | radacct | table | radius public | radacct_radacctid_seq | sequence | radius public | radcheck | table | radius public | radcheck_id_seq | sequence | radius public | radgroupcheck | table | radius public | radgroupcheck_id_seq | sequence | radius public | radgroupreply | table | radius public | radgroupreply_id_seq | sequence | radius public | radpostauth | table | radius public | radpostauth_id_seq | sequence | radius public | radreply | table | radius public | radreply_id_seq | sequence | radius public | realmgroup | table | radius public | realmgroup_id_seq | sequence | radius public | realms | table | radius public | realms_id_seq | sequence | radius public | usergroup | table | radius public | usergroup_id_seq | sequence | radius (33 rows) radius-# \c postgres You are now connected to database "postgres". postgres-# \d No relations found.
source : http://albanianwizard.org/tag/postgresql-freeradius
No comments:
Post a Comment