Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am an ISP and I need to suspend with a message the clients who didn't pay. For every web page they access they have to see "suspended" (port 80) and all the other ports need to be closed. How can I accomplish this? Thanks.

share|improve this question

migrated from stackoverflow.com Oct 20 '10 at 17:54

This question came from our site for professional and enthusiast programmers.

5  
Looks a lot like homework. Were you actually an ISP you'd know how to use Google. –  TomMD Oct 20 '10 at 17:36
add comment

1 Answer

you set up apache with default web-host hosting whatever information you want to pass.

you tell apache to show that message for any request:

ErrorDocument 404 /index.php

you redirect client's [10.1.2.3] traffic to your apache [i assume it runs on your router]:

iptables -t nat -A PREROUTING -s 10.1.2.3 -p tcp --dport 80 -j REDIRECT --to localhost:80 
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.