LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] either transparent proxy or iptables problem.

[ILUG] either transparent proxy or iptables problem.

Darragh lists at digitaldarragh.com
Sat Jan 5 00:20:26 GMT 2008


I'm finally getting somewhere!

Looks like there was no entry for routing traffic from p80 to p3128 in
iptables.

One question though,  using iptables -L or iptables -L -v, how can you see
that?

It doesn't seem like a very efficient way of administering things at all. 
from my position anyway..

ok, I added the rule into iptables as follows:
iptables -t nat -A PREROUTING -i $LAN_IN -p tcp --dport 80 -j DNAT --to
$SQUID_SERVER:$SQUID_PORT

iptables -t nat -A PREROUTING -i $INTERNET -p tcp --dport 80 -j REDIRECT
--to-port $SQUID_PORT

ok.  when I do that, it looks like squid is seeing the connections however
it's giving me a very strange error.

Sorry for all the questions, but I think I'm nearly there.  there is just 
a few more things to get out of the way.

To be more specific,  I can connect to the internet if I configure the
client to use the proxy 192.168.2.5:3128 but using iptables, it says
something about the http request is malformed.

any suggestions as to how I can determine exactly what it's finding fault
with?  could it be because of something that's getting changed in the
header as it's passing through the routing?

The page I am shown when connecting to google.com while the transparent
proxy seems to be reached is:


ERROR
The requested URL could not be retrieved

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

While trying to process the request:

GET / HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-ms-application, application/vnd.ms-xpsdocument,
application/xaml+xml, application/x-ms-xbap,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: en-ie
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET
CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2; .NET
CLR 1.1.4322)
Host: www.google.com
Connection: Keep-Alive
Cookie:
PREF=ID=479ee288bf4f1dee:TM=1195983768:LM=1196018798:GM=1:S=GIti4nhRYTdc0T7B


The following error was encountered:

Invalid Request
Some aspect of the HTTP Request is invalid. Possible problems:

Missing or unknown request method
Missing URL
Missing HTTP Identifier (HTTP/1.0)
Request is too large
Content-Length missing for POST or PUT requests
Illegal character in hostname; underscores are not allowed
Your cache administrator is webmaster.



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

Generated Sat, 05 Jan 2008 00:09:51 GMT by server.digitaldarragh
(squid/2.6.STABLE14)

Darragh




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell