| 1 |
= Virtual Servers |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
*Goal:* To understand how to create and use a new virtual server. |
| 6 |
|
| 7 |
*Time:* 20-30 minutes |
| 8 |
|
| 9 |
*File:* |
| 10 |
|
| 11 |
- `etc/raddb/sites-enabled/virtual` |
| 12 |
|
| 13 |
*documentation page:* raddb/sites-available/README |
| 14 |
|
| 15 |
A "virtual server" is a configuration file that contains the |
| 16 |
following sections: |
| 17 |
|
| 18 |
- *listen* Defines a new socket. |
| 19 |
- *authorize* The authorization section |
| 20 |
- *authenticate* The authentication section |
| 21 |
- *post-auth* The post-authentication section |
| 22 |
- *pre-proxy* The pre-proxy section |
| 23 |
- *post-proxy* The post-proxy section |
| 24 |
- *preacct* The pre-accounting section |
| 25 |
- *accounting* The accounting section |
| 26 |
|
| 27 |
Create a new file `raddb/sites-enabled/virtual`. Put the following text |
| 28 |
into it: |
| 29 |
|
| 30 |
----------------------------------------------- |
| 31 |
listen { |
| 32 |
ipaddr = 127.0.0.1 |
| 33 |
port = 18273 # some random 5 digit number |
| 34 |
type = auth |
| 35 |
} |
| 36 |
|
| 37 |
authorize { |
| 38 |
control.Clearext-Password := "hello" |
| 39 |
pap |
| 40 |
} |
| 41 |
|
| 42 |
authenticate { |
| 43 |
pap |
| 44 |
} |
| 45 |
----------------------------------------------- |
| 46 |
|
| 47 |
Start the server in debugging mode, and use `radtest` to send a PAP |
| 48 |
authentication request to the server at the port defined above. |
| 49 |
|
| 50 |
== Questions |
| 51 |
|
| 52 |
1. What happens when you try to use CHAP or MS-CHAP? Why does this result occur? |
| 53 |
2. How can you make that virtual server use CHAP or MS-CHAP? |
| 54 |
3. What happens when you try different User-Names? Why does this result occur? |
| 55 |
4. How can you make the above configuration authenticate different |
| 56 |
users via different passwords? |
| 57 |
|
| 58 |
// Copyright (C) 2021 Network RADIUS SAS. Licenced under CC-by-NC 4.0. |
| 59 |
// This documentation was developed by Network RADIUS SAS. |