Community discussions

MikroTik App
 
salmanbd
just joined
Topic Author
Posts: 22
Joined: Tue Feb 08, 2011 9:53 pm

web proxy

Thu Feb 10, 2011 12:36 pm

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......
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: web proxy

Thu Feb 10, 2011 12:43 pm

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.
 
jtroybailey
Member Candidate
Member Candidate
Posts: 176
Joined: Thu Oct 07, 2010 10:24 am
Location: Brisbane, Australia

Re: web proxy

Thu Feb 10, 2011 1:14 pm

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.
 
salmanbd
just joined
Topic Author
Posts: 22
Joined: Tue Feb 08, 2011 9:53 pm

Re: web proxy

Thu Feb 10, 2011 10:03 pm

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.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: web proxy

Thu Feb 10, 2011 10:18 pm

It's easiest if you attach the Squid box to ether3 on a completely separate network.
 
salmanbd
just joined
Topic Author
Posts: 22
Joined: Tue Feb 08, 2011 9:53 pm

Re: web proxy

Sun Feb 13, 2011 12:31 pm

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)
 
jtroybailey
Member Candidate
Member Candidate
Posts: 176
Joined: Thu Oct 07, 2010 10:24 am
Location: Brisbane, Australia

Re: web proxy

Sun Feb 13, 2011 4:12 pm

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.
 
salmanbd
just joined
Topic Author
Posts: 22
Joined: Tue Feb 08, 2011 9:53 pm

Re: web proxy

Sun Feb 13, 2011 10:24 pm

ok i want to visite squid forum..so plz give me forum link..plZ
 
jtroybailey
Member Candidate
Member Candidate
Posts: 176
Joined: Thu Oct 07, 2010 10:24 am
Location: Brisbane, Australia

Re: web proxy

Mon Feb 14, 2011 6:52 am

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
 
salmanbd
just joined
Topic Author
Posts: 22
Joined: Tue Feb 08, 2011 9:53 pm

Re: web proxy

Mon Feb 14, 2011 9:22 pm

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