Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiesun committed Feb 22, 2024
2 parents e36fe34 + e4b1c03 commit 4044cea
Show file tree
Hide file tree
Showing 17 changed files with 290 additions and 192 deletions.
10 changes: 5 additions & 5 deletions assets/buildinfo.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
BuildVersion=latest v8.0.7 2024-02-08 16:51:33
BuildVersion=latest v8.0.7 2024-02-22 15:35:37
ReleaseVersion=v8.0.7
BuildTime=2024-02-08 16:51:33
BuildTime=2024-02-22 15:35:37
BuildName=toughradius
CommitID=ab85f18547a8ddcc3a06496945886a859dac5967
CommitDate=Thu, 8 Feb 2024 16:47:52 +0800
CommitID=e09ba304af420cd0c3f72459c7090add74606ec7
CommitDate=Thu, 22 Feb 2024 15:34:03 +0800
[email protected]
CommitSubject=2024-02-08 16:47:41 : readme
CommitSubject=更新了文档和注释的标题,以及修复了一些格式问题。
2 changes: 1 addition & 1 deletion docs/documents/RouterOS Radius Integration Guide.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Mikrotik TR069 Client Setup for ToughRADIUS
# Mikrotik TR069 Client Setup for ToughRADIUS

Here is the guide to configure ROUTEROS to integrate with TOUGHRADIUS:

Expand Down
2 changes: 1 addition & 1 deletion docs/documents/TR069 Preset template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## ToughRADIUS 定义的 TR069 预置模板
## ToughRADIUS Defined TR069 Preset Template

The description format of presets is the standard YAML format, which can facilitate the use of various data structures. For example, online automatic initialization of new devices can be done using a set of presets

Expand Down
2 changes: 1 addition & 1 deletion docs/documents/bras.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Introduction to BRAS
# Introduction to BRAS

Broadband Remote Access Server (BRAS) is a high-capacity network device typically located in a service provider's (ISP's) network. It plays a crucial role in delivering high-speed internet access services, particularly in DSL or cable internet services.

Expand Down
48 changes: 24 additions & 24 deletions docs/documents/cisco.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
## Cisco BRAS设备对接 ToughRADIUS 服务器
# The Cisco BRAS device is connected to the ToughRADIUS server

cisco 用户手册,用于指导如何将思科(Cisco)的Broadband Remote Access ServerBRAS)设备对接到 ToughRADIUS 服务器,
涉及到一系列步骤。以下是一个概括的流程,包含了必要的命令行操作:
Cisco User Manual for guidance on how to dock a Cisco Broadband Remote Access Server (BRAS) device to a ToughRADIUS server,
There are a series of steps involved. Here's a high-level process that includes the necessary command-line operations:

### 1. 配置RADIUS服务器信息
## 1. Configure RADIUS server information

首先,您需要在Cisco BRAS设备上配置RADIUS服务器的信息。这通常包括服务器的IP地址和共享秘钥。
First, you need to configure the information of the RADIUS server on the Cisco BRAS device. This usually includes the server's IP address and shared key.

```
radius-server host [RADIUS服务器IP地址] key [共享秘钥]
radius-server host [RADIUS server IP address] key [shared key]
```

### 2. 配置认证和记帐
## 2. Configure authentication and accounting

接下来,配置设备以使用RADIUS进行认证(Authentication)和记帐(Accounting)。
Next, configure the device to use RADIUS for Authentication and Accounting.

```
aaa new-model
aaa authentication ppp default group radius
aaa accounting network default start-stop group radius
```

这些命令启用AAA(认证、授权和记帐),并将默认PPP认证和网络记帐设置为使用RADIUS。
These commands enable AAA (Authentication, Authorization, and Accounting) and set the default PPP authentication and network accounting to use RADIUS.

### 3. 配置用户接口
## 3. Configure the user interface

根据您的网络架构,配置用户接口。这可能包括设置虚拟模板、接口池等。
Configure the user interface based on your network architecture. This may include setting up virtual templates, interface pools, and so on.

```
interface Virtual-Template1
ip unnumbered [某个接口]
peer default ip address pool [地址池名称]
ip unnumbered [an interface]
peer default ip address pool
ppp authentication chap
```

### 4. 创建地址池
## 4. Create an address pool

如果您的用户将从BRAS设备获得IP地址,您需要创建一个地址池。
If your users will get IP addresses from BRAS devices, you need to create an address pool.

```
ip local pool [地址池名称] [起始IP地址] [结束IP地址]
ip local pool [address pool name] [start IP address] [end IP address]
```

### 5. 测试配置
### 5. Test the configuration

完成配置后,进行测试以确保BRAS设备可以成功地与RADIUS服务器通信。这可以通过尝试从客户端设备进行连接来完成。
Once the configuration is complete, test to ensure that the BRAS device can successfully communicate with the RADIUS server. This can be done by trying to connect from the client device.

