Page 1 of 1

web proxy

Posted: Thu Feb 10, 2011 12:36 pm
by salmanbd
hi everyone...how are you???
i just want to know how to configure ubuntu squid server in mikrotik...
i have running squid proxy server....and when i put my squid's ip to my browser proxy setting then it works fine...

My quistion is how to configure proxy server to mikrotik as parent proxy..

squid ip is 192.121.122.3
port 3128

mikrotik network address 192.121.122.1
dns1= 192.168.0.1
dns2= 192.168.2.1

please anybody help me......

Re: web proxy

Posted: Thu Feb 10, 2011 12:43 pm
by janisk
please check http://wiki.mikrotik.com/wiki/Manual:IP/Proxy

details on how to set up parent proxy. You can disable caching on router off, so you do not cache on nand.

Re: web proxy

Posted: Thu Feb 10, 2011 1:14 pm
by jtroybailey
you could also add a nat rule
     chain=dstnat action=dst-nat to-addresses=192.121.122.3 to-ports=3128 protocol=tcp in-interface=ether3 dst-port=80 
make sure you change the interface to the network that you want to use the proxy. Also this wont work if squid is on the same subnet as the clients you wish to use it.

Re: web proxy

Posted: Thu Feb 10, 2011 10:03 pm
by salmanbd
thanks.but one more question..i m using ether1 as WAN..and ether2 as LAN.so where should i connect my squid...directly ether3 or
Ether2=switch=squid??
Plz help.

Re: web proxy

Posted: Thu Feb 10, 2011 10:18 pm
by fewi
It's easiest if you attach the Squid box to ether3 on a completely separate network.

Re: web proxy

Posted: Sun Feb 13, 2011 12:31 pm
by salmanbd
you could also add a nat rule
     chain=dstnat action=dst-nat to-addresses=192.121.122.3 to-ports=3128 protocol=tcp in-interface=ether3 dst-port=80 
make sure you change the interface to the network that you want to use the proxy. Also this wont work if squid is on the same subnet as the clients you wish to use it.



dear brother....
i was configured as u tell the rules....
but when i want to surfe google then showing error like below...
please answer





ERROR
The requested URL could not be retrieved

Invalid Request error was encountered while trying to process the request:

GET / HTTP/1.1
Host: www.google.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive


Some possible problems are:

*

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 Sun, 13 Feb 2011 10:27:43 GMT by salman-desktop (squid/2.7.STABLE7)

Re: web proxy

Posted: Sun Feb 13, 2011 4:12 pm
by jtroybailey
well thats a squid error message. so to me that says that the NAT rule worked. can that box browser the internet? I cant help with the squid problem so you may want to jump into a squid forum.

Re: web proxy

Posted: Sun Feb 13, 2011 10:24 pm
by salmanbd
ok i want to visite squid forum..so plz give me forum link..plZ

Re: web proxy

Posted: Mon Feb 14, 2011 6:52 am
by jtroybailey
that is what http://google.com is for. Without seeing your config file i dont really know but I think that you dont have squid set to trasparent mode.
you probably have a line that looks like:
http_port 3128
It needs to look like:
http_port 3128 transparent

Re: web proxy

Posted: Mon Feb 14, 2011 9:22 pm
by salmanbd
hi bro.,
I m sure that i already installed squid server by using tha command,
Sudo apt-get install squid.
And i changed tha line http_port 3128
Http_access allow localhost....what u think??
Plz dont mind.im totally new in linux..
I hope u can really help me.thanks a lot