# Internet connection in jails



## Charlie86 (Jan 13, 2018)

Hi,

I am new on forum and also in BSD world. I am using FreeNAS and have problems with internet connection in jail.

From jail I can ping server address.


```
PING 192.168.178.41 (192.168.178.41): 56 data bytes
64 bytes from 192.168.178.41: icmp_seq=0 ttl=64 time=0.126 ms
64 bytes from 192.168.178.41: icmp_seq=1 ttl=64 time=0.069 ms
64 bytes from 192.168.178.41: icmp_seq=2 ttl=64 time=0.053 ms
```
but can not ping gateway address.


```
root@unbound:/usr/ports/dns/unbound # ping 192.168.178.1
PING 192.168.178.1 (192.168.178.1): 56 data bytes
```
If I am not i jail, I can ping gateway

```
root@freenas:~ # ping 192.168.178.1
PING 192.168.178.1 (192.168.178.1): 56 data bytes
64 bytes from 192.168.178.1: icmp_seq=0 ttl=255 time=0.487 ms
64 bytes from 192.168.178.1: icmp_seq=1 ttl=255 time=1.213 ms
64 bytes from 192.168.178.1: icmp_seq=2 ttl=255 time=0.219 ms
64 bytes from 192.168.178.1: icmp_seq=3 ttl=255 time=0.653 ms
64 bytes from 192.168.178.1: icmp_seq=4 ttl=255 time=0.941 ms
```
https://ibb.co/d7qe96

this is my network settings in jail. What I am doing wrong?

Thank you


----------



## leebrown66 (Jan 13, 2018)

PC-BSD, FreeNAS, NAS4Free, and all other FreeBSD Derivatives


----------



## Charlie86 (Jan 13, 2018)

Hi,

thank you for your info. I also opened thread on FreeNAS forum, where I received lots of help from one member, but I am still in little trouble.

Link to thread https://forums.freenas.org/index.php?threads/ports-downloading-problem.60616/
So if someone if willing to help and have enough knowledge, I will be more than happy 
At the moment I am stuck, how to get unbound downloaded from ports.

```
fetch: http://ftpmirror.gnu.org/texinfo/texinfo.tex: size mismatch: expected 380556, actual 382193
```

This is the line that buggers me.


