Trouble loading Instagram's images

Hello. I bought a ZyXel NBG6617 and flashed OpenWrt snapshot (exact is "OpenWrt SNAPSHOT r9014-ef1efa7"). I setup LuCI on it without too much trouble. My issue is only Instagram doesn't work properly, and only on wifi. In particular it's the image hosts Instagram (will now refer to it as IG) uses. Using IG (tried windows laptop and both ios/android phones) half works, the site itself loads and the structure works but the content doesn't load (just blank/grey boxes). It works fine on ethernet though, my personal desktop is connected via ethernet which loads content fine. I also connected the windows laptop via ethernet and it loaded fine on there too. So it's only wifi causing issues. This is an instagram picture.
This loads fine on my desktop, but times out on wifi devices. Initial quick google searches led me down the route of QoS being the culprit for some people, I tried disabling all forms of Qos/SQM and it didn't change anything. Second thing was people reporting that it was an ipv6 problem and when they disabled ipv6 on their router it sorted it. I tried disabling ipv6, but I'm not entirely sure if I got everything. I unchecked everything about ipv6 in my WAN and LAN interfaces (LAN is an interface bridging eth, wlan0 (2.4ghz ssid) and wlan1 (5ghz ssid)) and I removed the interfaces referencing ipv6. Should also mention the problem happens on both wlan0 and wlan1. doing an nslookup of XX (Cannot post more than two links in a topic due to new user restrictions so substitute "XX" for "instagram.flhr4-1.fna.fbcdn.net") returns:
Server: 127.0.0.1
Address: 127.0.0.1#53

Name: XX
Address 1: 109.144.0.160
*** Can't find XX: No answer

This seems to coincide with some kind of ipv6 problem, though I could be very wrong as I'm relatively new to this whole thing. I'm pretty lost on what to do here, I've not tweaked any firewall settings, so those are still set to default. My ISP, BT, doesn't support ipv6 for the record.

Your resolver response is fine.
According to Google DNS that host has IPv4-address only.
So there's no evidence to blame IPv6.

OK, that's good to know it's not an ipv6 thing. I'm still pretty lost on what I can do to fix it. Does anyone have any ideas I could explore?

Wireshark or tcpdump might provide some insight

Enable logging on DNSMASQ, and see if it is rejecting any query (I had a similar issue, with a different company, because of a "filterwin2k" option).

Don't suppose anyone made any progress with this? I'm having the same problem with a Netgear D7800 with a firmware I compiled myself. WhatsApp and Instagram just don't load images/videos on my phone. My laptop won't load instragram images when on the wifi but works fine as soon as I connect with an ethernet cable.

I've tried disabling IPv6 on the router, disabling adblock, QoS isn't enabled, using an external DNS, compiling a new firmware.

I did find some other people with a the same problem on a Linksys EA6350 v3 @ Add support for Linksys EA6350 v3 , but they don't seem to have resolved it.

This may not be helpful, however I checked wikidev and the Linksys EA6350 v3 and ZyXel NBG6617 use the same Quallcomm chipsets for wifi, switch and ethernet. My D7800 is using different hardware, but is all Quallcomm like the other two devices. The Switch on the D7800 is a QCA8337, whilst the other two are using QCA8075, which I assume means they are the same generation, but that's the only similarity.

Edit: Just to add to this, I've got a VPN running on the router which I use via vpn-policy-routing for some devices. I just tried routing my phone over the VPN connection and instagram worked fine.

2 Likes

Unfortunately I wasn't able to find a solution to this problem. My temp solution is currently using my ISP router on stock firmware as a dumb wifi access point connected via ethernet to my OpenWRT router. Connecting the wifi devices to this makes it all work fine, but alas, a messy band-aid solution.

1 Like

https://openwrt.org/docs/guide-user/base-system/dhcp_configuration#upstream_dns_provider

opkg update
opkg install mtr
mtr -wbc10 instagram.flhr4-1.fna.fbcdn.net
1 Like

Forgot to reply to this! With my setup I am using DNSSEC with DNS over TLS to 1.1.1.1. For reference, I have a managed connection, which means I just plug an ethernet connection into a RJ45 connection in the wall and my router picks up a connection as a DHCP client. If I access instagram over a VPN on my router then it works fine over wifi.

When I access instagram the images come through instagram.fdsa1-1.fna.fbcdn.net, rather than
instagram.flhr4-1.fna.fbcdn.net . If I change the image URL to use the domain you specified then the image works straight away over wifi.

