Просмотр Исходного

{toc}

h2. Описание

Схема проверялась на Debian 10 и Ubuntu 20.04

# Accel
#* IP внешний 192.168.1.130
#* Интерфейс, за которым находятся абоненты enp0s8
# Billing
#* IP 192.168.1.156

h2. Настройка

h3. BRAS
{code:title=/etc/accel-ppp.conf}
[modules]
log_file
pppoe
ipoe
radius
pppd_compat
ippool
auth_mschap_v2
auth_mschap_v1
auth_chap_md5
auth_pap
shaper

[core]
log-error=/var/log/accel-ppp/core.log
thread-count=1

[common]
single-session=replace
sid-source=urandom
check-ip=1

[log]
log-file=/var/log/accel-ppp/accel-ppp.log
log-emerg=/var/log/accel-ppp/emerg.log
log-fail-file=/var/log/accel-ppp/auth-fail.log
per-user-dir=/var/log/accel-ppp/users
per-session=1
copy=1
level=5

[radius]
verbose=5
nas-identifier=accel-ppp
nas-ip-address=192.168.1.130
gw-ip-address=192.168.0.100
server=192.168.1.156,AccelSharedSecret,auth-port=1812,acct-port=0,req-limit=100,fail-timeout=0,max-fail=10,weight=1
server=192.168.1.156,AccelSharedSecret,auth-port=0,acct-port=1813,req-limit=100,fail-timeout=0,max-fail=10,weight=1
dae-server=192.168.1.130:3799,AccelCoASecret
sid-in-auth=1
max-try=1
timeout=3

[cli]
verbose=0
telnet=127.0.0.1:2000
tcp=127.0.0.1:2001

[ipoe]
verbose=1
ifcfg=1
shared=1
interface=enp0s8
mode=L2
start=up
calling-sid=mac
check-mac-change=1
soft-terminate=0
idle-timeout=45
password=AccelCommonPassword
attr-l4-redirect=L4-Redirect
l4-redirect-ipset=Block
unit-cache=10

[pppoe]
verbose=1
called-sid=mac
interface=enp0s8

[ppp]
verbose=1
min-mtu=1280
mtu=1400
mru=1400
ccp=1
mppe=prefer
ipv4=require
ipv6=deny
lcp-echo-interval=5
lcp-echo-failure=3
lcp-echo-timeout=45
unit-cache=1
unit-preallocate=1

[dns]
dns1=8.8.8.8
dns2=8.8.4.4

[ip-pool]
gw-ip-address=10.128.0.1

[pppd-compat]
verbose=1
ip-up=/etc/ppp/ip-up
ip-down=/etc/ppp/ip-down
radattr-prefix=/var/run/radattr

[shaper]
verbose=1
attr=Filter-Id
up-limiter=police
down-limiter=htb

[connlimit]
limit=10/min
burst=3
timeout=60
{code}

{code:title=/usr/share/accel-ppp/radius/dictionary}
...
ATTRIBUTE L4-Redirect 242 integer
{code}

h3. Billing
{code:title=/app/asr_billing/cfg/usr/share/freeradius}
...
#
# Miscellaneous attributes defined in weird places that
# don't really belong anywhere else...
#
ATTRIBUTE L4-Redirect 242 integer
...
{code}