```
root@unbound:/usr/ports/dns/unbound # make clean install
===>  Cleaning for autoconf-2.69_1
===>  Cleaning for m4-1.4.18,1
===>  Cleaning for unbound-1.6.2
===>  License BSD3CLAUSE accepted by the user
===>   unbound-1.6.2 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by unbound-1.6.2 for building
===>  Extracting for unbound-1.6.2
=> SHA256 Checksum OK for unbound-1.6.2.tar.gz.
===>  Patching for unbound-1.6.2
===>   unbound-1.6.2 depends on executable: autoconf-2.69 - not found
===>   autoconf-2.69_1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by autoconf-2.69_1 for building
===>  Extracting for autoconf-2.69_1
=> SHA256 Checksum OK for autoconf-2.69.tar.xz.
===>  Patching for autoconf-2.69_1
===>  Applying FreeBSD patches for autoconf-2.69_1
===>   autoconf-2.69_1 depends on executable: gm4 - not found
===>  License GPLv3 accepted by the user
===>   m4-1.4.18,1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by m4-1.4.18,1 for building
===>  Extracting for m4-1.4.18,1
==> SHA256 Checksum OK for m4-1.4.18.tar.xz.
===>  Patching for m4-1.4.18,1
===>  Applying FreeBSD patches for m4-1.4.18,1
===>   m4-1.4.18,1 depends on executable: makeinfo - not found
===>  License GPLv3+ accepted by the user
===>   texinfo-6.3_1,1 depends on file: /usr/local/sbin/pkg - found
=> texinfo.tex doesn't seem to exist in /usr/ports/distfiles/texinfo/6.3.
=> Attempting to fetch http://ftpmirror.gnu.org/texinfo/texinfo.tex
fetch: http://ftpmirror.gnu.org/texinfo/texinfo.tex: size mismatch: expected 380556, actual 382193
=> Attempting to fetch http://ftp.gnu.org/gnu/texinfo/texinfo.tex
fetch: http://ftp.gnu.org/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 382193
=> Attempting to fetch ftp://ftp.gnu.org/gnu/texinfo/texinfo.tex
fetch: ftp://ftp.gnu.org/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 382193
=> Attempting to fetch http://www.gtlib.gatech.edu/pub/gnu/gnu/texinfo/texinfo.tex
fetch: http://www.gtlib.gatech.edu/pub/gnu/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 381336
=> Attempting to fetch http://mirrors.kernel.org/gnu/texinfo/texinfo.tex
fetch: http://mirrors.kernel.org/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 382193
=> Attempting to fetch ftp://ftp.kddlabs.co.jp/GNU/gnu/texinfo/texinfo.tex
fetch: ftp://ftp.kddlabs.co.jp/GNU/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 382193
=> Attempting to fetch ftp://ftp.dti.ad.jp/pub/GNU/texinfo/texinfo.tex
fetch: ftp://ftp.dti.ad.jp/pub/GNU/texinfo/texinfo.tex: Protocol error
=> Attempting to fetch ftp://ftp.mirrorservice.org/sites/ftp.gnu.org/gnu/texinfo/texinfo.tex
fetch: ftp://ftp.mirrorservice.org/sites/ftp.gnu.org/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 382193
=> Attempting to fetch ftp://ftp.informatik.hu-berlin.de/pub/gnu/gnu/texinfo/texinfo.tex
fetch: ftp://ftp.informatik.hu-berlin.de/pub/gnu/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 382193
=> Attempting to fetch ftp://ftp.informatik.rwth-aachen.de/pub/mirror/ftp.gnu.org/pub/gnu/texinfo/texinfo.tex
fetch: ftp://ftp.informatik.rwth-aachen.de/pub/mirror/ftp.gnu.org/pub/gnu/texinfo/texinfo.tex: size mismatch: expected 380556, actual 382193
=> Attempting to fetch http://ftp.funet.fi/pub/gnu/prep/texinfo/texinfo.tex
fetch: http://ftp.funet.fi/pub/gnu/prep/texinfo/texinfo.tex: size mismatch: expected 380556, actual 382193
=> Attempting to fetch http://distcache.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex
fetch: http://distcache.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex: size mismatch: expected 380556, actual 380853
=> Attempting to fetch http://distcache.us-east.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex
fetch: http://distcache.us-east.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex: size mismatch: expected 380556, actual 380853
=> Attempting to fetch http://distcache.eu.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex
fetch: http://distcache.eu.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex: size mismatch: expected 380556, actual 380853
=> Attempting to fetch http://distcache.us-west.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex
fetch: http://distcache.us-west.FreeBSD.org/local-distfiles/sunpoet/texinfo/6.3/texinfo.tex: size mismatch: expected 380556, actual 380853
=> Attempting to fetch http://distcache.FreeBSD.org/ports-distfiles/texinfo/6.3/texinfo.tex
fetch: http://distcache.FreeBSD.org/ports-distfiles/texinfo/6.3/texinfo.tex: size mismatch: expected 380556, actual 380853
=> Couldn't fetch it - please try to retrieve this
=> port manually into /usr/ports/distfiles/texinfo/6.3 and try again.
*** Error code 1

Stop.
make[6]: stopped in /usr/ports/print/texinfo
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/print/texinfo
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/devel/m4
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/devel/m4
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/devel/autoconf
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/dns/unbound
*** Error code 1

Stop.
make: stopped in /usr/ports/dns/unbound
root@unbound:/usr/ports/dns/unbound #
```


----------



## Chris_H (Jan 18, 2018)

Charlie86 ,
The tex* stuff is _gigormous_ ( are *really* big files ). As such; 1) are you sure you have enough space? 2) It's possible that the server your fetch(1)ing the file(s) from, doesn't have good files. You could confirm this by simply downloading them on another box, and confirming the checksum (sha256(1)). If they match. You can then simply put them in the ports/distfiles/ dir on the box you're attempting to build these on, and be good-to-go. 

HTH

--Chris


----------

