How to Display the Mikrotik Expired Page
Following is a small script on how you can redirect non-payment/ expired PPPoE
users to a page where he can be informed that his/her account has been suspended due to non-payment.
Also described are things to do on the radius side
1 2 3 | /ip pool add name=expiredpppoe ranges=10.10.10.2-10.10.10.254 /queue type set 0 bfifo-limit=150000000 kind=bfifo /ip firewall address-list add address=1.1.1.1 list=radiusizin |
Let’s enter the IP firewall mangle
rule in the new terminal as follows.
1 2 3 | /ip firewall mangle add action=mark-connection chain=prerouting dst-address=1.1.1.1 \ new-connection-mark=iyzico passthrough=no src-address=10.10.10.0/24 |
The IP firewall is made to masquerade
the radius IP address and the destination IP address we created in the new terminal in the NAT
rule.
1 2 3 4 5 6 7 | /ip firewall nat add action=masquerade chain=srcnat comment=site connection-mark=site add action=masquerade chain=srcnat dst-address=1.1.1.1 add action=dst-nat chain=dstnat dst-address-list=!radiusizin protocol=tcp \ src-address=10.10.10.0/24 to-addresses=wep_expired(ip address) to-ports=80 add action=redirect chain=dstnat dst-port=53 protocol=udp src-address=\ 10.10.10.0/24 to-ports=53 |
Settings to add the radius

We are creating one expired service for Radius bill reminder. And this service download/upload 256kb / 128kb date rate is creating.
We select the faturapool
that we created in the IP pool name.

I hope it has been a useful article 🙂