Configuring L4-Redirect-ipset for Accel-ipoe and ABillS

In order to authorize clients with a negative balance Accel-ppp to add IP addresses to the ipset list, add the following to its configuration, in the ipoe section:

attr-l4-redirect=L4-Redirect
attr-l4-redirect-ipset=L4-Redirect-ipset
l4-redirect-ipset=l4-redirect

Also make sure that the dictionaries of Freeradius and Accel-ppp have:

ATTRIBUTE L4-Redirect 243 integer
ATTRIBUTE L4-Redirect-ipset 244 string

And in the ABillS interface, add for each tariff in the “Negative Deposit Filter” field:

RAD: L4-Redirect=1,L4-Redirect-ipset=denyip,PPPD-Downstream-Speed-Limit=3000,PPPD-Upstream-Speed-Limit=1000

Where denyip is the name of the ipset list, which can be disabled by FORWARD via iptables, and also redirected to an HTTP page with information.

If there are a lot of tariffs, you can add a SQL request, for example, since I once indicated “NEG_DEPOSIT” in the “Negative Deposit Filter” field, I changed it like this:

SELECT count(*) FROM tarif_plans WHERE neg_deposit_filter_id='NEG_DEPOSIT';
UPDATE tarif_plans SET neg_deposit_filter_id='RAD: L4-Redirect=1,L4-Redirect-ipset=denyip,PPPD-Downstream-Speed-Limit=3000,PPPD-Upstream-Speed-Limit=1000' WHERE neg_deposit_filter_id='NEG_DEPOSIT';

Prior to version ABillS 0.82, in the “Negative deposit filter” field, freeradius parameters must be listed separated by a comma without a space, after version ABillS 0.82 – separated by a comma with a space otherwise they will not be transferred.

See also my articles:

Leave a comment

Leave a Reply

Discover more from IT Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading