I am using FreeBSD 10, and am having some trouble getting networking inside of a jail going. I have been following this here:
http://www.scottro.net/freebsdjail.html
This is the output of
Here is /etc/rc.conf.
Here is /etc/jail.conf.
Inside of my jail, /etc/rc.conf:
Here is
http://www.scottro.net/freebsdjail.html
This is the output of
dhclient dc0 inside of the jail:
Code:
# dhclient dc0
Can't create socket
exiting.
Here is /etc/rc.conf.
Code:
hostname="sparkette"
ifconfig_dc0="DHCP"
sshd_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
jail_enable=YES
jail_list="jordan"
ifconfig_dc0_alias0="inet 192.168.2.20 netmask 255.255.255.0"
Here is /etc/jail.conf.
Code:
jordan {
path = /jails/jordan;
mount.devfs;
devfs_ruleset = 4;
host.hostname = jordanbsd;
ip4.addr = 192.168.2.20;
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
}
ifconfig from outside of the jail produces:
Code:
dc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80008<VLAN_MTU,LINKSTATE>
ether 00:04:5a:8a:d5:e6
inet 192.168.2.20 netmask 0xffffff00 broadcast 192.168.2.255
inet 192.168.2.19 netmask 0xffffff00 broadcast 192.168.2.255
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
msk0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=c011a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4,VLAN_HWTSO,LINKSTATE>
ether 00:00:00:00:00:00
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: Ethernet autoselect
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
Code:
hostname="jordanbsd"
sshd_enable="YES"
ifconfig_dc0="DHCP"
Here is
ifconfig
Code:
dc0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80008<VLAN_MTU,LINKSTATE>
ether 00:04:5a:8a:d5:e6
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
msk0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=c011a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4,VLAN_HWTSO,LINKSTATE>
ether 00:00:00:00:00:00
media: Ethernet autoselect
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
jls:
Code:
# jls
JID IP Address Hostname Path
14 192.168.2.20 jordanbsd /jails/jordan