Community discussions

MikroTik App
 
cicserver
Member
Member
Topic Author
Posts: 303
Joined: Sun Jul 24, 2011 12:04 pm

Route to second WAN based on extensions

Mon Apr 11, 2016 9:04 am

Is there any way I can route few extension like exe or mp3 files to second WAN link ?
will this routing work?
 
User avatar
ShayanFiroozi
Member Candidate
Member Candidate
Posts: 281
Joined: Sat Jun 01, 2013 12:44 pm
Location: Bandar Abbas , Iran

Re: Route to second WAN based on extensions

Mon Apr 11, 2016 11:10 pm

Is there any way I can route few extension like exe or mp3 files to second WAN link ?
will this routing work?
Hi,
the only way is to catch extension with L7 firewalling , Mark connections , Mark routing and then route them via specific interface
 
Sob
Forum Guru
Forum Guru
Posts: 9188
Joined: Mon Apr 20, 2009 9:11 pm

Re: Route to second WAN based on extensions

Tue Apr 12, 2016 1:51 am

Except by the time you'll be able to see extension (and that would be only with unencrypted connection), the connection will be already established. So for usual different-ISP WANs it won't work. Perhaps something could be done using http proxy, but I'm not sure.
 
cicserver
Member
Member
Topic Author
Posts: 303
Joined: Sun Jul 24, 2011 12:04 pm

Re: Route to second WAN based on extensions

Tue Apr 12, 2016 6:35 am

I guess routing extension will not work.
Ok I found 'connection-byte' marking method. but how it will going to work in following?
I want to route files above then 100MB to second wan link , will this work? how it will work, it will route to second wan link after initial 100mb transfer or will it sense the file size and route it to second wan link?>
 
Sob
Forum Guru
Forum Guru
Posts: 9188
Joined: Mon Apr 20, 2009 9:11 pm

Re: Route to second WAN based on extensions

Tue Apr 12, 2016 7:50 am

Same problem. Once it goes one way...

The whole thing could half-work if you had provider independent addresses with two uplinks and it wouldn't matter which one is used. Then you could send outgoing traffic any way you'd want. But only outgoing, you still wouldn't be able to influence incoming traffic. But if you have two different ISPs with different addresses from each one, you can't do anything. Connections are established with specific addresses and you can't just use them with the other ISP.
 
User avatar
ShayanFiroozi
Member Candidate
Member Candidate
Posts: 281
Joined: Sat Jun 01, 2013 12:44 pm
Location: Bandar Abbas , Iran

Re: Route to second WAN based on extensions

Tue Apr 12, 2016 7:51 am

I guess routing extension will not work.
Ok I found 'connection-byte' marking method. but how it will going to work in following?
I want to route files above then 100MB to second wan link , will this work? how it will work, it will route to second wan link after initial 100mb transfer or will it sense the file size and route it to second wan link?>
http://wiki.mikrotik.com/wiki/Block_Dow ... load_Sizes

Although it's about blocking but may be useful for file extension and size detecting
 
User avatar
ShayanFiroozi
Member Candidate
Member Candidate
Posts: 281
Joined: Sat Jun 01, 2013 12:44 pm
Location: Bandar Abbas , Iran

Re: Route to second WAN based on extensions

Tue Apr 12, 2016 7:55 am

Same problem. Once it goes one way...

The whole thing could half-work if you had provider independent addresses with two uplinks and it wouldn't matter which one is used. Then you could send outgoing traffic any way you'd want. But only outgoing, you still wouldn't be able to influence incoming traffic. But if you have two different ISPs with different addresses from each one, you can't do anything. Connections are established with specific addresses and you can't just use them with the other ISP.
i'm agree too , many servers are sensitive about their session and they would expire the session(web page,file download and etc..) if they receive a session data from multiply IP's.
 
ngysim
just joined
Posts: 1
Joined: Tue Apr 12, 2016 7:56 am

Re: Route to second WAN based on extensions

Tue Apr 12, 2016 9:35 am

Is there any way I can route few extension like exe or mp3 files to second WAN link ?
will this routing work?
Hi, Just some of my idea you can try to nat by layer7 or content:
ip firewall nat add chain=srcnat content=".exe,.mp3" out-interface=Wan2 action=masquerade place-before=0
or:
ip firewall filter add chain=forward src-address=192.168.100.0/24 content=".exe,.mp3" action=add-src-to-address-list address-list="Route.exe.mp3" address-list-timeout=00:00:03
ip firewall nat add chain=srcnat src-address-list="Route.exe.mp3" out-interface=Wan2 action=masquerade place-before=0
 
cicserver
Member
Member
Topic Author
Posts: 303
Joined: Sun Jul 24, 2011 12:04 pm

Re: Route to second WAN based on extensions

Tue Apr 12, 2016 2:02 pm

Is there any way I can route few extension like exe or mp3 files to second WAN link ?
will this routing work?
Hi, Just some of my idea you can try to nat by layer7 or content:
ip firewall nat add chain=srcnat content=".exe,.mp3" out-interface=Wan2 action=masquerade place-before=0
or:
ip firewall filter add chain=forward src-address=192.168.100.0/24 content=".exe,.mp3" action=add-src-to-address-list address-list="Route.exe.mp3" address-list-timeout=00:00:03
ip firewall nat add chain=srcnat src-address-list="Route.exe.mp3" out-interface=Wan2 action=masquerade place-before=0
Didn't worked.

Who is online

Users browsing this forum: Google [Bot] and 10 guests