If I look up the IP for the URL I have, it gives me 81.23.60.97, which when I reverse gives me a domain owned by my ISP (ip-81-23-60-97.ask4internet.com). I'm guessing that instagram is using some sort of local ISP caching for images and there is an issue somewhere with this?

For your reference, I have given a bunch of MTR results below (from the router, my laptop on ethernet and wifi, along with both the working and not working domains).

From the router:

mtr instagram.flhr4-1.fna.fbcdn.net

OpenWrt (10.93.200.53)                                                                             2019-04-17T11:01:56+0100
Keys:  Help   Display mode   Restart statistics   Order of fields   quit
                                                                                   Packets               Pings
 Host                                                                            Loss%   Snt   Last   Avg  Best  Wrst StDev
 1. 10.93.192.1                                                                  13.0%    24    0.8   0.8   0.7   1.0   0.1
 2. gw-vlan1649.edge2.westone.ask4.net                                            0.0%    24    1.9   3.6   1.6  27.6   5.5
 3. core2-dc1-edge2-westone.ask4.net                                              0.0%    24    1.8   1.8   1.5   2.4   0.2
 4. ip-81-23-51-198.ask4internet.com                                              0.0%    24    1.1   1.1   0.9   1.4   0.1
 5. br2-hex-nh.ask4.net                                                           0.0%    24    4.5   4.4   4.3   4.5   0.1
 6. xe-0-0-0-2-9.r04.londen05.uk.bb.gin.ntt.net                                   0.0%    24    9.7   9.8   9.5  10.0   0.2
 7. ae-0.r24.londen12.uk.bb.gin.ntt.net                                           0.0%    23    9.9  10.1   9.7  13.5   0.8
 8. ae-1.r04.londen12.uk.bb.gin.ntt.net                                           0.0%    23    9.9   9.9   9.6  10.3   0.1
 9. 195.66.224.108                                                                0.0%    23   10.0  10.2   9.9  13.3   0.7
10. 213.137.183.101                                                               0.0%    23   10.4  10.5  10.2  10.9   0.2
11. core2-hu0-16-0-4.colindale.ukcore.bt.net                                      0.0%    23   11.0  11.0  10.6  11.5   0.2
12. ???
13. 109.159.156.65                                                                0.0%    23   11.2  11.4  11.1  14.8   0.8
14. 109.144.0.160                                                                 0.0%    23   10.5  10.5  10.3  10.7   0.1
mtr instagram.fdsa1-1.fna.fbcdn.net

OpenWrt (10.93.200.53)                                                                             2019-04-17T11:04:21+0100
Keys:  Help   Display mode   Restart statistics   Order of fields   quit
                                                                                   Packets               Pings
 Host                                                                            Loss%   Snt   Last   Avg  Best  Wrst StDev
 1. 10.93.192.1                                                                  13.8%    30    0.8   0.9   0.7   1.9   0.2
 2. gw-vlan1649.edge2.westone.ask4.net                                            0.0%    30    1.6   7.5   1.5  89.9  16.6
 3. core2-dc1-edge2-westone.ask4.net                                              0.0%    30    1.8   1.8   1.5   2.5   0.2
 4. tor-6-core2-dc1.dc1.ask4.net                                                  0.0%    30    1.8   1.9   1.7   2.9   0.2
 5. cache-gw.fna.dc1.ask4.net                                                     0.0%    29    1.5   1.6   1.3   3.4   0.4
 6. ip-81-23-60-97.ask4internet.com                                               0.0%    29    0.9   1.0   0.8   1.5   0.1

