Discussion:
How to force IPv4 or IPv6?
Winston Weinert
2013-04-27 23:17:29 UTC
Permalink
Is there a way to force IPv4 or IPv6?

Use case that I encountered the necessity for this functionality:
I noticed Wikipedia blocks edits from my VPS IPv6 address. I wanted to force IPv4 to see if I needed to ask for a IP Ban Exemption for my VPS IPv4 address.

Thanks in advance!
--
Winston Weinert
Thomas Dickey
2013-04-28 00:12:32 UTC
Permalink
Post by Winston Weinert
Is there a way to force IPv4 or IPv6?
no - you could force lynx to use ipv4 on the first lookup, but any
redirects would use dns, and then it would rely on _that_ address.

You could of course recompile lynx without the ipv6 support...
--
Thomas E. Dickey <***@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
Winston Weinert
2013-04-28 01:48:54 UTC
Permalink
Ah. I was hoping I didn't need to manipulate my operating system for this functionality.

It turns out using LD_PRELOAD works nicely. Just whipped this up. Works perfectly on my Debian system: http://sprunge.us/GVEG?c

Regards.
--
Winston Weinert
Post by Thomas Dickey
Post by Winston Weinert
Is there a way to force IPv4 or IPv6?
no - you could force lynx to use ipv4 on the first lookup, but any
redirects would use dns, and then it would rely on _that_ address.
You could of course recompile lynx without the ipv6 support...
--
http://invisible-island.net
ftp://invisible-island.net
cyril scetbon
2013-11-07 09:20:35 UTC
Permalink
Hi,

your link is dead. Can you tell us how you solve it with LD_PRELOAD ?
Thomas Dickey
2013-11-07 10:25:32 UTC
Permalink
Post by cyril scetbon
Hi,
your link is dead. Can you tell us how you solve it with LD_PRELOAD ?
which link?
--
Thomas E. Dickey <***@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
Cyril Scetbon
2013-11-07 10:35:05 UTC
Permalink
This one. I suppose it describes the way you use LD_PRELOAD to force Lynx to use ipv4, right ? that's what I'm looking for
Post by Winston Weinert
Works perfectly on my Debian system: http://sprunge.us/GVEG?c
--
Cyril SCETBON
Post by Winston Weinert
Post by cyril scetbon
Hi,
your link is dead. Can you tell us how you solve it with LD_PRELOAD ?
which link?
--
http://invisible-island.net
ftp://invisible-island.net
Winston Weinert
2013-11-08 07:48:36 UTC
Permalink
Hi Cyril,

Apologies for the broken link. Here is the updated link for the
LDPRELOAD-powered ipv4 and ipv6 only library:
- Github Gist: https://gist.github.com/winny-/7367518
- Raw (plain text):
https://gist.github.com/winny-/7367518/raw/f098ef540c7ebbb9e148055365cec4205c4484c9/force-inet4-or-inet6.c

Any further replies or inquiries? Please CC them to me as I'm not
subscribed to lynx-dev.

Thanks!!
--
Winston Weinert
***@ml1.net
Loading...