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

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' WHERE neg_deposit_filter_id='NEG_DEPOSIT';

See also my articles:
Ip-up and ip-down scripts with ipset for Accel-ppp
Installing and using ipset

Did my article help you? How about buying me a cup of coffee as an encouragement? Buy me a coffe.

Leave a comment

Leave a Reply