Question

I'm currently trying to set up a firewall for a network. Only specific users pc's are allowed to reach the network - all other should not have access. I have succeeded in this using rules in iptables.

My problem is then that i want to inform all blocked users that they have been denied access by redirecting calls for port 80 to a hompage.

Can any help me to define a rule for this in iptables, or otherwise define what i can do to achieve this.

Thanks for your help.

Was it helpful?

Solution

I do not know if there is some userspace addon to enable iptables to redirect http requests, but as a simple aproach set up some small webserver (lighttp or similar) and redirect the requests to its ip / port. A similar technique is called transparent proxy that reroutes outgoing traffic to a proxy without configuring the clients - see this tutorial for iptables configuration on rerouting http traffic.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top