Community discussions

MikroTik App
 
marklodge
Member Candidate
Member Candidate
Topic Author
Posts: 250
Joined: Sun Jun 21, 2009 6:15 pm

i need an Updated list of youtube ip addresses

Tue Dec 27, 2011 2:29 am

i have 3 wan links to the internet with around 25 clients.
i want to route all web video like youtube dailymotion etc to one specific WAN link OR a cahching server.
I tried to mark web video like .flv and .mp4 extension using layer7 but that did not work.
so i think it is best if i mark all traffic going to dst-address list: all-youtube-addresses, and then routing it to the caching server or to the WAN link.

i found this list
/ip firewall address-list
add address=208.117.224.0/24 list=Youtube
add address=208.117.225.0/24 list=Youtube
add address=208.117.228.0/24 list=Youtube
add address=208.117.229.0/24 list=Youtube
add address=208.117.232.0/24 list=Youtube
add address=208.117.233.0/24 list=Youtube
add address=208.117.234.0/24 list=Youtube
add address=208.117.238.0/24 list=Youtube
add address=208.65.152.0/24 list=Youtube
add address=208.65.153.0/24 list=Youtube
add address=208.65.154.0/24 list=Youtube
add address=64.15.112.0/20 list=Youtube
add address=208.117.236.0/24 list=Youtube
add address=74.125.96.0/19 list=Youtube
add address=72.14.221.0/24 list=Youtube
add address=84.53.128.0/18 comment=Redtube list=Youtube
add address=87.248.192.0/19 comment=Youporn list=Youtube
add address=216.155.128.0/19 comment=Redtube list=Youtube
add address=208.73.208.0/21 comment=Redtube list=Youtube
add address=66.55.140.0/23 comment=Redtube list=Youtube
add address=74.125.208.0/24 list=Youtube
But i think there are new youtube ip addresses because the above did not catch any traffic when i watched a youtube video.
 
User avatar
mramos
Member Candidate
Member Candidate
Posts: 231
Joined: Sun Nov 23, 2008 1:05 am
Location: S. B do Campo - SP - Brazil

Re: i need an Updated list of youtube ip addresses

Tue Dec 27, 2011 10:16 am

I use this:
;;; Youtube
     chain=prerouting action=add-dst-to-address-list protocol=tcp 
     address-list=Youtube address-list-timeout=10m in-interface=!(YOUR PUBLIC IFACE) 
     dst-port=80 content=youtube.com
Addresses will be added to Youtube address list and will be there for 10 minutes.

Regards;
 
marklodge
Member Candidate
Member Candidate
Topic Author
Posts: 250
Joined: Sun Jun 21, 2009 6:15 pm

Re: i need an Updated list of youtube ip addresses

Tue Dec 27, 2011 2:59 pm

;;; Youtube
     chain=prerouting action=add-dst-to-address-list protocol=tcp 
     address-list=Youtube address-list-timeout=10m in-interface=!(YOUR PUBLIC IFACE) 
     dst-port=80 content=youtube.com
Thanks for that.
Does this work and and add all the ips that serve youtube videos to the address-list?
Because i see that it picks up from different ip addresses such as: v19.cache.googlevideo.com or v18.cache.googlevideo.com etc
 
rodolfo
Long time Member
Long time Member
Posts: 553
Joined: Sat Jul 05, 2008 11:50 am

Re: i need an Updated list of youtube ip addresses

Tue Dec 27, 2011 3:30 pm

add to the same list also googlevideo.com
 
marklodge
Member Candidate
Member Candidate
Topic Author
Posts: 250
Joined: Sun Jun 21, 2009 6:15 pm

Re: i need an Updated list of youtube ip addresses

Wed Dec 28, 2011 2:30 am

OK, well i tried what i wanted but did not get the results expected.
Problem is that some youtube videos dont work (error occured) and some dont load, and it takes longer than usual to load.

heres my config if anyone wants it
/ip firewall address-list
add address=208.117.224.0/24 disabled=no list=Youtube

/ip firewall mangle
add action=add-dst-to-address-list address-list=Youtube address-list-timeout=\
    10m chain=forward comment="Find youtube ip addresses and add it to list" \
    content=youtube.com disabled=no dst-port=80 in-interface=!ether2 protocol=\
    tcp
