# IPv6 only Jail -> ipv6 nameserver in /etc/resolv.conf?



## Thorny (Jun 5, 2014)

Hello,

i want to setup a ipv6 only jail. IPv6 address is already working:

```
# ifconfig 
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
        ether 14:da:e9:b3:99:a8
        inet6 2a01:4f8:150:50a0::7 prefixlen 64 
        nd6 options=8023<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL,DEFAULTIF>
        media: Ethernet 100baseTX <full-duplex>
        status: active
```

But i could not connect to any website or service. I've added into /etc/resolv.conf:

```
nameserver [2001:4860:4860::8888]
```
But this didn't help either.

Otherwise direct pinging of the ip didn't work:

```
ping6 2001:4860:4860::8888
PING6(56=40+8+8 bytes) 2a01:4f8:150:50a0::7 --> 2001:4860:4860::8888
```

Content of my /etc/rc.conf is:

```
ipv6_enable="YES"
ipv6_defaultrouter="fe80::1%re0"
```

Has anyone an idea how to figure out the problem?

Greetings,
Torsten


----------



## SirDice (Jun 5, 2014)

Thorny said:
			
		

> I've added into /etc/resolv.conf:
> 
> ```
> nameserver [2001:4860:4860::8888]
> ```


Remove the [].



> Otherwise direct pinging of the ip didn't work:


By default you're not allowed to ping anything from within a jail. You need to enable allow.raw_sockets for it to work.


----------



## Thorny (Jun 5, 2014)

I've tried this first without the brackets, but this doesn't work, too. In another forum i saw the advice to use the brackets.


----------



## SirDice (Jun 5, 2014)

Thorny said:
			
		

> I've tried this first without the brackets, but this doesn't work, too.


It should work:

```
dice@molly:~ % cat /etc/resolv.conf 
nameserver 2001:470:1f15:bcd::1
nameserver 192.168.10.1
domain dicelan.home
```


----------



## Thorny (Jun 5, 2014)

Okay. I tried a bit around and changed all config to the new configuration-syntax. This fixed a problem in the IPv6 Routing of the host. After that the IPv6 in the jail works very fine!


----------



## Thorny (Jun 6, 2014)

And the problem was back this morning. But it was still just a configuration problem. And it seems to be a problem with my hoster?

Right after booting the server, 
	
	



```
ping6 ipv6.google.com
```
 works. Some minutes later it doesn't work anymore. How can this be? I will send a report to my hoster, but has anyone an advice how to track the problem?

Thank you very much!


----------



## Thorny (Jun 6, 2014)

Mh - the problem seems to be my configuration. I will take a step back from the problem and think over it for a while.


----------



## Thorny (Jun 12, 2014)

After some waiting, I found the solution. I just used the wrong address for the jail. Instead of 2a01:4f8:150:50a*0*::7 I must use 2a01:4f8:150:50a*5*::7 and everything works fine. 

Sorry for the noise!


----------



## SirDice (Jun 12, 2014)

Ah, yes. That's one downside I noticed of IPv6. It's quite easy to overlook a single digit because there can be so many of them :e


----------



## Thorny (Jun 12, 2014)

Indeed. And mixing the gateway-address with the normal address becomes so easy nowadays 
But now i'm lucky - seeing everything works is a great feeling


----------

