Re: Setting up a proxy with iptables

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

 



I did an iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j
REDIRECT --to-ports 8080 and nothing. Just to make sure the firewall
was up I entered iptables -A OUTPUT -j DROP and it did block all
outbound traffic.

What am I missing here?

Cheers, Shawn

On Sat, Aug 2, 2008 at 1:04 AM, Michele Petrazzo - Unipex srl
<michele.petrazzo@xxxxxxxxx> wrote:
> linuxmc@xxxxxxxxx wrote:
>>
>> Hi, have you try with a rule like
>>
>> $IPTABLES -t nat -A PREROUTING  -p tcp -m tcp   --dport 80 -j DNAT
>> --to-destination 82.109.120.222:8080
>>
>> ?
>>
>> Best regards ! Marco
>>
>
> Should be better the redirect target:
>
> $IPTABLES -t nat -A PREROUTING -i $INTERNAL -p tcp --dport 80 -j REDIRECT
> --to-ports $PROXY_PORT
> $IPTABLES -t nat -A PREROUTING -i $INTERNAL -p tcp --dport 443 -j REDIRECT
> --to-ports $PROXY_PORT
>
>
> Ciao,
> MIchele
>
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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