Hi All
I install iptables and squid on the same machine in order to do transparent proxy to my local web servers.
I have few web servers in my lan which I wish to give them fake ip .
So i configured iptables and squid and in my dns I wrote my iptables line and a cname to the two servers
And the error I get when i tried to connect to nirc55.mofet.macam.ac.il is this:
<HTML><HEAD>
<TITLE>ERROR: The requested URL could not be retrieved</TITLE>
</HEAD><BODY>
<H1>ERROR</H1>
<H2>The requested URL could not be retrieved</H2>
<HR>
<P>
While trying to process the request:
<PRE>
get
 

</PRE>
<P>
The following error was encountered:
<UL>
<LI>
<STRONG>
Invalid Request
</STRONG>
</UL>
 
<P>
Some aspect of the HTTP Request is invalid.  Possible problems:
<UL>
<LI>Missing or unknown request method
<LI>Missing URL
<LI>Missing HTTP Identifier (HTTP/1.0)
<LI>Request is too large
<LI>Content-Length missing for POST or PUT requests
<LI>Illegal character in hostname; underscores are not allowed
 
 
 
 
 
here is my related iptables config:
$IPTABLES -t nat -A POSTROUTING -o $INET_IFACE -j SNAT --to-source $INET_IP
$IPTABLES -t nat -A PREROUTING -p tcp -i eth0 --dport 80 -j \
DNAT --to 192.114.206.30:3128
 
 
And here are my squid related config:
 
 http_port 3128
acl all src 0.0.0.0/0.0.0.0
acl stam dst 192.168.0.0/255.255.255.0
acl stam1 src 192.168.0.0/255.255.255.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443 563     # https, snews
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http
acl CONNECT method CONNECT
 
http_access allow manager localhost
http_access allow stam
http_access allow stam1
http_access deny manager
http_access deny !Safe_ports

http_access deny CONNECT !SSL_ports

http_access deny all
 

icp_access allow all
 
 miss_access allow all
 
 
http_access allow stam
http_access allow stam1
http_access deny manager
http_access deny all

###################################################

httpd_accel_host virtual
 httpd_accel_port 80
 httpd_accel_with_proxy on
 httpd_accel_uses_host_header on
 
 
########################################################################
Whats wrong with my config ?Thanks in advance
 
 
                                                                                               Nir Cohen
 
 

Reply via email to