gvigner
March 8th, 2010, 10:08 AM
Hi,
My goal is only to monitor the traffic on my machine using squidview.
So, I have installed squid on my machine with the following parameters in /etc/squid/squid.conf :
acl internal_network src 192.168.1.0/24
http_access allow internal_network
When I configure the proxy in my browser on localhost:3128, I can see logs scrolling in squidview. I'd like now to get the same result, but using iptables, and not by having to set the proxy in my browser.
I have tested three different iptables, but unsuccessfully :
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -t nat -A PREROUTING -i eth0 -s 192.168.1.0/24 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 192.168.1.101:3128
But none of them worked for me.
Can someone help me to make it work ?
Thanks,
Gil
My goal is only to monitor the traffic on my machine using squidview.
So, I have installed squid on my machine with the following parameters in /etc/squid/squid.conf :
acl internal_network src 192.168.1.0/24
http_access allow internal_network
When I configure the proxy in my browser on localhost:3128, I can see logs scrolling in squidview. I'd like now to get the same result, but using iptables, and not by having to set the proxy in my browser.
I have tested three different iptables, but unsuccessfully :
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -t nat -A PREROUTING -i eth0 -s 192.168.1.0/24 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 192.168.1.101:3128
But none of them worked for me.
Can someone help me to make it work ?
Thanks,
Gil