Re: How to redirect browsers with static proxy settings in iptables?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 25 July 2004 6:35 pm, Todd Landfried wrote:

> Thank you for the response.
>
> The problem is the proxy setting may change as she moves from office to
> office. Therefore, I'd like to set it up so regardless of what HER
> settings are, they'll work here.

Then simply intercept all packets addressed to whichever port/s the proxies 
listen on, no matter what the destination address is, eg:

iptables -A PREROUTING -t nat -p tcp --dport 3128 -j DNAT --to a.b.c.d
iptables -A PREROUTING -t nat -p tcp --dport 8080 -j DNAT --to a.b.c.d

etc., where a.b.c.d is the proxy you want to redirect the user to.

Alternatively intercept the packets from the particular machine (I assume this 
mobile user either has a standard static address each time she's on your 
network, or else you use DHCP and can tie her MAC address to a known IP 
address).

Regards,

Antony.

> On Jul 25, 2004, at 6:24 AM, Antony Stone wrote:
> > I don't understand (I think).   Are you trying to intercept HTTP
> > requests from
> > browsers (in which case you just intercept *all* TCP port 80/8080/3128
> > traffic, no matter where it's addressed to), or are you saying that
> > you can't
> > keep track of where to redirect it to, because the proxy address moves
> > around
> > (in which case you're as stuck as someone running a browser would be,
> > trying
> > to direct requests to a moving proxy).
> >
> > What exactly is the problem?
> >
> > Regards,
> >
> > Antony.

-- 
Never write it in Perl if you can do it in Awk.
Never do it in Awk if sed can handle it.
Never use sed when tr can do the job.
Never invoke tr when cat is sufficient.
Avoid using cat whenever possible.

                                                     Please reply to the list;
                                                           please don't CC me.



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux