Community discussions

MikroTik App
 
eclipse
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 66
Joined: Thu Mar 30, 2006 8:29 pm

Web Proxy Not Working HELP!

Thu Oct 12, 2006 8:35 am

I am trying to set up web proxy on my main gateway router. here is what I have so far.
[admin@MikroTik] ip web-proxy> print
                 enabled: no
             src-address: 0.0.0.0
                    port: 3128
                hostname: "proxy"
       transparent-proxy: yes
            parent-proxy: 0.0.0.0:0
     cache-administrator: "webmaster"
         max-object-size: 4096KiB
             cache-drive: system
          max-cache-size: 1048576KiB
      max-ram-cache-size: unlimited
                  status: stopped
      reserved-for-cache: 1048576KiB
  reserved-for-ram-cache: 354304KiB
Then I set up a dst-nat rule in firewall to forward all requests coming in on my LAN port from port 80 to port 3128(proxy)

I fire it up and none of my clients can get to a webpage. The Clients counts up along with the requests, but the hits stays at 0 and so does the cache size. I turn it off and everything works again for my clients.

Any help would be appreciated.[/quote]
 
dirman
just joined
Posts: 8
Joined: Mon Jan 02, 2006 8:44 am

Re: Web Proxy Not Working HELP!

Thu Oct 12, 2006 9:07 am

I am trying to set up web proxy on my main gateway router. here is what I have so far.
[admin@MikroTik] ip web-proxy> print
                 enabled: no
             src-address: 0.0.0.0
                    port: 3128
                hostname: "proxy"
       transparent-proxy: yes
            parent-proxy: 0.0.0.0:0
     cache-administrator: "webmaster"
         max-object-size: 4096KiB
             cache-drive: system
          max-cache-size: 1048576KiB
      max-ram-cache-size: unlimited
                  status: stopped
      reserved-for-cache: 1048576KiB
  reserved-for-ram-cache: 354304KiB
Then I set up a dst-nat rule in firewall to forward all requests coming in on my LAN port from port 80 to port 3128(proxy)

I fire it up and none of my clients can get to a webpage. The Clients counts up along with the requests, but the hits stays at 0 and so does the cache size. I turn it off and everything works again for my clients.

Any help would be appreciated.
[/quote]

you must enable web-proxy

ip web-proxy set enabled=yes src-address=0.0.0.0 port=3128 hostname="" transparent-proxy=yes parent-proxy=0.0.0.0:0 \
cache-administrator="webmaster" max-object-size=4096KiB cache-drive=system max-cache-size=unlimited \
max-ram-cache-size=unlimited

ip firewall nat add chain=dstnat in-interface=ether1 dst-port=80 \
\... protocol=tcp action=redirect to-ports=3128
 
dirman
just joined
Posts: 8
Joined: Mon Jan 02, 2006 8:44 am

Re: Web Proxy Not Working HELP!

Thu Oct 12, 2006 9:08 am

I am trying to set up web proxy on my main gateway router. here is what I have so far.
[admin@MikroTik] ip web-proxy> print
                 enabled: no
             src-address: 0.0.0.0
                    port: 3128
                hostname: "proxy"
       transparent-proxy: yes
            parent-proxy: 0.0.0.0:0
     cache-administrator: "webmaster"
         max-object-size: 4096KiB
             cache-drive: system
          max-cache-size: 1048576KiB
      max-ram-cache-size: unlimited
                  status: stopped
      reserved-for-cache: 1048576KiB
  reserved-for-ram-cache: 354304KiB
Then I set up a dst-nat rule in firewall to forward all requests coming in on my LAN port from port 80 to port 3128(proxy)

I fire it up and none of my clients can get to a webpage. The Clients counts up along with the requests, but the hits stays at 0 and so does the cache size. I turn it off and everything works again for my clients.

Any help would be appreciated.
[/quote]

you must enable web-proxy

ip web-proxy set enabled=yes src-address=0.0.0.0 port=3128 hostname="" transparent-proxy=yes parent-proxy=0.0.0.0:0 \
cache-administrator="webmaster" max-object-size=4096KiB cache-drive=system max-cache-size=unlimited \
max-ram-cache-size=unlimited

ip firewall nat add chain=dstnat in-interface=ether1 dst-port=80 \
\... protocol=tcp action=redirect to-ports=3128

hope this help
 
eclipse
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 66
Joined: Thu Mar 30, 2006 8:29 pm

Thu Oct 12, 2006 9:20 am

Sorry it is enabled when I try and run it. and the dst-nat is set to ether 2 which is my LAN side. BTW i don't use any masqurade rules. And proxy arp is on on both interfaces.
 
User avatar
kolorasta
Member
Member
Posts: 310
Joined: Sun Jun 25, 2006 11:55 pm
Location: Argentina

Thu Oct 12, 2006 10:53 pm

see this:
 0   chain=srcnat out-interface=WAN action=masquerade 

 1   chain=srcnat dst-address=172.16.0.1 protocol=tcp dst-port=80 action=accept 

 2   chain=dstnat in-interface=LANbridge protocol=tcp dst-port=80 
     action=redirect to-ports=3128 

172.16.0.0/21 is my network
 
eclipse
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 66
Joined: Thu Mar 30, 2006 8:29 pm

Fri Oct 13, 2006 6:35 am

Tried to add those rules..... still just counts up requests and clients. It's like it doesn't go and get the webpages to give to them. Does it have something to do with proxy arp being on on ether1 and ether2? i think I have to have them on because my ether1 and ether2 are public addresses as well as everything inside my network. ???
 
eclipse
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 66
Joined: Thu Mar 30, 2006 8:29 pm

Mon Oct 16, 2006 2:46 am

Anyone???
 
eclipse
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 66
Joined: Thu Mar 30, 2006 8:29 pm

Tue Oct 17, 2006 1:57 am

Noone has any ideas on how to configure web proxy with public addresses on the inside and no masquerade?????
 
dannyboy
Member Candidate
Member Candidate
Posts: 195
Joined: Fri Sep 16, 2005 4:21 am
Location: Nicaragua/USA
Contact:

Tue Oct 17, 2006 8:52 am

on the nat rule just dont put anything on in-interface, that seems to work for me

db
 
eclipse
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 66
Joined: Thu Mar 30, 2006 8:29 pm

Tue Oct 17, 2006 9:32 am

Tried it with a dst-nat on tcp6 port 80 redirect to 3128. No in-interface set. still counts up the clients and requests. But it still does not have any "hits" or "recieved from server" or "hits sent to clients" they all stay at 0. The cache size also stays at zero. So i think it is seeing the requests to go to the web address, it it just not going and getting the page, caching it and delivering it.?????