Hi every one,
I want to redirect the HTTP ports to my proxy server (Fedora , but NOT USING IP>Proxy or IP>Web Proxy.
I just want to redirect that ports using ip firewall feature.
Any advices, Any suggestions?
ip firewall dst nat protocol=tcp In-interface=lan dst-port=80 Action dst-nat to address= xxxx (ur fedora/linux) to ports=xxx (ports u have to use, for proxy may be 3128)
If you tried the example above as-is, it has some challenges. If the web server is 192.168.0.2, then this should do:
/ip firewall nat add chain=dstnat action=dst-nat protocol=tcp dst-port=80 to-addresses=192.168.0.2
You will lose the ability to use a web-based controller on the parent device tho.
So, Look at My configuration,
I have Mikrotik 2.9.50 ROS and Squid running on Fedora 8
Everything is ok.
My Squid listens on port 61119, when I redirect the HTTP ports via Ip>Proxy or IP>Web Proxy to the Squid’s 61119 port, everything works fine,
But when I do dst-nat to my squid’s 61119 port, sometimes I get “the requested url could not be retrieved” message or did not get any reply.
Why? where did I make a mistake?
This way only ether1 (internet) will use this nat. Your local users will still go through the proxy.
EDIT: You also may want to do a
/ip firewall nat print
and insure your squid proxy port 80 dstnat rule is not above this dstnat rule. I believe you can use the place-before=0 variable to put this rule first. The first rule that applies is used, and, as the docs say, all others are ignored.
I have tried every methods, but there is no use.
My Squid will handle requests only on port 61119, if I put the dst-nat rule to all of its ports, my HTTP requests will go to Squid’s 80 port.
I don’t want that, I just want to redirect HTTP Requests.
well, if your users and squid server are in one subnet, you should use srcnat along with dstnat. but you will loose the ability to check user’s IP on squid server. Web Proxy returns this ability back =)
Thanks Chupaka.
My users are not in th same subnet with Squid,
When I put the proxy server setting to my Squid
Every thing is ok,
But I want to redirect the HTTP requests to Squid,
Please tell Me what to do,
dst-nat does not help,
I have 2 ROS 2.9.51 PIII
1 For NAS Server, and the other is for NAT Server to Internet
Look at the picture, this is the topology.
My Squid Is in the same network with NAS (192.168.250.0/24 network)
My Clients (PPTP and PPPOE) get IP addresses from 172.16.0.0/12 network.
I just want to redirect the HTTP port from network 172.16.0.0/12 to 192.168.250.50 port 63333( Ssuid listens on this port)
When I set the Proxy server settings in I-explorer or Mozilla IP=SquidIP and Port=Squidport everything is ok,
But I want to do transparent redirect NOT USING IP>Proxy or IP>Web Proxy Features
With Best Regard
Karapet Aznavuryan
Chupaka, I’ve setup the internal proxy in 3.10. It now allows me to use the parent proxy settings and this works like a charm. Except that now the squid box shows all hits originating from the mikrotik router and not the user’s ip address.
The squid is set in transparent mode and if I manually point a browser to the squid box, it shows the individual ip address in the logs but not if I use the miktotik’s web proxy.
Any ideas for me please?
My rules;
1 ;;; Accept squid proxy server
chain=dstnat action=accept src-address=192.168.50.3 in-interface=bridge dst-port=80 protocol=tcp