View Single Post
  #1  
Old 18th June 2009, 06:33
giganet giganet is offline
Senior Member
 
Join Date: Aug 2007
Location: California
Posts: 243
Thanks: 116
Thanked 1 Time in 1 Post
Send a message via AIM to giganet
Question Redirect Wireless Client to Late-Pay Notice

Hello group...

I am looking to redirect wireless clients to a special page at my web-server which is running ISPConfig3 to encourage the 'Late-Paying' clients to call into our billing office to arrange payment, then I would just disable the redirect from within the client CPE after their phoning into the office.

All Access Points and CPE's utilize MikroTik routers and I was given a short description of what needs to be done on the CPE side from a user at the MikroTik Forum, I will paste the routing rule(s) below:
Code:
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:
 
add chain=dstnat action=dst-nat to-addresses=1.2.3.4 to-ports=8080 \
dst-address=!1.2.3.4 dst-port=80 protocol=tcp \
src-address-list="Deadbeats" comment="" disabled=no
 
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.
So far I have created the dir 'ClientNotices' on the web-server and within that dir I have created the file 'late-payers.shtml'.

Within '/etc/apache2/ports.conf' I added the following:
Code:
Listen 88
The MikroTik router will be redirecting the client to the servers IP at port 88 rather than a URL.
To this point I am unable to get a browser to actually go to the desired page within that dir on the web-server though.

How would I go about instructing Apache to redirect these users to the specified page on the server?

Thanking you in advance for your help and time.

Best Regards
Reply With Quote
Sponsored Links