From: "swamy" Subject: reg: iptables & routing http to squid Date: Thu, 10 Apr 2003 18:13:20 +0530 Sender: netfilter-admin@lists.netfilter.org Message-ID: <000801c2ff5e$c7421280$c100a8c0@aa1243> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0005_01C2FF8C.DDC3DBA0" Return-path: Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: To: netfilter@lists.netfilter.org This is a multi-part message in MIME format. ------=_NextPart_000_0005_01C2FF8C.DDC3DBA0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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=20 /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=20 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: /=20 The following error was encountered:=20 a.. Invalid URL=20 Some aspect of the requested URL is incorrect. Possible problems:=20 a.. Missing or incorrect access protocol (should be `http://'' or = similar)=20 b.. Missing hostname=20 c.. Illegal double-escape in the URL-Path=20 d.. Illegal character in hostname; underscores are not allowed=20 -------------------------------------------------------------------------= ------------------------------------------------------------- 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 ------=_NextPart_000_0005_01C2FF8C.DDC3DBA0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I have configured two servers one is = natting server=20 192.168.0.1 and the other one is squid cache engine 192.168.0.2 and i = want to=20 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=20 tcp --dport 80 -j MARK --set-m
ark 2
echo 202 www.out >> = /etc/iproute2/rt_tables
ip rule=20 add fwmark 2 table www.out
ip route = add default=20 via 192.168.0.2 dev eth1 table www.out=20
 
it is routing to squid server but i am = getting an=20 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: /=20

The following error was encountered:=20

  • Invalid URL

Some aspect of the requested URL is incorrect. Possible problems:=20

  • Missing or incorrect access protocol (should be `http://'' or = similar)=20
  • Missing hostname=20
  • Illegal double-escape in the URL-Path=20
  • Illegal character in hostname; underscores are not allowed =
--------------------------------------------------------------------= ------------------------------------------------------------------
 
can any one give me a solutions for my configuration and it is = working fine=20 wo redirection, and cache engine is working if i configure
in browser pointing to the cache engine.
 
thanking you all very much,
 
swamy
------=_NextPart_000_0005_01C2FF8C.DDC3DBA0--