### 6. 监控和故障排除
## 6. Monitoring and troubleshooting

监控BRAS和RADIUS的日志,以确保一切正常运行。如果遇到问题,使用如下命令进行故障排除:
Monitor the logs of the BRAS and RADIUS to make sure everything is working properly. If you encounter problems, use the following command to troubleshoot:

```
debug radius authentication
debug radius accounting
```

请注意,这个流程是一个基本的指南,具体的配置可能会根据您的网络环境和需求有所不同。在进行任何配置之前,
请确保您已经详细阅读了思科的官方文档,并理解了您的网络架构。同时,建议在生产环境之外的测试环境中先行试验配置。
Please note that this process is a basic guide, and the exact configuration may vary depending on your network environment and needs. Before any configuration is made,
Make sure you have read Cisco's official documentation in detail and understand your network architecture. At the same time, it is recommended to experiment with the configuration in a test environment other than the production environment.

当您在 BRAS 配置完成后,您需要在 ToughRADIUS 中创建一个对应的 VPE 设备,
然后在 ToughRADIUS 中创建一个对应的 PPPoE 用户,最后在客户端设备上创建一个 PPPoE 连接,使用 PPPoE 用户名和密码进行拨号测试。
After you configure BRAS, you need to create a corresponding VPE device in ToughRADIUS.
Then create a corresponding PPPoE user in ToughRADIUS, and finally create a PPPoE connection on the client device for dial-up testing with the PPPoE username and password.
108 changes: 55 additions & 53 deletions docs/documents/configuration.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,74 @@
这个配置文件是TOUGHRADIUS的YAML格式配置文件,它定义了TOUGHRADIUS服务器的各种设置。下面是对配置文件中每个部分的详细说明:
# ToughRADIUS Configuration

This configuration file is a YAML format configuration file of TOUGHRADIUS, which defines various settings of the TOUGHRADIUS server. Below is a detailed description of each section in the configuration file:

