Re: [squid-users] redirect url

From: Antony Stone <Antony@dont-contact.us>
Date: Fri, 5 Sep 2003 12:08:29 +0100

On Friday 05 September 2003 3:27 pm, Ehsan Lesani wrote:

> My Friend.
> Let me think that your specific url is for example : www.myweb.com .
> Now you can write a chain before redirection of SQUID :
>
> iptables -t nat -A PREROUTING -p tcp -d www.myweb.com -j
> DNAT --to-destination <your favourite web site>

When you type this command in, iptables will resolve the IP address of
www.myweb.com and substitute the IP address into the rule (of course it will
also resolve the destination address in the same way).

iptables / netfilter *only* works with IP addresses, it does not use
hostnames or URLs once it has been configured - they all get resolved when
the rules are entered.

Antony.

> ----- Original Message -----
> From: "babar haq" <babarhaq@email.com>
> To: "Ehsan Lesani" <ehsan@safineh.net>
> Sent: Friday, September 05, 2003 11:36 AM
> Subject: Re: [squid-users] redirect url
>
> > can u give me an idea wat kind of rule it would be ....or point me to
> > some
>
> resource
>
> > thanx any way
> > Regards,
> > Babar Haq
> > ----- Original Message -----
> > From: "Ehsan Lesani" <ehsan@safineh.net>
> > Date: Fri, 5 Sep 2003 14:50:08 +0100
> > To: "babar haq" <babarhaq@email.com>, <squid-users@squid-cache.org>
> > Subject: Re: [squid-users] redirect url
> >
> > > Dear Friend.
> > > If you are using a linux I think it would be better that you use from
> > > iptables or ipchains to do this one.
> > >
> > > Best Regards.
> > > Ehsan Lesani.
> > >
> > > ----- Original Message -----
> > > From: "babar haq" <babarhaq@email.com>
> > > To: <squid-users@squid-cache.org>
> > > Sent: Wednesday, September 03, 2003 2:31 PM
> > > Subject: [squid-users] redirect url
> > >
> > > > i am running squid 2.5 stable 3.
> > > > i want a specific url to be serviced by a local windows iis
>
> webserver???
>
> > > ie i want to redirect the url to a specific machine on our lan??
> > >
> > > > is there any such option in squid??
> > > > i hope my question is clear
> > > >
> > > > Regards,
> > > > Babar
> > > > --
> > > > __________________________________________________________
> > > > Sign-up for your own personalized E-mail at Mail.com
> > > > http://www.mail.com/?sr=signup
> > > >
> > > > CareerBuilder.com has over 400,000 jobs. Be smarter about your job
>
> search
>
> > > > http://corp.mail.com/careers
> >
> > --
> > __________________________________________________________
> > Sign-up for your own personalized E-mail at Mail.com
> > http://www.mail.com/?sr=signup
> >
> > CareerBuilder.com has over 400,000 jobs. Be smarter about your job search
> > http://corp.mail.com/careers

-- 
There are two possible outcomes.
If the result confirms the hypothesis, then you've made a measurement.
If the result is contrary to the hypothesis, then you've made a discovery.
 - Enrico Fermi
Received on Fri Sep 05 2003 - 05:08:39 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:19:33 MST