• MikroTik.com
  • RouterBOARD
  • User Meeting
  • Training
  • User Manual
  • Support
  • Downloads
  • Videos
Register |   * Login | HOME

View unanswered posts | View active topics

Port 80 redirect to standalone Squid Proxy server  Page 1 of 1
 [ 11 posts ]  Post new topic Reply to topic
  Print view Previous topic | Next topic 
Author Message
rednetwifi
 Post subject: Port 80 redirect to standalone Squid Proxy server
PostPosted: Wed Jul 09, 2008 11:31 am 
Offline
Frequent Visitor
Frequent Visitor

Joined: Sat May 24, 2008 2:37 am
Posts: 58
Karma: 0
Hello,

Please can some one give me a bit of info.. I have looked at this link

http://www.mikrotik.com/testdocs/ros/2.9/ip/webproxy.php and confused the hell out of me.. :? :? :?

And i am well still confused.. We run a 2.6 Squid server on a standalone machine. I dont want the ROUTEROS to handle the cache, all i want is it to forward all the webpage requests to the SQUID Server.

Ok this is our network layout

192.168.0.x/24 Customers -----> 192.168.0.251 (RouterOS Gatway) ----> 192.168.0.2 DNS Server -----> 192.168.0.4 --- Squid Server ----> 192.168.0.1 Internet Modem

Here is my config so far:

# ADDRESS NETWORK BROADCAST INTERFACE
0 ;;; local Lan
192.168.0.251/24 192.168.0.0 192.168.0.255 ether1
1 ;;; WAN
192.168.9.100/24 192.168.9.0 192.168.9.255 ether2

Flags: X - disabled, I - invalid, D - dynamic
0 chain=srcnat action=masquerade

# DST-ADDRESS PREF-SRC G GATEWAY DISTANCE IN..
0 A S 0.0.0.0/0 r 192.168.9.1 1 et..
1 ADC 192.168.0.0/24 192.168.0.251 0 et..
2 ADC 192.168.9.0/24 192.168.9.100 0 et..

So do i need to add a route or use the ROUTEROS Proxy and point and a parent proxy.

I WILL UNDERSTAND THIS ONE DAY! :shock: If anyone can point me in the right direction to a simple way to configure this, as i am very new to ROUTEROS and SQUID so its a learning curve.

Then all i have to get working is NLB and failover..... then all done, PROJECT FINISHED!!!!! I have to say i would not have got this far with out this forum!! THANK YOU ALL!!!!!

Hope you can help...

Regards

D

_________________
Darren Eley


Top
 Profile  
 
normis
 Post subject: Re: Port 80 redirect to standalone Squid Proxy server
PostPosted: Wed Jul 09, 2008 2:05 pm 
Online
MikroTik Support
MikroTik Support
User avatar

Joined: Fri May 28, 2004 10:04 am
Posts: 17163
Location: Riga, Latvia
what exactly was confising there? it's as simple as it gets. two steps:

1. set parent proxy in proxy settings
2. enable proxy

_________________
No answer to your question? How to write posts


Top
 Profile  
 
rednetwifi
 Post subject: Re: Port 80 redirect to standalone Squid Proxy server
PostPosted: Wed Jul 09, 2008 2:07 pm 
Offline
Frequent Visitor
Frequent Visitor

Joined: Sat May 24, 2008 2:37 am
Posts: 58
Karma: 0
oh i think i have been confusing myself more than anything... Will give it a try.

_________________
Darren Eley


Top
 Profile  
 
rednetwifi
 Post subject: Re: Port 80 redirect to standalone Squid Proxy server
PostPosted: Wed Jul 09, 2008 2:11 pm 
Offline
Frequent Visitor
Frequent Visitor

Joined: Sat May 24, 2008 2:37 am
Posts: 58
Karma: 0
I need to install the package, do i need to reinstall the whole lot? I am running on a demo version to get setup then going to buy the licence.

Can i get the package when using a demo?

_________________
Darren Eley


Top
 Profile  
 
normis
 Post subject: Re: Port 80 redirect to standalone Squid Proxy server
PostPosted: Wed Jul 09, 2008 2:18 pm 
Online
MikroTik Support
MikroTik Support
User avatar

