0

Firefox is very slow, and I have tried many related posts about it, without success. One thing I noticed though is that I have IPv6 enabled:

id@id:~$ test -f /proc/net/if_inet6 && echo "Running kernel is IPv6 ready"
Running kernel is IPv6 ready

Maybe this is slowing down the browser. I have no problems with Chrome.

I want to know if disabling IPv6 is safe, and if it will not cause other applications to fail. Here is the output of sudo netstat -tulpn

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:6342          0.0.0.0:*               LISTEN      7841/megasync   
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      6301/smbd       
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      9356/nginx: master 
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      1634/dnsmasq    
tcp        0      0 0.0.0.0:17500           0.0.0.0:*               LISTEN      7832/dropbox    
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      6301/smbd       
tcp        0      0 127.0.0.1:17600         0.0.0.0:*               LISTEN      7832/dropbox    
tcp        0      0 127.0.0.1:17603         0.0.0.0:*               LISTEN      7832/dropbox    
tcp6       0      0 :::139                  :::*                    LISTEN      6301/smbd       
tcp6       0      0 :::80                   :::*                    LISTEN      9356/nginx: master 
tcp6       0      0 :::443                  :::*                    LISTEN      9356/nginx: master 
tcp6       0      0 :::17500                :::*                    LISTEN      7832/dropbox    
tcp6       0      0 :::445                  :::*                    LISTEN      6301/smbd       
udp        0      0 0.0.0.0:17500           0.0.0.0:*                           7832/dropbox    
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           1000/avahi-daemon: 
udp        0      0 0.0.0.0:44093           0.0.0.0:*                           1000/avahi-daemon: 
udp        0      0 0.0.0.0:56476           0.0.0.0:*                           1634/dnsmasq    
udp        0      0 127.0.1.1:53            0.0.0.0:*                           1634/dnsmasq    
udp        0      0 0.0.0.0:68              0.0.0.0:*                           1625/dhclient   
udp        0      0 192.168.1.255:137       0.0.0.0:*                           6379/nmbd       
udp        0      0 192.168.1.100:137       0.0.0.0:*                           6379/nmbd       
udp        0      0 0.0.0.0:137             0.0.0.0:*                           6379/nmbd       
udp        0      0 192.168.1.255:138       0.0.0.0:*                           6379/nmbd       
udp        0      0 192.168.1.100:138       0.0.0.0:*                           6379/nmbd       
udp        0      0 0.0.0.0:138             0.0.0.0:*                           6379/nmbd       
udp        0      0 0.0.0.0:631             0.0.0.0:*                           6968/cups-browsed
udp6       0      0 :::5353                 :::*                                1000/avahi-daemon: 
udp6       0      0 :::54618                :::*                                1000/avahi-daemon: 

(I can't see Firefox there!) (I also notice that I have nginx running. Do I need that?)

  • How are you supposed to see firefox, when you use option -l (listening) for netstat? (note the first line: Active Internet connections (only servers)) I also notice that I have nginx running - you have a lot of stuff running, presumably samba, a printing service, and a DNS server - do you need that? ~ as of IPv6 it might indeed be that DNS queries are done over IPv6 first (which time out) and IPv4 second. I suggest you let wireshark run while using firefox to see what's going on. – countermode Jul 7 '17 at 12:24
  • @countermode Thanks. I am quite a noob on this stuff. I don't think I need any of those stuff, except CUPS. What exactly I am supposed to learn from using wireshark? (found a tutorial here but it's not clear) – luchonacho Jul 7 '17 at 12:43
2

It is relatively safe to disable IPv6 in a Linux system if your operator does not provide it; however upon disabling IPv6 you may have tinker with a configuration of the odd daemon whose configuration expects it to be active (xinetd and postfix come to mind).

However you might not need to disable IPv6 in your system just for Firefox sake.

Firefox has an array of parameters you can tweak to change the normal behaviour: Open about:config in Firefox, in the Search field write IPv6, and when seeing network.dns.disableIPv6 click two times on the false value for it to become true.

Upon changing that variable, no more IPv6 operations in Firefox. Try this first, as it is quite easy to change, and change it back.

  • Done. Haven't notice a major change at the moment, but will keep an eye on it. Is this all what is related to IPv6 and Firefox? Is there nothing in the system itself which "routes" Firefox through IPv6, outside Firefox's control? For instance, the router? (although that would not only affect firefox but chrome and other stuff, I guess) – luchonacho Jul 7 '17 at 13:21
  • 1
    If it doesn't make a difference (and I would be surprised if it would, Firefox implements the Happy Eyeballs algorithm) then leave IPv6 turned on. When your ISP provides IPv6 then you can benefit from it. If you leave it turned off now you'll forget about it later :) – Sander Steffann Jul 7 '17 at 13:43
  • @luchonacho It is not supposed to. I think that if you had IPv6 DNS servers, you would have noticed by now...apart from that, if an app uses up IPv4, it normally uses IPv4. – Rui F Ribeiro Jul 7 '17 at 13:56
  • 1
    My Firefox was terribly slow, but when I turned off IPv6 (network.dns.disableIPv6 in about:config) it became much faster so there is significant difference. I don't know why. – Halacs Jun 11 '18 at 19:39
  • @Halacs Could have several explanations,but comments are not enough to discuss that. – Rui F Ribeiro Jun 11 '18 at 19:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.