1

So, I just setup a new server on a droplet and looking at eth0 with ifconfig I can see that the network card is setup for one IPv4 address and one IPv6 address (IPv4 changed for protection):

inet addr:192.168.111.111  Bcast:192.168.111.255  Mask:255.255.240.0
inet6 addr: fe80::601:29ff:fe72:9601/64 Scope:Link

I see that the IPv6 is local since it starts with fe80.

Then I setup Apache2 and attempt a load of the front page using the IPv4 address (because I did not setup the AAAA record for an IPv6, it has to be the IPv4 plus the IPv6 is local.) However, when I look at the listen, the Apache2 server looks like this:

tcp6       0      0 :::443                  :::*                    LISTEN     

The SSH listener does the same thing.

So what I'm wondering is... how can the system connect the incoming IPv4 to the listening IPv6? Before, as I recall, I had to change the Apache2 setup to force a listen on the IPv4 address instead.

I have another question, since the IPv6 is a local address, I would imagine I can DROP most everything in my ip6tables, correct? Leave the lo interface alone, but drop anything else, what would you say?

1 Answer 1

1

Some application can use v4-mapped-on-v6, supporting both protocols at once with minimum modification.

Did you check if the IPv4 was actually working?

http://linux.die.net/man/7/ipv6

IPv4 connections can be handled with the v6 API by using the v4-mapped-on-v6 address type; thus a program only needs to support this API type to support both protocols. This is handled transparently by the address handling functions in the C library.

1
  • Ah! That looks like the correct answer. It makes sense although I always thought that you'd have to write your program to support both IPv4 and IPv6. It's cool we don't have to support IPv4 anymore. Oct 1, 2014 at 8:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .