Community discussions

MikroTik App
 
dana1975
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 94
Joined: Sat Jul 04, 2009 8:32 pm

change gateway for some URL

Fri Aug 14, 2009 7:03 pm

dear friend
i have 4 internet line and i'm using load balancing for 3 of them
i need to change some configuration for separating some URL
for example i need change the way for http://google.com http://routerboard.com http://mikrotik.com
i want when some body need this url excactly work with ether5
here you can find my configuration
/ ip address 
add address=192.168.100.1/24 network=192.168.100.0 broadcast=192.168.100.255 interface=ether1 comment="" disabled=no 

/ ip dhcp-client 
add interface=ether2 add-default-route=yes use-peer-dns=yes use-peer-ntp=yes comment="" disabled=no 
add interface=ether3 add-default-route=yes use-peer-dns=yes use-peer-ntp=yes comment="" disabled=no 
add interface=ether4 add-default-route=yes use-peer-dns=yes use-peer-ntp=yes comment="" disabled=no

/ ip firewall nat 
add chain=srcnat src-address=192.168.100.0/24 action=masquerade comment="" disabled=no 

/ ip firewall mangle 
add chain=prerouting src-address=192.168.100.0/24 action=mark-routing new-routing-mark=SUBNET-LAN passthrough=yes comment="" disabled=no 

/ ip route 
add dst-address=0.0.0.0/0 gateway=X.X.224.1,X.X.128.1,X.X.160.1 check-gateway=arp scope=255 target-scope=10 routing-mark=SUBNET-LAN comment="" disabled=no 
scan0014.jpg
You do not have the required permissions to view the files attached to this post.
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6697
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: change gateway for some URL

Mon Aug 17, 2009 2:18 pm

Add mark-routing rules for the specific DST-address of MikroTik/RouterBOARD/google and use mark-routing in /ip route configuration.
 
dana1975
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 94
Joined: Sat Jul 04, 2009 8:32 pm

Re: change gateway for some URL

Mon Aug 17, 2009 2:38 pm

dear sergejs
could you please give me one example or command?
 
dana1975
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 94
Joined: Sat Jul 04, 2009 8:32 pm

Re: change gateway for some URL

Tue Aug 18, 2009 7:31 pm

up!
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: change gateway for some URL

Tue Aug 18, 2009 9:05 pm

[admin@testbox] > /ip firewall address-list add list=route-differently address=6.6.6.6/32
[admin@testbox] > /ip firewall address-list add list=route-differently address=7.7.7.7/32
[admin@testbox] > /ip firewall mangle add chain=prerouting action=mark-routing new-routing-mark=my_routing_mark dst-address-list=route-differently
[admin@testbox] > /ip route add gateway=1.1.1.1 routing-mark=my_routing_mark
HTH,
Felix
 
dana1975
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 94
Joined: Sat Jul 04, 2009 8:32 pm

Re: change gateway for some URL

Wed Aug 19, 2009 2:30 am

thank you so much dear felix
I'll check it tomorrow.
can i have your contact information?

Who is online

Users browsing this forum: cstrong and 49 guests