Joined: Fri May 28, 2004 10:04 am
Posts: 17163
Location: Riga, Latvia
webproxy is not working in the demo version. you can try it only in the key-less 24h version.

another approach would be to not use any webproxy on the RouterOS, but just make a DST-NAT rule with action DST-NAT to redirect all TCP:80 traffic to your Squid

_________________
No answer to your question? How to write posts


Top
 Profile  
 
rednetwifi
 Post subject: Re: Port 80 redirect to standalone Squid Proxy server
PostPosted: Wed Jul 09, 2008 2:24 pm 
Offline
Frequent Visitor
Frequent Visitor

Joined: Sat May 24, 2008 2:37 am
Posts: 58
Karma: 0
ip firewall
dst-nat protocol=tcp dst-port=80 Action dst-nat to-address=192.168.0.4 to-ports=3128

Would that be correct then?

_________________
Darren Eley


Top
 Profile  
 
normis
 Post subject: Re: Port 80 redirect to standalone Squid Proxy server
PostPosted: Wed Jul 09, 2008 2:34 pm 
Online
MikroTik Support
MikroTik Support
User avatar

Joined: Fri May 28, 2004 10:04 am
Posts: 17163
Location: Riga, Latvia
looks correct to me

_________________
No answer to your question? How to write posts


Top
 Profile  
 
rednetwifi
 Post subject: Re: Port 80 redirect to standalone Squid Proxy server
PostPosted: Wed Jul 09, 2008 2:39 pm 
Offline
Frequent Visitor
Frequent Visitor

Joined: Sat May 24, 2008 2:37 am
Posts: 58
Karma: 0
ok, that seems to be working, now i have a problem with squid i think. I get this error.. :(

ERROR
The requested URL could not be retrieved

While trying to process the request:

GET / HTTP/1.1
Host: http://www.google.co.uk
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: PREF=ID=111371bc4a18835c:TM=1211629667:LM=1211629667:S=TmP82Z5GPKJkLUT-; NID=12=chy9FDypusRC8gb7w7ZNlHqolb-YF7JDgYz-4P5Pjsn8u1Rbj3Owo95IdtuA3TWM8MoVAAlY3TZ8qI1NQt0DKW9k9N3Nc1HPOHZhzYSl-vQfWt4hIWadJmFKkbN00i-y; S=photos_html=Hux7A7CkRziZm-EnpvUdyw



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.

_________________
Darren Eley


Top
 Profile  
 
normis
 Post subject: Re: Port 80 redirect to standalone Squid Proxy server
PostPosted: Wed Jul 09, 2008 2:47 pm 
Online
MikroTik Support
MikroTik Support
User avatar

Joined: Fri May 28, 2004 10:04 am
Posts: 17163
Location: Riga, Latvia
maybe try searching this forum? I see a lot of similar issues:
viewtopic.php?f=1&t=21271&p=101456&hilit=external+proxy#p101456

(there is some solution also)

_________________
No answer to your question? How to write posts


Top
 Profile  
 
Equis
 Post subject: Re: Port 80 redirect to standalone Squid Proxy server
PostPosted: Thu Jul 10, 2008 12:00 am 
Offline
Forum Veteran
Forum Veteran
User avatar

Joined: Mon Jun 06, 2005 5:48 am
Posts: 886
Karma: 0

Location: Melbourne(ish) Australia
Do some google of setting your squid to be transparent proxy.

I think this will fix that error

:-)


Top
 Profile  
 
rednetwifi
 Post subject: Re: Port 80 redirect to standalone Squid Proxy server
PostPosted: Thu Jul 10, 2008 9:56 am 
Offline
Frequent Visitor
Frequent Visitor

Joined: Sat May 24, 2008 2:37 am
Posts: 58
Karma: 0
Once again thanks to the Forum i was able to get squid now working correctly as a Transparent Cache.

Now got to work on failover just in case it stops working. If anyone is having problems configuring squid, please email me and i will send you my squid.conf setup with the RouterOS Config so you can setup like it did...

OK now failover

_________________
Darren Eley


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  Page 1 of 1
 [ 11 posts ] 

Board index » RouterOS » Beginner Basics

All times are UTC + 2 hours


Who is online

Users browsing this forum: erlinden and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Karma functions powered by Karma MOD © 2007, 2009 m157y