# [Solved] IPv6 for my sshd, cannot access by hostname

## lyallp

My ISP supports IPv6 and I have it enabled, or so I thought.

I can quite happily ping6 ipv6.google.com

I cannot ping my local machine by name, from my local machine or from other machines on my LAN.

Suggestions would be welcomed.

Additional info as follows...

Fails...

```
$ ping6 lyalls-pc

PING lyalls-pc(Lyalls-PC.fritz.box) from yyyy:yyyy:yyyy:yyyy:yyyy:yyyy:yyyy:yyyy enp2s0: 56 data bytes

From yyyy:yyyy:yyyy:yyyy:yyyy:yyyy:yyyy:yyyy icmp_seq=1 Destination unreachable: Address unreachable

From yyyy:yyyy:yyyy:yyyy:yyyy:yyyy:yyyy:yyyy icmp_seq=2 Destination unreachable: Address unreachable

From yyyy:yyyy:yyyy:yyyy:yyyy:yyyy:yyyy:yyyy icmp_seq=3 Destination unreachable: Address unreachable

From yyyy:yyyy:yyyy:yyyy:yyyy:yyyy:yyyy:yyyy icmp_seq=4 Destination unreachable: Address unreachable

^C

--- lyalls-pc ping statistics ---

5 packets transmitted, 0 received, +4 errors, 100% packet loss, time 4000ms

```

Succeeds...

```
lyall@lyalls-pc ~ 

$ ping6 localhost

PING localhost(localhost) 56 data bytes

64 bytes from localhost: icmp_seq=1 ttl=64 time=0.021 ms

64 bytes from localhost: icmp_seq=2 ttl=64 time=0.033 ms

^C

--- localhost ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 999ms

```

```
lyall@lyalls-pc ~ 

$ netstat -r

Kernel IP routing table

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface

default         fritz.box       0.0.0.0         UG        0 0          0 enp2s0

loopback        0.0.0.0         255.0.0.0       U         0 0          0 lo

loopback        localhost       255.0.0.0       UG        0 0          0 lo

192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 enp2s0

lyall@lyalls-pc ~ 

$ ip -6 route

yyyy:yyyy:yyyy:yyyy::/64 dev enp2s0  proto kernel  metric 2  mtu 1492 pref medium

fe80::/64 dev enp2s0  proto kernel  metric 256  pref medium

ff00::/8 dev enp2s0  metric 256  pref medium

default via fe80::be05:43ff:fee6:f170 dev enp2s0  metric 2  mtu 1492 pref medium

lyall@lyalls-pc ~ 

$ ifconfig

enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.13  netmask 255.255.255.0  broadcast 192.168.1.255

        inet6 xxxx::xxxx:xxxx:xxxx:xxxx:  prefixlen 64  scopeid 0x20<link>

        inet6 yyyy:yyyy:yyyy:yyyy:yyyy:yyyy:yyyy:yyyy:  prefixlen 64  scopeid 0x0<global>

        ether 00:23:54:4c:d4:29  txqueuelen 1000  (Ethernet)

        RX packets 359959  bytes 447026369 (426.3 MiB)

        RX errors 0  dropped 1  overruns 0  frame 0

        TX packets 144703  bytes 51867044 (49.4 MiB)

        TX errors 0  dropped 0 overruns 0  carrier 1  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 0  (Local Loopback)

        RX packets 43  bytes 3604 (3.5 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 43  bytes 3604 (3.5 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

```

----------

## Ant P.

Does your local DNS server have an AAAA record for the other machine? If not you'll have to use nss-mdns.

----------

## NeddySeagoon

lyallp,

Add IPv6 entries to /etc/hosts.  Unfortunately that's static.  If you want to use the automatic configuration offered by IPv6, you need a name server that keeps up with IPv6 addresses, which may not be static.

----------

## lyallp

I use my ADSL Modem (FritzBox 7390) as my DNS Server.

It is IPv6 enabled, as can be seen by the fact I can ping6 ipv6.google.com

Interestingly, from lyalls-pc, looking up using ipv6 returns an ipv4 address...

```

$ dig lyalls-pc

; <<>> DiG 9.10.3-P2 <<>> lyalls-pc

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45722

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:

;lyalls-pc.         IN   A

;; ANSWER SECTION:

lyalls-pc.      9   IN   A   192.168.1.13

;; Query time: 1 msec

;; SERVER: 192.168.1.254#53(192.168.1.254)

;; WHEN: Thu Apr 14 08:32:00 CST 2016

;; MSG SIZE  rcvd: 43

lyall@lyalls-pc ~/.fluxbox 

$ dig -6 lyalls-pc

; <<>> DiG 9.10.3-P2 <<>> -6 lyalls-pc

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3082

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:

;lyalls-pc.         IN   A

;; ANSWER SECTION:

lyalls-pc.      9   IN   A   192.168.1.13

;; Query time: 1 msec

;; SERVER: xxxx::xxxx:xxxx:xxxx:xxxx#53(xxxx::xxxx:xxxx:xxxx:xxxx)

;; WHEN: Thu Apr 14 08:32:34 CST 2016

;; MSG SIZE  rcvd: 43

```

----------

## lyallp

Reboot my FritzBox 7390 firmware FRITZ!OS 05.51

And no, I won't update the firmware, because version 6 onwards drops SMB file shares of attached USB drives.

 :Smile: 

----------