The results from the computer (done using WinMTR, I'm on Windows 10)
From the computer when on Ethernet:

instagram.flhr4-1.fna.fbcdn.net
|------------------------------------------------------------------------------------------|
|                                      WinMTR statistics                                   |
|                       Host              -   %  | Sent | Recv | Best | Avrg | Wrst | Last |
|------------------------------------------------|------|------|------|------|------|------|
|                             OpenWrt.lan -    0 |   30 |   30 |    0 |    0 |    1 |    1 |
|                             10.93.192.1 -   31 |   13 |    9 |    0 |    1 |    1 |    1 |
|      gw-vlan1649.edge2.westone.ask4.net -    0 |   30 |   30 |    2 |    3 |   12 |    9 |
|        core2-dc1-edge2-westone.ask4.net -    0 |   30 |   30 |    2 |    2 |   12 |    2 |
|        ip-81-23-51-198.ask4internet.com -    0 |   30 |   30 |    1 |    2 |   11 |    2 |
|                     br2-hex-nh.ask4.net -    0 |   30 |   30 |    4 |    5 |   12 |    5 |
|xe-0-0-0-2-9.r04.londen05.uk.bb.gin.ntt.net -    0 |   30 |   30 |   10 |   10 |   12 |   10 |
|     ae-0.r24.londen12.uk.bb.gin.ntt.net -    0 |   30 |   30 |   10 |   11 |   25 |   10 |
|     ae-1.r04.londen12.uk.bb.gin.ntt.net -    0 |   30 |   30 |   10 |   10 |   12 |   10 |
|                          195.66.224.108 -    0 |   30 |   30 |   10 |   11 |   37 |   10 |
|                         213.137.183.101 -    0 |   30 |   30 |   10 |   10 |   11 |   11 |
|core2-hu0-16-0-4.colindale.ukcore.bt.net -    0 |   30 |   30 |   11 |   11 |   11 |   11 |
|                   No response from host -  100 |    6 |    0 |    0 |    0 |    0 |    0 |
|                          109.159.156.65 -    0 |   30 |   30 |   11 |   11 |   12 |   11 |
|                           109.144.0.160 -    0 |   30 |   30 |   10 |   10 |   11 |   11 |
|________________________________________________|______|______|______|______|______|______|
   WinMTR v0.92 GPL V2 by Appnor MSP - Fully Managed Hosting & Cloud Provider
instagram.fdsa1-1.fna.fbcdn.net
|------------------------------------------------------------------------------------------|
|                                      WinMTR statistics                                   |
|                       Host              -   %  | Sent | Recv | Best | Avrg | Wrst | Last |
|------------------------------------------------|------|------|------|------|------|------|
|                             OpenWrt.lan -    0 |   23 |   23 |    0 |    0 |    1 |    1 |
|                             10.93.192.1 -    0 |   23 |   23 |    1 |    1 |    2 |    1 |
|      gw-vlan1649.edge2.westone.ask4.net -    0 |   23 |   23 |    2 |    3 |   15 |    2 |
|        core2-dc1-edge2-westone.ask4.net -    0 |   23 |   23 |    2 |    2 |    3 |    2 |
|            tor-6-core2-dc1.dc1.ask4.net -    0 |   23 |   23 |    2 |    2 |    3 |    2 |
|               cache-gw.fna.dc1.ask4.net -    0 |   23 |   23 |    1 |    2 |    7 |    2 |
|         ip-81-23-60-97.ask4internet.com -    0 |   23 |   23 |    1 |    1 |    2 |    1 |
|________________________________________________|______|______|______|______|______|______|
   WinMTR v0.92 GPL V2 by Appnor MSP - Fully Managed Hosting & Cloud Provider

Computer on Wifi:

instagram.flhr4-1.fna.fbcdn.net

|------------------------------------------------------------------------------------------|
|                                      WinMTR statistics                                   |
|                       Host              -   %  | Sent | Recv | Best | Avrg | Wrst | Last |
|------------------------------------------------|------|------|------|------|------|------|
|                             OpenWrt.lan -    0 |   31 |   31 |    1 |    1 |    7 |    1 |
|                             10.93.192.1 -   10 |   21 |   19 |    1 |    1 |    5 |    2 |
|      gw-vlan1649.edge2.westone.ask4.net -    0 |   31 |   31 |    2 |    6 |   22 |    2 |
|        core2-dc1-edge2-westone.ask4.net -    0 |   31 |   31 |    3 |    3 |   11 |    4 |
|        ip-81-23-51-198.ask4internet.com -    0 |   31 |   31 |    2 |    2 |    7 |    2 |
|                     br2-hex-nh.ask4.net -    0 |   31 |   31 |    5 |    6 |    9 |    6 |
|xe-0-0-0-2-9.r04.londen05.uk.bb.gin.ntt.net -    0 |   31 |   31 |   11 |   12 |   19 |   11 |
|     ae-0.r24.londen12.uk.bb.gin.ntt.net -    0 |   31 |   31 |   10 |   12 |   19 |   12 |
|     ae-1.r04.londen12.uk.bb.gin.ntt.net -    0 |   31 |   31 |   11 |   12 |   19 |   11 |
|                          195.66.224.108 -    0 |   31 |   31 |   11 |   12 |   19 |   11 |
|                         213.137.183.101 -    0 |   31 |   31 |   11 |   12 |   19 |   12 |
|core2-hu0-16-0-4.colindale.ukcore.bt.net -    0 |   31 |   31 |   11 |   13 |   19 |   13 |
|                   No response from host -  100 |    6 |    0 |    0 |    0 |    0 |    0 |
|                          109.159.156.65 -    0 |   31 |   31 |   12 |   13 |   19 |   13 |
|                           109.144.0.160 -    0 |   31 |   31 |   11 |   12 |   19 |   11 |
|________________________________________________|______|______|______|______|______|______|
   WinMTR v0.92 GPL V2 by Appnor MSP - Fully Managed Hosting & Cloud Provider
instagram.fdsa1-1.fna.fbcdn.net
|------------------------------------------------------------------------------------------|
|                                      WinMTR statistics                                   |
|                       Host              -   %  | Sent | Recv | Best | Avrg | Wrst | Last |
|------------------------------------------------|------|------|------|------|------|------|
|                             OpenWrt.lan -    0 |   32 |   32 |    1 |    1 |    6 |    2 |
|                             10.93.192.1 -    8 |   25 |   23 |    1 |    1 |    5 |    1 |
|      gw-vlan1649.edge2.westone.ask4.net -    0 |   32 |   32 |    2 |    6 |   24 |    5 |
|        core2-dc1-edge2-westone.ask4.net -    0 |   32 |   32 |    2 |    4 |   17 |    3 |
|            tor-6-core2-dc1.dc1.ask4.net -    0 |   32 |   32 |    2 |    4 |   17 |    3 |
|               cache-gw.fna.dc1.ask4.net -    0 |   32 |   32 |    2 |    3 |   17 |    3 |
|         ip-81-23-60-97.ask4internet.com -    0 |   32 |   32 |    2 |    2 |   11 |    2 |
|________________________________________________|______|______|______|______|______|______|
   WinMTR v0.92 GPL V2 by Appnor MSP - Fully Managed Hosting & Cloud Provider
1 Like

Just a bit of an update on this. I've just got a GL-iNet GL-AR3000M16, which is running the latest official build (3.019), based on OpenWrt 18.06.1 r7258-5eb055306f. All the chips in it are Qualcomm based. I have just configured it identically to my existing router, swapped it over and this does not have the issue with instagram.

I suspect that the issue is due to one of the packages compiled into my D7800's firmware. The firmware I am using is based on a build for an R7800. I think I'm going to try doing a fresh build from scratch to see if this has the same issue, if not it's going to come down to a case of elimination. Fun.

2 Likes

Had this been information been revealed, I would have advised you to flash official OpenWrt - 5 months ago. It was vital to know that this wasn't official firmware.

I hope flashing another firmware works for you.

I'm not the op and in my first message on this post (2 months ago) I said that I compiled the firmware myself. Op mentions in their first post that they are using snapshots builds from openwrt and having the problem.

1 Like

Apologies for the mistake!

And odd for the OP's problem...

1 Like

This seems noteworthy....

wifi ( 25 / 23 + 8% )

OpenWrt.lan -    0 |   32 |   32 |    1 |    1 |    6 |    2 |
10.93.192.1 -    8 |   25 |   23 |    1 |    1 |    5 |    1 |

( 25 - 23 ) = 2 "possible special packets"

assuming i'm reading mtr right.... never seen it before.....

ok..........

https://instagram-engineering.com/improving-performance-with-background-data-prefetching-b191acb39898

One of our solutions was to add the user’s connection type into our logging events. This allowed us to observe the different usage patterns divided by connection type, which helped us adapt.

Next stop > http / header / js whatever override.... track down the app "wifi" val in developer tools and hard set it...... wont tell you the router issue... but it might get you closer....

So something along the lines of "Instagrams prefetching framework fails to detect wifi properly on xyz router which results in abc ( router thinks the traffic is dupe / spoofed etc and discards? )"

Right click the failing image and see if there is a size in the url;

https://..../e35/s320x320/ .......

Do the same for a working image.

I think maybe this is why they fail.... as to what part of their app interacts with "wifi" no idea..... something about caching and request numbers.....

1 Like

Slight update to this. I installed the stable release of openwrt-18.06.4 onto my D7800 and the problem was resolved. I installed all of the other packages I use using opkg and everything was still stable. I can only assume that there is a problem with something I was compiling into my own build, however I've not had time to look into it fully.

4 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.