Not long ago I thought I had bookmarked a HowTo that showed how you could configure a screen to load into a users browser that would inform them that they were disconnected for non-payment?
I have poored through my local bookmarks and have had no luck so far finding this HowTo at the MT Wiki.
Is it possible that anyone knows of this HowTo and it’s URL?
Thanking you in advance for your information and help in locating this article…
A single line of code will probably accomplish what you’re looking for. I use a simple redirect that reads from an address list. That way, I can just add and remove IP addresses from the list to show the deadbeat webpage or not. Here’s the NAT rule:
This redirects all port 80 traffic that isn’t already destined to the webserver at 1.2.3.4 to port 8080 on 1.2.3.4. Port 8080 on the webserver is set up with a simple HTML page that says “pay up” (in more polite terms of course). To use this, just set up your webserver to listen on a specific port and put your HTML page there. (The reason it’s on a specific port is because you can redirect traffic to an IP and port, not to a URL.) When you have a customer that you want to redirect to the pay-up page, just add their IP to the “Deadbeats” address list and you’re done. To take them off, just remove them from the list. It’s pretty simple. You might want to make this NAT rule the first one in your NAT rules list so that other actions aren’t taken on the IP first, for example, src-nat before they see the pay-up page.
I do sincerely appreciate the knlowledge you are sharing and I will impliment this rule at all CPE’s to only be enabled upon times of failure to pay to any one client’s CPE.
I am using this rule, but cant seem to get it to work. Trying to load a webpage results in a time out, no redirection. Is this because the IP I am specifying is not local? Using OS v4.9.
You can adjust that to work in non-PPPoE environments, too - just find some other way to populate the address list. If you’re not looking to just periodically show a payment reminder but to show it every time the client requests a webpage mark the connection as ‘payment_reminder’ in the first mangle rule, and don’t implement the second mangle rule as well as the only filter rule.
You can remove the dst-address argument, ubb was just using it to prevent users from not getting to port 80 of his web server. Do you have any filter rules set up to block no-paying customers? If so, you need to allow DNS and HTTP requests to get through the filter. A web browser will not try to go anywhere if the DSN requests fails, and they need to be able to pass port 80 traffic to get to your web server.
if you have a .htaccess rule specifying the error pages are “page you want users to be directed to” they’ll always see the page regardless of what they were trying to load.