Closed networking on Debian squeeze(kFreeBSD) in jail

Status
Not open for further replies.
Hello,

http://blog.vx.sk/archives/22-Updated-Tutorial-Debian-GNUkFreeBSD-in-a-FreeBSD-jail.html

I followed this tutorial on how to setup debian squeeze jail and it was all OK until I went to the installed jail and tried to download ssh. It occurred that network is not working from within jail.

Code:
root@debian:~# wget http://ftp.us.debian.org/debian/pool/main/o/openssh/openssh-client_5.5p1-6+squeeze5_kfreebsd-amd64.deb

--2015-08-04 07:50:05--  http://ftp.us.debian.org/debian/pool/main/o/openssh/openssh-client_5.5p1-6+squeeze5_kfreebsd-amd64.deb
Resolving ftp.us.debian.org... failed: Name or service not known.
wget: unable to resolve host address `ftp.us.debian.org'

root@debian:~# ifconfig

em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
    ether 18:3:73:be:1c:94
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active
em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC>
    ether 0:1b:21:69:8c:d1
    media: Ethernet autoselect
    status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM>
    inet 127.0.0.10 netmask 0xffffffff
pflog0: flags=0<> metric 0 mtu 33160
pfsync0: flags=0<> metric 0 mtu 1500
root@debian:~#

Code:
$ cat /etc/jail.conf

debian6 {
  path = /jail/debian6;
  allow.mount;
  mount.devfs;
  host.hostname = debian;
  mount.fstab="/jail/etc/fstab.debian6";
  ip4.addr = 127.0.0.10;
  interface = lo0;
  exec.start = "/etc/init.d/rc 3";
  exec.stop = "/etc/init.d/rc 0";
}

$ jls

  JID  IP Address  Hostname  Path
  12  127.0.0.10  debian  /jail/debian6

Without network I cannot download any new software to my Debian jail. If anyone know what I'm doing wrong, please guide me.

jail
Code:
root@debian:~# uname -a
GNU/kFreeBSD debian 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014  root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC x86_64 amd64 Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz GNU/kFreeBSD

host
Code:
$ uname -a
FreeBSD AMDC727 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014  root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
 
It appears that your jail.conf only creates a loopback address. Network access will require a normal address. The last part of step 9 in that tutorial mentions this.
 
Status
Not open for further replies.
Back
Top