I have 3 WAN interfaces on my Router.
Please, I need help to route to only one WAN interface video traffic (youtube, redtube etc…). I have troubles mangle it.
You have to make an address list which contains all IP addresses of youtube and other servers.
Then you can use this address list to mark routign and route it over one desired gateway.
I have troubles finding all IPs that youtube uses, thats why I cant route video traffic.
I have an list of IPs but I think it is not full range of ips that youtube uses.
ip firewall address-list print
Flags: X - disabled, D - dynamic
# LIST ADDRESS
0 Youtube 208.117.224.0/24
1 Youtube 208.117.225.0/24
2 Youtube 208.117.228.0/24
3 Youtube 208.117.229.0/24
4 Youtube 208.117.232.0/24
5 Youtube 208.117.233.0/24
6 Youtube 208.117.234.0/24
7 Youtube 208.117.238.0/24
8 Youtube 208.65.152.0/24
9 Youtube 208.65.153.0/24
10 Youtube 208.65.154.0/24
11 Youtube 64.15.112.0/24
12 Youtube 208.117.236.0/24
13 Youtube 74.125.96.0/19
14 Youtube 72.14.221.0/24
15 ;;; Redtube
Youtube 84.53.128.0/18
16 ;;; Youporn
Youtube 87.248.192.0/19
17 ;;; Redtube
Youtube 216.155.128.0/19
18 ;;; Redtube
Youtube 208.73.208.0/21
19 ;;; Redtube
Youtube 66.55.140.0/24
20 Youtube 74.125.208.0/24
basically router have no means on telling what traffic it is passing through, all it “sees” is bit/byte streams that differ at length and either it is tcp/ip or udp/ip.
There are layer7 filtering possible but that can use substantial amount of resources, to tell when transmission of FLV file starts.
your best solution still is to find out ip addresses and make address-list of items that have to be routed differently from other traffic.
You an use the script which checks dns entries and adds to address list similar to this example:
http://wiki.mikrotik.com/wiki/Scripting-examples#Block_access_to_specific_websites
Thank you guys. It was very helpfully.
Best regards
can i have the configuration right now i m using simple load balancing using pcc
here is my config i want to seperate youtube and facebook traffic
/ ip address
add address=10.10.1.1/24 network=10.10.1.0 broadcast=10.10.1.255 interface=Local
add address=221.120.234.132/29 network=221.120.234.128 broadcast=221.120.234.135 interface=fiber-Red-1
add address=192.168.124.2/24 network=192.168.124.0 broadcast=192.168.124.255 interface=ldn-yellow-2
add address=192.168.2.2/24 network=192.168.2.0 broadcast=192.168.2.255 interface=ptcl-green-3
add address=192.168.1.2/24 network=192.168.1.0 broadcast=192.168.1.255 interface=ptcl2-black-4
/ ip firewall mangle
add chain=input in-interface=fiber-Red-1 action=mark-connection new-connection-mark=red_conn
add chain=input in-interface=ldn-yellow-2 action=mark-connection new-connection-mark=yellow_conn
add chain=input in-interface=ptcl-green-3 action=mark-connection new-connection-mark=green_conn
add chain=input in-interface=ptcl2-black-4 action=mark-connection new-connection-mark=black_conn
add chain=output connection-mark=red_conn action=mark-routing new-routing-mark=to_red
add chain=output connection-mark=yellow_conn action=mark-routing new-routing-mark=to_yellow
add chain=output connection-mark=green_conn action=mark-routing new-routing-mark=to_green
add chain=output connection-mark=black_conn action=mark-routing new-routing-mark=to_black
add chain=prerouting dst-address=221.120.234.128/29 action=accept in-interface=Local
add chain=prerouting dst-address=192.168.124.0/24 action=accept in-interface=Local
add chain=prerouting dst-address=192.168.2.0/24 action=accept in-interface=Local
add chain=prerouting dst-address=192.168.1.0/24 action=accept in-interface=Local
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:4/0 action=mark-connection new-connection-mark=red_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:4/1 action=mark-connection new-connection-mark=yellow_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:4/2 action=mark-connection new-connection-mark=green_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:4/3 action=mark-connection new-connection-mark=black_conn passthrough=yes
add chain=prerouting connection-mark=red_conn in-interface=Local action=mark-routing new-routing-mark=to_red
add chain=prerouting connection-mark=yellow_conn in-interface=Local action=mark-routing new-routing-mark=to_yellow
add chain=prerouting connection-mark=green_conn in-interface=Local action=mark-routing new-routing-mark=to_green
add chain=prerouting connection-mark=black_conn in-interface=Local action=mark-routing new-routing-mark=to_black
/ ip route
add dst-address=0.0.0.0/0 gateway=221.120.234.129 routing-mark=to_red check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.124.1 routing-mark=to_yellow check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_green check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_black check-gateway=ping
add dst-address=0.0.0.0/0 gateway=221.120.234.129 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.124.1 distance=2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 distance=3 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=4 check-gateway=ping
/ ip firewall nat
add chain=srcnat out-interface=fiber-Red-1 action=masquerade
add chain=srcnat out-interface=ldn-yellow-2 action=masquerade
add chain=srcnat out-interface=ptcl-green-3 action=masquerade
add chain=srcnat out-interface=ptcl2-black-4 action=masquerade
no help ![]()