FAQ Database Discussion Community


Make docker use IPv4 for port binding

ubuntu,docker,port,ipv6
I have docker host and inside I have one container. The docker host is binding the port on IPv6 interface only, not on IPv4. This is the output tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:55082 0.0.0.0:* LISTEN - tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN - tcp6...

Store IP into mysql database

php,mysql,ip,ipv6,ipv4
I'm using a simple way to get the real ip. I found it here: How to get Real IP from Visitor? The IP will be stored into database, in some column width VARCHAR 15. I'm using Varchar with length 15 because I understand that the ip address can be 123.456.789.123,...

Is inet_pton() broken for some IPv6 addresses that “look like” IPv4 addresses?

php,ipv6
I'm using PHP version 5.2.17, and I see that the following works as expected: $x = inet_pton('::F'); $y = inet_ntop($x); print "::F -> $y\n"; Output: ::F -> ::f But the following does not: $a = inet_pton('::FEEF:1886'); $b = inet_ntop($a); print "::FEEF:1886 -> $b\n"; Output: ::FEEF:1886 -> ::254.239.24.134 I would have...

Scope ID in python ipaddress.IPv6Address instances

python,ipv6,link-local,scope-id
I'm currently writing a python wrapper for a C++-Library that does network communication via IPv6 link-local addresses. To initialize the library the network interface has to be selected. This is done via the link-local address of the desired interface. On the C++ side we use boost address_v6 objects. On the...

Exception IP6 has no attribute

python,filter,version,ipv6,dpkt
I'm programming in python and i have a problem, indeed when i throw my script it end some seconds after when he detect an IP6 packet. Apparently i have to filter packets and take only IP4 packet to avoid this problem and i would like to know how can i...

How to access a ipv6 address using windows command?

windows,shell,cmd,ipv6
I know how to access a ipv4 address using windows command. Open command line and type explorer.exe http://173.194.72.103 Here is the question, how to access a ipv6 address? I tried to do this like ipv4 ping -6 www.google.com result:Ping www.google.com [2607:f8b0:4006:808::1012] explorer.exe http://2607:f8b0:4006:808::1012 or explorer.exe https://2607:f8b0:4006:808::1012 Neither ok, they open...

ipv6 python sockets not working

python,sockets,ipv6
I have a simple client server program and the server side works but for some reason I can't get the the client to interact to the server. I am able to launch the server and use nc -u ::1 50007 and connect to it and it works as intended. Server...

IPv6 address representation in Python

python,ipv6
I was converting IPv6 addresses to the textual representation and noticed a behavior I could not explain: In[38]: socket.inet_ntop(socket.AF_INET6, '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x7f\x00\x00\x01') Out[38]: '::ffff:127.0.0.1' In[39]: socket.inet_ntop(socket.AF_INET6, '\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\x7f\x00\x00\x00') Out[39]: '::ff:ffff:7f00:0' I am surprised to see ::ffff:127.0.0.1, I'd expect it to be ::ffff:7f00:0. Is it standard or at least common? Which IPv6 addresses are...

How do I compare IP addresses in PHP as binary strings?

php,ipv6,ipv4,inet
I am currently working with IPv4 and IPv6 addresses in a PHP based project, and I need to be able to compare two IPs to determine which one is a higher number. For example, that 192.168.1.9 is greater than 192.168.1.1. In order to do this, I converted the IPs to...

Cannot SSH to IPv6 address

ssh,ipv6
I tried to SSH connect to a IPv6 address, but got below error: [[email protected] ~]# ssh -6 [email protected]:8a00:4000:202::102 ssh: connect to host 2a00:8a00:4000:202::102 port 22: Connection timed out From netstat, I can see: [[email protected] ~]# netstat -an | grep 22 tcp 0 1 2a00:8a00:a000:11a1:::41479 2a00:8a00:4000:202::102:22 SYN_SENT And my source IP...

Docker 1.5 on IPv6 only host

