Community discussions

MikroTik App
 
User avatar
Techsystem
Member
Member
Topic Author
Posts: 337
Joined: Tue Dec 21, 2021 5:12 am

redirect a specific URL to a specific ISP using MT

Thu Feb 09, 2023 6:44 pm

Hello for all Mikrotik People there..!
hope you are all good..!
so what i want to achieve is this scenario:
i have RB951ui with two ISP
ISP-1 with IP address :192.168.10.1 /ether-1
ISP-2 with IP address: 192.168.20.1 /ether-2
LAN: 10.10.1.1/24
anyone from LAN that browse a specific URL, i want to make it goes out using ISP-2 and for other URLs i dont care if he using ISP-1 or 2
so how can i achieve that..?
 
pe1chl
Forum Guru
Forum Guru
Posts: 10195
Joined: Mon Jun 08, 2015 12:09 pm

Re: redirect a specific URL to a specific ISP using MT

Thu Feb 09, 2023 8:42 pm

That is technically not possible!
The only way around it used to be a proxy server, but with most websites using https these days that does not work anymore.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19107
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: redirect a specific URL to a specific ISP using MT

Thu Feb 09, 2023 9:21 pm

Make an SSID and vlan for this case.
When user wants to visit URL, use the specific WLAN/SSID.

if its an HTTPS site, not sure how you can block it.
 
User avatar
Techsystem
Member
Member
Topic Author
Posts: 337
Joined: Tue Dec 21, 2021 5:12 am

Re: redirect a specific URL to a specific ISP using MT

Fri Feb 10, 2023 9:51 am

Make an SSID and vlan for this case.
When user wants to visit URL, use the specific WLAN/SSID.

if its an HTTPS site, not sure how you can block it.
hello anav..!
so can we play around with DNS..? i mean can i resolve this URL to IP then make a rule say that any request to this IP go through ISP-2.
is that possible..?
 
pe1chl
Forum Guru
Forum Guru
Posts: 10195
Joined: Mon Jun 08, 2015 12:09 pm

Re: redirect a specific URL to a specific ISP using MT

Fri Feb 10, 2023 12:14 pm

No, because you cannot resolve a URL to an IP address.
A URL is prococol://hostname/path?parameters. So e.g. https://example.com/sales/order.html
You want to direct https://example.com/sales/order.html to one ISP and still direct https://example.com/index.html to another ISP, right?
(if NO, then your question was WRONG from the beginning!)
Only the "example.com" part of the above URLs is resolved to an IP address, not the other parts from the URL.

Furthermore, OTHER hostnames, e.g. example.org, may resolve to the SAME IP address, AND the same example.com hostname may resolve to different and varying IP addresses.
That makes in impractical even to block on hostname (which is not what you asked for!).
 
User avatar
Techsystem
Member
Member
Topic Author
Posts: 337
Joined: Tue Dec 21, 2021 5:12 am

Re: redirect a specific URL to a specific ISP using MT

Fri Feb 10, 2023 6:31 pm

No, because you cannot resolve a URL to an IP address.
A URL is prococol://hostname/path?parameters. So e.g. https://example.com/sales/order.html
You want to direct https://example.com/sales/order.html to one ISP and still direct https://example.com/index.html to another ISP, right?
(if NO, then your question was WRONG from the beginning!)
Only the "example.com" part of the above URLs is resolved to an IP address, not the other parts from the URL.

Furthermore, OTHER hostnames, e.g. example.org, may resolve to the SAME IP address, AND the same example.com hostname may resolve to different and varying IP addresses.
That makes in impractical even to block on hostname (which is not what you asked for!).
hello Mr.pe1chl..!
"You want to direct https://example.com/sales/order.html to one ISP and still direct https://example.com/index.html to another ISP, right?"
so yes that's what i want ..!
 
pe1chl
Forum Guru
Forum Guru
Posts: 10195
Joined: Mon Jun 08, 2015 12:09 pm

Re: redirect a specific URL to a specific ISP using MT

Fri Feb 10, 2023 7:06 pm

Ok, that is impossible to do...
 
User avatar
Techsystem
Member
Member
Topic Author
Posts: 337
Joined: Tue Dec 21, 2021 5:12 am

Re: redirect a specific URL to a specific ISP using MT

Sat Feb 11, 2023 11:43 am

Ok, that is impossible to do...
in my example i want to do this :
in google search when i put Netflix.com i want this website to go through ISP-2
and i dont care about any other website if it goes through ISP-1 or ISP-2
so is this possible..?
 
pe1chl
Forum Guru
Forum Guru
Posts: 10195
Joined: Mon Jun 08, 2015 12:09 pm

Re: redirect a specific URL to a specific ISP using MT

Sat Feb 11, 2023 12:41 pm

What you can do is direct all web traffic (TCP ports 80 and 443) to ISP-2.
Then it adheres to your spec: your specific URL is sent to ISP-2, and all other web traffic goes to ISP-2 as well.
You can still use ISP-1 for other traffic, like mail or VoIP.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19107
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: redirect a specific URL to a specific ISP using MT

Sat Feb 11, 2023 2:00 pm

Techsystem, unfortunately that is not possible.........
What is possible so you stop beating your head against the wall is to
a. select an SSID and push that wifi down a specific WANIP ( so use that wifi for google )
b. select a specific IP address, to go out a specific WANIP ( so use that device )
c. select a specific subnet, to go out a a specific WANIP ( so use that vlan ).

a. select applicable wifi network
b. change IPV4 settings on device
c. have a managed switch on desk and plug into port with correct subnet
 
User avatar
Techsystem
Member
Member
Topic Author
Posts: 337
Joined: Tue Dec 21, 2021 5:12 am

Re: redirect a specific URL to a specific ISP using MT

Sat Feb 11, 2023 6:10 pm

Techsystem, unfortunately that is not possible.........
What is possible so you stop beating your head against the wall is to
a. select an SSID and push that wifi down a specific WANIP ( so use that wifi for google )
b. select a specific IP address, to go out a specific WANIP ( so use that device )
c. select a specific subnet, to go out a a specific WANIP ( so use that vlan ).

a. select applicable wifi network
b. change IPV4 settings on device
c. have a managed switch on desk and plug into port with correct subnet
happy to hear your voice Mr.Anav..!
after alot of research and alot of LAP scenario i can say that i will accept your answer in 90%
the remaining 10% for my imagination that this can be achieve ..
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19107
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: redirect a specific URL to a specific ISP using MT

Sat Feb 11, 2023 7:38 pm

O I am sure its 80% LOL, as I missed 10% of the obvious.......

Who is online

Users browsing this forum: adimihaix and 19 guests