add action=add-dst-to-address-list address-list=Youtube address-list-timeout=\
    10m chain=forward comment=\
    "Find googlevideo ip addresses and add it to list" content=googlevideo.com \
    disabled=no dst-port=80 in-interface=!ether2 protocol=tcp
add action=mark-routing chain=prerouting comment=\
    "Mark Route for all Youtube traffic " disabled=no dst-address-list=Youtube \
    new-routing-mark="Youtube Traffic" passthrough=yes
add action=mark-packet chain=prerouting disabled=yes dst-address-list=Youtube \

/ip firewall nat
add action=masquerade chain=srcnat comment=\
    "NAT to allow Youtube traffic out of this WAN interface" disabled=no \
    dst-address-list=Youtube out-interface=WAN1
add action=masquerade chain=srcnat disabled=no out-interface=pppoe-out1 \
    src-address=192.168.9.0/24

/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=pppoe-out1 \
    routing-mark=Group3 scope=30 target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=WAN1 \
    routing-mark="Youtube Traffic" scope=30 target-scope=10
add comment="Route Youtube traffic to WAN1" disabled=no distance=1 dst-address=\
    0.0.0.0/0 gateway=WAN1 routing-mark="Youtube Traffic" scope=30 \
    target-scope=10




the following is my mss rules and i am doing load balncing so i had to exclude the youtube list in my prerouting rule

add action=mark-routing chain=prerouting comment="Group 3" disabled=no \
    dst-address-list=!Youtube new-routing-mark=Group3 passthrough=no \
    src-address=192.168.9.0/24
add action=change-mss chain=forward comment="In interface" disabled=no \
    in-interface=ether2 new-mss=1452 passthrough=yes protocol=tcp tcp-flags=syn \
    tcp-mss=1453-65535
add action=change-mss chain=forward comment="Out interface" disabled=no \
    new-mss=1440 out-interface=ether2 passthrough=yes protocol=tcp tcp-flags=\
    syn tcp-mss=1441-65535
if anyone finds a better way of doing it please let me know
Thank you
 
kaas
just joined
Posts: 19
Joined: Wed Mar 18, 2009 11:31 am

Re: i need an Updated list of youtube ip addresses

Mon Nov 07, 2016 10:41 am

I use a script to get the ip's

1st force users to use mikrotik dns
2nd use script to get ips from dns
just remove facebook

then i queue them, you can just route them

regards
Wolter

/ip firewall nat
add action=redirect chain=dstnat comment="DNS Dictator" dst-port=53 in-interface=!ether1-WAN protocol=udp

/system scheduler
add interval=2m name=facebookYoutube on-event=":foreach i in=[/ip dns cache all find where (name~\"youtube\" || name~\"facebook\" || name~\"fbcdn\" || nam\
e~\"video\" || name~\"youtu\" ) && (type=\"A\") ] do={\r\
\n :local tmpAddress [/ip dns cache get \$i address];\r\
\ndelay delay-time=10ms\r\
\n#prevent script from using all cpu time\r\
\n :if ( [/ip firewall address-list find where address=\$tmpAddress] = \"\") do={ \r\
\n :local cacheName [/ip dns cache get \$i name] ;\r\
\n :log info (\"added entry: \$cacheName \$tmpAddress\");\r\
\n /ip firewall address-list add address=\$tmpAddress list=queue timeout=23:59:59 comment=\$cacheName;\r\
\n\r\
\n}\r\
\n\r\
\n}" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive start-date=jan/01/2016 start-time=00:00:00
 
borair
just joined
Posts: 18
Joined: Wed Mar 23, 2016 8:12 pm

Re: i need an Updated list of youtube ip addresses

Tue Nov 08, 2016 5:51 pm

i use the command : nslookup in CMD , to obtain the IP of youtube and create a list In firewall
 
jarda
Forum Guru
Forum Guru
Posts: 7756
Joined: Mon Oct 22, 2012 4:46 pm

Re: i need an Updated list of youtube ip addresses

Wed Nov 09, 2016 9:52 am

Firewall address list accepts fqdn and builds ip address list dynamically. You can mangle and queue or route subsequently according to it.
 
alinikyar
just joined
Posts: 4
Joined: Wed Aug 07, 2019 9:29 pm

Re: i need an Updated list of youtube ip addresses

Wed Aug 07, 2019 11:13 pm

I need a IP youtube site how can i get these IP updates

Who is online

Users browsing this forum: holvoetn and 27 guests