Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Is there a way to disable ipv6 for specific app or website
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 392
Location: Paris

PostPosted: Sun Aug 09, 2020 10:00 am    Post subject: Is there a way to disable ipv6 for specific app or website Reply with quote

I have one app and it connects one website with ipv6 automatically but the ipv6 address is not working in my current environment. Currently I disable the ipv6 for system wide to make sure the app connect the website with ipv4 instead of ipv6. I am wondering if there a way to disable ipv6 for specific app or website. Thanks
Back to top
View user's profile Send private message
mmogilvi
n00b
n00b


Joined: 13 May 2011
Posts: 54

PostPosted: Mon Aug 10, 2020 5:29 am    Post subject: Reply with quote

You might be able to hack something in /etc/gai.conf (man gai.conf), although I'm not sure I would recommend modifying the defaults. Or maybe simpler to just override DNS and force an IPv4 address with /etc/hosts or something.

However, what kind of network setup would have IPv6 only broken for a single site? In most partially-working scenarios, I would expect only a few "local" IPv6 addresses to be working, while global sites would all be broken. Leaving it fully disabled might be best, until/unless IPv6 network setup is fixed properly.

As a side note, a well-written application (including any halfway modern browser) should be using the happy eyeballs algorithm to transparently also try IPv4 if IPv6 superficially seems to be available but fails to respond within a second or two, and explicitly disabling IPv6 should not be necessary. See RFC 8305 and RFC 6555.
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 392
Location: Paris

PostPosted: Mon Aug 10, 2020 12:08 pm    Post subject: Reply with quote

mmogilvi wrote:
Or maybe simpler to just override DNS and force an IPv4 address with /etc/hosts or something.
I believe this is the simpler way. but I don't know what is the code should be typed into /etc/hosts or DNS to force an IPv4 address.

This is music app in Windows and I believe the version for Linux it's only for testing. The problem is that the IPv6 address for this site is not reachable. I tested some other IPv6 sites. All work.
Back to top
View user's profile Send private message
Sebastien P.
n00b
n00b


Joined: 13 Jun 2008
Posts: 14
Location: Haubourdin

PostPosted: Mon Aug 10, 2020 8:08 pm    Post subject: Reply with quote

I have never tried to override an ipv6 but add “1.2.3.4 mywebsite.com” in /etc/hosts should work. (1.2.3.4 is the ipv4)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
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