routing,docker,ipv6
I have problems with routing traffic from Docker (version 1.5.0) container on IPv6 only host. nc -w 10 2a00:1450:4010:c07::71 80 outputs nc: connect to 2a00:1450:4010:c07::71 port 80 (tcp) timed out: Operation now in progress. Following this documentation ifconfig eth0; ifconfig docker0; ip -6 route show shows: eth0 Link encap:Ethernet HWaddr...

python ipv6 to cidr gives wrong mask

python,ipv6,cidr
I am trying to convert and ipv6 address into cidr format but the netmask appears to be incorrect. It is supposed to be /64 but I get /128 code: import ipaddress ipv6 = '2001:19f0:5800:8561:5400:ff:fe07:cae5' iv6cidr = ipaddress.ip_interface(ipv6) print(iv6cidr) output: 2001:19f0:5800:8561:5400:ff:fe07:cae5/128 expected output: 2001:19f0:5800:8561:5400:ff:fe07:cae5/64 I am not an IPv6 wizard but...

python ipaddress()reverse_pointer equivalent for 3.4

python,dns,ip,ipv6
I am trying to get the reverse IPv6 arpa from a valid IPv6 address but the feature I would like to use is only available in Python3.5 and FreeBSD ports is still on Python3.4 In [1]: import ipaddress In [3]: ipaddress.ip_address("2001:db8::1").reverse_pointer AttributeError: 'IPv6Address' object has no attribute 'reverse_pointer' What is...

Go to convert ipv6 to ipv4

go,ipv6,ipv4
ip6 := net.ParseIP("2001:cdba:0000:0000:0000:0000:3257:9652") fmt.Println(ip6.To16()) fmt.Println(ip6.To4()) Is there any way that I can convert ipv6 to ipv4 in go? we can detect if it's ipv6 or 4 using To16 and To4 (To4 returns nil if it's ipv6) But I can't find any way to convert between two... Can anybody have an...

Protocols and standards that take advantage of the huge IPv6 address space [closed]

networking,protocols,standards,ipv6
Unsure if this is the correct place for this kind of question (Server Fault is for administrators) but I'm looking for examples of (networking) protocols and standards that leverage the huge IPv6 address space towards some specific benefits. Reason is I'm writing a paper about something that does this and...

EndPoint Communication Exception with correct DNS IPv6 address but incorrect IPv4 address

.net,wcf,dns,ipv6,ipv4
I am facing an intermittent issue where it throws below exception. There was no endpoint listening at http://myserver.com/something that could accept the message. System.Net.WebException: The remote name could not be resolved After much examination came to know that DNS Server configured in the client had correct ipv6 address but wrong...

Disable ip v6 in docker container

docker,ipv6
I have ipv6 enabled on docker host but there is one particular container where ipv6 is causing issues. Is there a way to launch a container without ipv6 support, either through command line argument or dockerfile directive?

MaxMind GeoIP2 no results for IPv6?

php,ipv6,geoip
I have downloaded https://github.com/maxmind/GeoIP2-php and the database http://dev.maxmind.com/geoip/geoip2/geolite2/ to catch the timezone for a page visitor. require_once('GeoIp2/vendor/autoload.php'); $reader = new Reader('GeoIp2/GeoLite2-City.mmdb'); $record = $reader->city($_SERVER['REMOTE_ADDR']); echo $record->location->timeZone; Its working fine with IPv4, but IPv6 is not working. The output is empty with no errors. Is here somthing missing?...

Finding active IPv6 interfaces under Mac OS (using Python)

python,linux,osx,ipv6
My objective is to write a Python script that provides the user with a series of link-local IPv6 addresses of specific devices. My technique is to send out a multicast ping and then use neighbor discovery to get a list of addresses which I can then filter down. The first...

My Websocket takes forever to connect

java,websocket,glassfish,ipv6,tyrus
UPDATE It seems that in org.glassfish.tyrus.core.BaseContainer in the constructor, these two lines run super slow: this.managedExecutorService = lookupManagedExecutorService(); this.managedScheduledExecutorService = lookupManagedScheduledExecutorService(); What is the deal with the mention of Android in the comments of both methods, am I using the wrong code for Java that is aimed at Desktops? I...