[MLB-WIRELESS] MW Intranet DNS & Redirection

Donovan Baarda abo at minkirri.apana.org.au
Sat Nov 29 17:32:45 EST 2003


On Sat, Nov 29, 2003 at 03:59:33AM +1100, Ben Anderson wrote:
> iptables -t nat -A PREROUTING -s a.b.c.d/24 -p TCP --dport 80 -j REDIRECT 80
> 
> Where a.b.c.d/24 represents your subnet you want redirected...

I use shorewall with the following line in /etc/shorewall/rules to
redirect all port 80 taffic from my "dip" zone (dialin lines) not
directly to my webserver to port 81.

REDIRECT        dip     81      tcp     www     -       !203.12.237.33

On port 81 from tcpd I run a little shell script called 'catserver'
that serves up a single static http page explaining how to configure
your proxy for my system. It would be a simple matter to do this kind
of thing to redirect people not using your proxy to some sort of info
page, and use auth on your proxy to ensure only legit users could use
it. There is nothing fancy with this setup, and I don't even recommend
it in any way as a good solution... it's just something I set up ages
ago that is still working. For the record catserver is available at;

http://minkirri.apana.org.au/~abo/projects/mirrord/catserver

-- 
----------------------------------------------------------------
Donovan Baarda                http://minkirri.apana.org.au/~abo/
----------------------------------------------------------------

To unsubscribe: send mail to majordomo at wireless.org.au
with "unsubscribe melbwireless" in the body of the message



More information about the Melbwireless mailing list