```yml
system:
appid: ToughRADIUS # 应用程序ID,用于标识TOUGHRADIUS实例
location: Asia/Shanghai # 服务器所在地区的时区设置
workdir: /var/toughradius # TOUGHRADIUS的工作目录,用于存放日志、数据文件等
debug: true # 是否开启调试模式,开启后会输出更多的日志信息
appid: ToughRADIUS # Application ID, used to identify the TOUGHRADIUS instance
location: Asia/Shanghai # Time zone setting for the region where the server is located
workdir: /var/toughradius # The working directory of TOUGHRADIUS, used to store logs, data files, etc.
debug: true #Whether to enable debugging mode, more log information will be output when enabled.

web:
host: 0.0.0.0 # Web服务监听的主机地址,0.0.0.0表示监听所有网络接口
port: 1816 # Web服务监听的端口号
tls_port: 1817 # Web服务监听的TLS加密端口号
secret: 9b6de5cc-0731-1203-xxtt-0f568ac9da37 # Web服务的密钥,用于加密等安全相关的操作
host: 0.0.0.0 # The host address that the Web service monitors, 0.0.0.0 means monitoring all network interfaces
port: 1816 # The port number that the Web service listens to
tls_port: 1817 # The TLS encryption port number that the web service listens to
secret: 9b6de5cc-0731-1203-xxtt-0f568ac9da37 # Web service key, used for encryption and other security-related operations

database:
type: postgres # 数据库类型,这里使用的是PostgreSQL
host: 127.0.0.1 # 数据库服务器的主机地址
port: 5432 # 数据库服务器的端口号
name: toughradius_v8 # 数据库名称
user: postgres # 数据库用户名
passwd: root # 数据库密码
max_conn: 100 # 数据库最大连接数
idle_conn: 10 # 数据库空闲连接数
debug: false # 数据库操作是否开启调试模式
type: postgres #Database type, PostgreSQL is used here
host: 127.0.0.1 # Host address of the database server
port: 5432 #Port number of the database server
name: toughradius_v8 # Database name
user: postgres # Database username
passwd: root # Database password
max_conn: 100 # Maximum number of database connections
idle_conn: 10 # Number of database idle connections
debug: false # Whether to enable debugging mode for database operations

freeradius:
enabled: true # 是否启用FreeRADIUS集成
host: 0.0.0.0 # FreeRADIUS服务监听的主机地址
port: 1818 # FreeRADIUS服务监听的端口号
debug: true # FreeRADIUS服务是否开启调试模式
enabled: true # Whether to enable FreeRADIUS integration
host: 0.0.0.0 # The host address monitored by the FreeRADIUS service
port: 1818 # The port number monitored by the FreeRADIUS service
debug: true # Whether the FreeRADIUS service enables debugging mode

radiusd:
enabled: true # 是否启用内置的RADIUS服务
host: 0.0.0.0 # RADIUS服务监听的主机地址
auth_port: 1812 # RADIUS认证服务的端口号
acct_port: 1813 # RADIUS计费服务的端口号
radsec_port: 2083 # RADIUS安全服务的端口号
debug: true # RADIUS服务是否开启调试模式
enabled: true # Whether to enable the built-in RADIUS service
host: 0.0.0.0 # The host address that the RADIUS service listens to
auth_port: 1812 # The port number of the RADIUS authentication service
acct_port: 1813 # Port number of RADIUS accounting service
radsec_port: 2083 # Port number of RADIUS security service
debug: true # Whether the RADIUS service enables debugging mode

tr069:
host: 0.0.0.0 # TR069服务监听的主机地址
port: 1819 # TR069服务监听的端口号
tls: false # 是否启用TLS加密,这里设置为false表示不启用
secret: 9b6de5cc-0731-1203-xxtt-0f568ac9da37 # TR069服务的密钥
debug: true # TR069服务是否开启调试模式
host: 0.0.0.0 # TR069 service listening host address
port: 1819 # TR069 service listening port number
tls: false #Whether to enable TLS encryption, set to false here to disable it
secret: 9b6de5cc-0731-1203-xxtt-0f568ac9da37 # TR069 service key
debug: true # Whether the TR069 service enables debugging mode

mqtt:
server: "" # MQTT服务器地址,如果使用MQTT则需要配置
client_id: "" # MQTT客户端ID
username: "" # MQTT服务的用户名
password: "" # MQTT服务的密码
debug: false # MQTT服务是否开启调试模式
server: "" #MQTT server address, if you use MQTT you need to configure it
client_id: "" # MQTT client ID
username: "" # Username of MQTT service
password: "" # Password for MQTT service
debug: false # Whether the MQTT service enables debugging mode

logger:
mode: development # 日志模式,development表示开发模式
console_enable: true # 是否在控制台输出日志
loki_enable: false # 是否启用Loki日志聚合系统
file_enable: true # 是否启用文件日志
filename: /var/toughradius/toughradius.log # 日志文件的路径
queue_size: 4096 # 日志队列大小
loki_api: http://127.0.0.1:3100 # Loki服务的API地址
loki_user: toughradius # Loki服务的用户名
loki_pwd: toughradius # Loki服务的密码
loki_job: toughradius # Loki服务的工作名
metrics_storage: /var/toughradius/data/metrics # 指标数据存储路径
metrics_history: 168 # 指标数据的历史保留时间(小时)
mode: development #Log mode, development means development mode
console_enable: true # Whether to output logs on the console
loki_enable: false # Whether to enable the Loki log aggregation system
file_enable: true # Whether to enable file logs
filename: /var/toughradius/toughradius.log # Path to the log file
queue_size: 4096 # Log queue size
loki_api: http://127.0.0.1:3100 # API address of Loki service
loki_user: toughradius # Username for Loki service
loki_pwd: toughradius # Password for Loki service
loki_job: toughradius # Job name of Loki service
metrics_storage: /var/toughradius/data/metrics #Metric data storage path
metrics_history: 168 # Historical retention time of indicator data (hours)
```
请注意,这个配置文件中的某些设置可能需要根据您的实际环境进行调整。例如,数据库的用户名和密码应该设置为您数据库的实际凭据,
TLS相关的设置应该根据您是否使用TLS来调整,MQTT和Loki的配置则取决于您是否使用这些服务。在修改配置文件之后,
通常需要重启TOUGHRADIUS服务来使更改生效。
Please note that some settings in this configuration file may need to be adjusted based on your actual environment. For example, the database username and password should be set to your actual credentials for the database,
TLS related settings should be adjusted depending on whether you use TLS, and MQTT and Loki configuration depends on whether you use these services. After modifying the configuration file,
It is usually necessary to restart the TOUGHRADIUS service for the changes to take effect.
2 changes: 2 additions & 0 deletions docs/documents/docker.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# ToughRADIUS Docker Quick Deployment

Here's the Docker deployment configuration for ToughRADIUS and PostgreSQL database, with detailed explanation as follows:

```yaml
Expand Down
2 changes: 1 addition & 1 deletion docs/documents/freeradius rest module.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## FreeRadius rest module Configuration
# FreeRadius rest module Configuration

[FreeRadius configuration case](https://github.com/talkincode/toughradius/tree/main/assets/freeradius)

Expand Down
2 changes: 1 addition & 1 deletion docs/documents/freeradius.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## freeRADIUS integration
# freeRADIUS integration


![freeradius-toughradius](https://github.com/talkincode/toughradius/assets/377938/f735d45d-3325-49e5-8b73-21c6205248e3)
Expand Down
Loading

0 comments on commit 4044cea

Please sign in to comment.