Skip to contentSkip to conversation

reg: iptables & routing http to squid

DISCUSSION swamy 1 participant 1 message Apr 10, 2003

lore
Share & tools
lore

swamy

author
#0 lore raw

I have configured two servers one is natting server 192.168.0.1 and the other one is squid cache engine 192.168.0.2 and i want to redirec all the request from 192-168.0.1 to 192.168.0.2, so i tried with following commands in natting server /sbin/iptables -A PREROUTING -i eth1 -t mangle -p tcp --dport 80 -j MARK --set-m
ark 2
echo 202 www.out >> /etc/iproute2/rt_tables
ip rule add fwmark 2 table www.out
ip route add default via 192.168.0.2 dev eth1 table www.out

it is routing to squid server but i am getting an eror, but it is going to squid server and the error is

The requested URL could not be retrieved

--------------------------------------------------------------------------------

While trying to retrieve the URL: /

The following error was encountered:

a.. Invalid URL
Some aspect of the requested URL is incorrect. Possible problems:

a.. Missing or incorrect access protocol (should be `http://'' or similar) b.. Missing hostname
c.. Illegal double-escape in the URL-Path
d.. Illegal character in hostname; underscores are not allowed
--------------------------------------------------------------------------------------------------------------------------------------

can any one give me a solutions for my configuration and it is working fine wo redirection, and cache engine is working if i configure in browser pointing to the cache engine.

thanking you all very much,

swamy