Community discussions

MikroTik App
 
thermant
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 93
Joined: Sat Apr 21, 2007 6:17 am

Configuring a proxy for ports other than 80

Tue Sep 09, 2008 1:31 pm

Hi all,

I need to configure my proxy to cache not only stuff accessed through web browsers, but also through the various auto-patches performed by other applications that doesn't go through port 80 (http), say auto-patch for the anti virus, online games, etc. I have 80+ clients, and I don't want my users to download the same thing everytime they want to patch the AV, or play games, or anything. Is this possible?

At the moment, this is what I have for my transparent proxy:
1 ;;; Proxy for Local LAN
chain=dstnat action=redirect to-ports=8080 in-interface=LOCAL dst-port=80 protocol=tcp

The way I see it, the "dst-port=80" part will only cache stuff that go through that port (http), right? (Sorry, mikrotik noob here). If I want to cache other stuff that are downloaded by other applications that doesn't go through port 80, what should I add/change?

I'm thinking of adding lines like this one here, one for each port:
chain=dstnat action=redirect to-ports=8080 in-interface=LOCAL dst-port=<new dst-port> protocol=tcp

So eventually I'll have a bunch of lines that will do the proxy-ing (is that a word? ^_^) to port 8080 on the router.
Will it work?

Thanks.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Configuring a proxy for ports other than 80

Tue Sep 09, 2008 3:13 pm

peoxyy built in routeros only works with HTTP traffic and can only proxy that. all examples about port 80 is because, by default, all web (http) requests from your clients to servers goes to that port.

but if you want to use http server on different port, then yes, for transparent proxy you change that dst-port=80 to port you wish to use.
 
thermant
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 93
Joined: Sat Apr 21, 2007 6:17 am

Re: Configuring a proxy for ports other than 80

Wed Sep 10, 2008 2:10 pm

Lesse if I'm getting this right.

Since AV & some game updates don't use HTTP (don't go through port 80) so there's NO WAY I can have a local copy if I only use RouterOS? At all? :shock:

Ouch, that's a big let-down... :cry:

What do I do then, if I want to store a local copy of the update files?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26912
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Configuring a proxy for ports other than 80

Wed Sep 10, 2008 2:11 pm

for transparent proxy yes. if you use it as a regular proxy, you can set the proxy address and port in the game settings
 
thermant
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 93
Joined: Sat Apr 21, 2007 6:17 am

Re: Configuring a proxy for ports other than 80

Wed Sep 10, 2008 2:45 pm

Regular proxy, eh? Ouch... :(
I'm gonna need some help here, you guys. Mikrotik noob alert. :)

Correct me if I'm wrong, but are these the steps that I need to do?

1. Remove the transparent proxy from the NAT rules.
2. Set the proxy address for EACH client using, say, IE's internet options:
Change proxy IP to 192.168.1.1 port 8080
Check "Use same proxy for all protocols" (if there are any)
3. Do I need to set it for firefox as well? GAAAahhhh!!!
4. Test & see if it's working.

Am I missing something?
 
thermant
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 93
Joined: Sat Apr 21, 2007 6:17 am

Re: Configuring a proxy for ports other than 80

Wed Sep 10, 2008 2:46 pm

Hmm... Tried those steps, tried downloading a 12+MB file from download.com.

Typed this:
/ip proxy cache-contents pr where file-size>12000

But the file didn't show up.

How odd.

What am I doing wrong?
 
uldis
MikroTik Support
MikroTik Support
Posts: 3446
Joined: Mon May 31, 2004 2:55 pm

Re: Configuring a proxy for ports other than 80

Wed Sep 10, 2008 2:52 pm

what is your 'ip proxy' configuration?
 
thermant
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 93
Joined: Sat Apr 21, 2007 6:17 am

Re: Configuring a proxy for ports other than 80

Wed Sep 10, 2008 3:54 pm

/ip proxy> pr
enabled: yes
src-address: 0.0.0.0
port: 8080
parent-proxy: 0.0.0.0
parent-proxy-port: 0
cache-drive: system
cache-administrator: "theSuperAdmin"
max-cache-size: 8000000KiB
cache-on-disk: yes
max-client-connections: 600
max-server-connections: 600
max-fresh-time: 3w
serialize-connections: no
always-from-cache: yes
cache-hit-dscp: 4

Who is online

Users browsing this forum: MilanCermak and 16 guests