Force ipv4 for certain domains

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
ViPeR_930
DD-WRT Novice


Joined: 24 Apr 2013
Posts: 3

PostPosted: Mon Nov 28, 2016 9:00    Post subject: Force ipv4 for certain domains Reply with quote
I recently enabled ipv6 on my router and noticed Youtube stops and buffers much more often. Is there any way I can force Youtube.com to use ipv4?

Netgear R7500V2 with DD-WRT v3.0-r30880M kongat (11/14/16)
Sponsor
James2k
DD-WRT Guru


Joined: 23 Oct 2011
Posts: 549

PostPosted: Mon Nov 28, 2016 21:29    Post subject: Reply with quote
There are a few ways, but mostly not very elegant as its generally against the main point IPv6 i.e. first protocol to be used (happy eyeballs) etc.

Probably the most elegant approach is you can prevent any DNS requests to YouTube domains from returning AAAA (IPv6) records, therefore making YouTube use IPv4 and your ISPs (normal?) gateway. In order to do this however you would need to setup an additional DNS resolver i.e. bind9 and use the option filter-aaaa-on-v4, you would then need to point any YouTube related domains that serve video to this DNS resolver rather than your normal DNS server(s). Its a similar technique used for Netflix, where by IPv6 tunnels are deemed as a proxy networks to bypass geo-restrictions and are now blocked outright, rather than disabling the tunnel, essentially you make Netflix think you only have IPv4 and hence IPv6 is not used. Same concept here, should work, needs to be implement at the router/DNS level though.

Other solutions are to change the IPv6 priority, but this is generally bad advice and against the purpose of IPv6 and doing it selectively isn't going to be possible, you'd be switching the protocol priority outright.

Alternatively you could null-route the IPv6 ranges of YouTube to force IPv4, but you may experience brief delays on requests and you'll probably have to go hunting for all the IPv6 ranges Google/YouTube is using (which might also change). In addition, Google/YouTube may other CDN or network services that arent't actually owned by them, so you may null-route innocent ranges for this purpose.

Ultimately, I'd query your buffering issue on YouTube with IPv6 with whoever is providing it, despite myself using a Hurricane Electric tunnel, YouTube performance is decent, considering the added latency. Actually in some cases depending on the setup, IPv6 may actually be faster than my IPv4 in some cases.

_________________
James

Main router:

Netgear R7000 overclocked to 1.2GHz - DD-WRT v3.0-r35965M kongac

IPv6 6in4 (HE.net), OpenVPN (with PBR and split tunnelling), Entware, dnsmasq with ipset

Easy ipset support for the R7000

VPN speed: Download: 77.96 Mbps Upload: 5.00 Mbps (AES-128-CBC HMAC-SHA1)

Yes you can get 50 Mbps+ with OpenVPN on a R7000 if you configure it properly!

Previous routers:

ASUS RT-N66U - The Dark Knight
WNR2000v3 - Bought on the cheap for someone else, neutered crap
WNR3500Lv1 - First venture into the DD-WRT world
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum