1
votes

I have installed apache2 in my ubunntu 12.10 system with inet addr 172.16.17.235 and inet6 addr fe80::a05b:25ff:fef0:68a4/64 in LAN.

Now when i want to open default website (index.html) located in /var/www/ , i simply write
http://localhost or
http://127.0.0.1 or
http://172.16.17.235 in my web browser(firefox 17.0) and it opens that index.html page
but when i want to access this index.html with the help of ipv6 addressing as below :
http://[::1] or
http://[fe80::a05b:25ff:fef0:68a4]

following error is shown by browser :
Unable to connect Firefox
can't establish a connection to the server at [::1] or
Firefox can't establish a connection to the server at [fe80::a05b:25ff:fef0:68a4].

Can any one tell me what configuration am i missing in my system or what i am doing wrong.

BTW when i ping to my localhost as :
ping6 ::1 or ping6 -I eth0 fe80::a05b:25ff:fef0:68a4
ping reply is coming fine as :
64 bytes from ::1: icmp_seq=1 ttl=64 time=0.032 ms
or
64 bytes from fe80::a05b:25ff:fef0:68a4: icmp_seq=1 ttl=64 time=0.048 ms

1

1 Answers

1
votes

If you want to use an IPv6 address from the fe80:: range, you must specify over which network adapter it should go. (Technically, you must provide the Zone ID which correlates with the network adapter used).

On ping, you do that with -l eth0. In Firefox, you can do that with http://[fe80::a05b:25ff:fef0:68a4%x] where x is a positive number you must find out.


EDIT: If you absolutely don't find out what is going on, you could try this:

python -c 'import sys,socket; print socket.getaddrinfo(sys.argv[1], (sys.argv[2:]+[0])[0], 0, socket.SOCK_STREAM)' fe80::a05b:25ff:fef0:68a4%eth0

and have a look to the result. On my system, it looks like

[(10, 1, 6, '', ('fe80::a05b:25ff:fef0:68a4%eth0', 0, 0, 3))]

where the last number, the 3, is the real Zone ID.

If this gives you a result, your name resolution works fine, if not, it is broken.

The next step could be to try to create a HTTP connection:

python -c 'import sys,socket; c=socket.create_connection((sys.argv[1], 80)); c.send("GET / HTTP/1.0\n\n"); print c.recv(100000).split("\r\n\r\n",1)[0]' fe80::a05b:25ff:fef0:68a4%eth0

If that works, the problem is your browser, if not, you cannot reach the server due to whatever reason. (Does your web server daemon bind to IPv6?)