ipv6

Permission denied on ipv6 Socket in Java

梦想的初衷 提交于 2019-12-11 04:23:36
问题 I have a strange problem on ipv6 connection. I write down a simple client server in Java, it works perfectly in ipv4 but when I try to use it with an Ipv6 address I receive a "java.net.SocketException: Permission denied". If I try to run on the same machine client and server it works with ipv4 and ipv6 as well so i think that is a O.S. problem. Some informations: Ping6 works between machines Iptables is stopped O.s. is RedHat 6.2 Any ideas? Thanks Antonio 回答1: I found the problem. There are

Banning by IPv4 and IPv6

北城余情 提交于 2019-12-11 03:47:09
问题 If I want a ban a user by IP in my website, is it possible to do it by both IPv4 and IPv6 ? Some browsers apparently use IPv4 addresses by default and others, if they have the possibility, use IPv6 addresses. So, if I ban someone by their current IP, they would only have to user another navigator to bypass the ban. tl;dr: is it possible to translate IPv4 addresses to IPv6 or something like that to "unify" them? I'm using PHP as the server-side technology. 回答1: No, it isn't really possible.

Find IPv6 global scope address on Android device

你说的曾经没有我的故事 提交于 2019-12-11 03:33:10
问题 I am looking for a way to determine the global IPv6 address on my android device for testing purpose. Now, what I have obtained a list of interfaces from Android API as the following code: NetworkInterface netInt: NetworkInterface.getNetworkInterfaces() netInt actually contains a list of all the interfaces on the devices. for example, as you can see from the following list..(just a part of the list) [dummy0][2][/fe80::d878:d9ff:fe94:eeae%dummy0%2] [rmnet_data0][7][/fe80::e03:fac6:8232:95d6

IPv6 regexp python

十年热恋 提交于 2019-12-11 02:45:35
问题 Hello i need to match a IPv6 address using a python script like : but it seems not working even the pattern is correct ? data="Client IPv6: 2001:470:9b36:1::2" pattern="Client IPv6: (\A([0-9a-f]{1,4}:){1,1}(:[0-9a-f]{1,4}){1,6}\Z)|(\A([0-9a-f]{1,4}:){1,2}(:[0-9a-f]{1,4}){1,5}\Z)|(\A([0-9a-f]{1,4}:){1,3}(:[0-9a-f]{1,4}){1,4}\Z)|(\A([0-9a-f]{1,4}:){1,4}(:[0-9a-f]{1,4}){1,3}\Z)|(\A([0-9a-f]{1,4}:){1,5}(:[0-9a-f]{1,4}){1,2}\Z)|(\A([0-9a-f]{1,4}:){1,6}(:[0-9a-f]{1,4}){1,1}\Z)|(\A(([0-9a-f]{1,4}:)

how to do urlopen over ipv4 by default

不想你离开。 提交于 2019-12-10 22:46:26
问题 What is the way to do urlopen in python such that even if the underlying machine has ipv6 networking enabled, the request is sent via ipv4 instead of ipv6? 回答1: I had a look into the source code. Unfortunately, urllib.urlopen() seems to use httplib.HTTP() , which doesn't even allow setting a source address. urllib2.urlopen() uses httplib.HTTPConnection() which you could inherit from and create a class which by default sets a source address '0.0.0.0' instead of '' . Then you could somehow

bind () to an IPv6 address in windows 7 is Failing with Error code :: WSAEADDRNOTAVAIL (10049)

半腔热情 提交于 2019-12-10 20:21:21
问题 I am trying to set-up a private ipv6 network with two windows-7 machines for tesing my application. I have written a sample code to test the socket apis. I have created an IPv6 socket. When I try to bind with the link-local address (which I get from ipconfig command), the error code is 10049. Please inform, why the bind with Ipv6 address is failing in windows-7 machine ? 回答1: If you're using a link-local IPv6 address, you probably need to set the sin6_scope_id field in your sockaddr_in6

Why the connect failed for ipv6 at python?

烂漫一生 提交于 2019-12-10 19:34:51
问题 Why the connect failed for ipv6 ?? # python >>> import socket >>> s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) >>> sa = ('2000::1',2000,0,0) >>> s.connect(sa) >>> sa = ('fe80::21b:78ff:fe30:7c6', 2000, 0, 0) >>> s.connect(sa) Traceback (most recent call last): File "<stdin>", line 1, in ? File "<string>", line 1, in connect socket.error: (22, 'Invalid argument') 回答1: Link-local addresses (e.g. fe80::whatever) typically require a scope id to be specified in order to work. Try sa = (

alternative MySQL code for INET6_ATON

送分小仙女□ 提交于 2019-12-10 19:30:03
问题 Convert old INET_ATON value to new binary INET6_ATON value without INET6_ATON / INET6_NTOA We have existing data in a table, the field is of type UNSIGNED INT which holds IPv4 data which was created with INET_ATON() . But now we move to INET6_ATON() in the queries and want to migrate the data diectly without creating additional database fields for the conversion. So I changed the field type from UNSIGNED INT to VARBINARY(16) . New data is stored as binary value with INET6_ATON() . But how can

How to send modified IPv6 packet through RAW socket?

别说谁变了你拦得住时间么 提交于 2019-12-10 18:09:51
问题 I'm trying to send a custom IPv6 header through a RAW socket in C Linux. I already succeded in IPv4 using the IP_HDRINCL socket option, however, there's not an equivalent for IPv6. I found a workaround here suggesting to use socket(AF_INET6, SOCK_RAW, IPPROTO_RAW) to have the same effect as enabling the IP_HDRINCL socket option. The socket is created successfully and I'm not getting any error until I use the sendto function with my modified header. I setup the socket like this: static int

dual-stack ipv6/ipv4 on localhost

自古美人都是妖i 提交于 2019-12-10 17:38:50
问题 I have an ipv4 server that only accepts connections over localhost (using INADDR_LOOPBACK ). I'd like to convert this server to be dual-stack ipv6/ipv4. However, using in6addr_loopback only accepts connections to ::1 . I've found that I can accept ipv4 and ipv6 connections simultaneously using in6addr_any , but as this also allows connections from anywhere it's not useful for my particular case. Is it possible to bind to ipv6 localhost ( ::1 ) and ipv4 localhost ( 127.0.0.1 ) simultaneously?