Networking in Jails

jamie

i use neovim btw
Hallo, ich habe mir gerade einen Jail erstellt und gestartet… anpingbar ist er nicht und auch das pkg-Tool kann ich im Jail selbst nicht herunterladen. Wie kriege ich es hin dass im Jail das Networking funktioniert??
 
Da brauchen wir schon ein paar mehr Informationen. Hilfreich wäre z.B. die jail.conf und Deine Netzwerkkonfiguration.
 
Ich vergesse immer, die /etc/resolv.conf vom host in den jail zu kopieren, das ist klingt zumindest ähnlich.
 
Entschuldigt meine Verzögerung, hier einige Infos die helfen könnten:
Host:
Code:
jamie@homeserver:/mypool/jail % 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 18:c0:4d:fa:12:fc
    inet 192.168.178.99 netmask 0xffffff00 broadcast 192.168.178.255
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
    inet 127.0.0.1 netmask 0xff000000
    groups: lo
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
jamie@homeserver:/mypool/jail %

Jail Config:
Code:
jamie@homeserver:~ % cat /etc/jail.conf
allow.nomount;
mount.devfs;

path = "/mypool/jail/$name";

exec.start = "/bin/sh /etc/rc";
exec.stop  = "/bin/sh /etc/rc.shutdown";
exec.clean;

nextcloud01 {
    host.hostname = "jamiesnc.ddns.net";
    ip4.addr = 192.168.178.100;
}
Jail IF Config
Code:
root@jamiesnc:/ # 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 18:c0:4d:fa:12:fc
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
    groups: lo
root@jamiesnc:/ #

Freue mich auf eure Antworten!
 
Ändere deine jail.conf mal auf:
Code:
nextcloud01 {
    host.hostname = "jamiesnc.ddns.net";
    interface = re0;
    ip4.addr = 192.168.178.100;
}
 
Da du eine feste IP vergeben und an kein Interface gebunden hast, benoetigst Du normalerweise noch ein routing in und aus der jail.

Ansonsten kannst Du es auch so machen:

Code:
# cat /etc/jail.conf
[...]
path = "/mypool/jail/$name";
mount.devfs;
exec.clean;
ip4=inherit;
ip6=inherit;
allow.raw_sockets;
allow.sysvipc=1;
exec.start="sh /etc/rc";
exec.stop="sh /etc/rc.shutdown";

nextcloud01 { host.hostname = "jamiesnc.ddns.net"; }
[...]
 
Danke für eure Vorschläge [und Lösungen ;) ] @Columbo0815 , dein Vorschlag mit dem spezifizieren des Interfaces hat für mich funktioniert. Danke auch an den Rest von euch! Auf wiederfragen ;)

PS.: Danke auch an dich, @midnight , nur sollte das Jail eine eigene IP Addresse haben, die wollte ich nicht vererben (zumindest nicht in diesem Fall :P ).
Liebe Grüße, Jamie
 
Zurück
Oben