I've been messing around with jails and I'm able to setup a jail and have access to the net from inside of it using the "inherit" for ip4. Now I want to assign a different IP address for each jail I create but I loose access to the internet and I'm not able to install any packages in them.
I'm not using any jail managers like qjail or ezjail. I'm running FreeBSD 12.2 using UFS. My jail.conf looks like this:
I have these lines in the host rc.conf:
Copied host's /etc/resolv.conf and /etc/localtime to each /etc directory of the jails.
When I try to install a package using
My host ifconfig looks like this:
My jail's ifconfig looks like this:
What am I missing here?
I'm not using any jail managers like qjail or ezjail. I'm running FreeBSD 12.2 using UFS. My jail.conf looks like this:
Code:
exec.start="/bin/sh /etc/rc";
exec.stop="/bin/sh /etc/rc.shutdown";
exec.clean;
mount.devfs;
mariadb {
host.hostname="mariadb.mybsd.io";
ip4.addr="192.168.1.81";
path="/usr/jail/mariadb";
}
httpd {
host.hostname="httpd.mybsd.io";
ip4.addr="192.168.1.82";
path="/usr/jail/httpd";
}
I have these lines in the host rc.conf:
Code:
jail_enable="YES"
jail_list="mariadb httpd"
jail_reverse_stop="YES"
Copied host's /etc/resolv.conf and /etc/localtime to each /etc directory of the jails.
When I try to install a package using
pkg -j mariadb install -y mariadb105-server
I get this error:
Code:
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly, please wait...
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly/Latest/pkg.txz: Non-recoverable resolver failure
Address resolution failed for http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly.
Consider changing PACKAGESITE.
My host ifconfig looks like this:
Code:
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 78:ac:c0:3f:bc:d2
inet6 fe80::7aac:c0ff:fe3f:bcd2%re0 prefixlen 64 scopeid 0x1
media: Ethernet autoselect (none)
status: no carrier
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,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>
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 4c:0f:6e:37:9b:10
inet 192.168.1.78 netmask 0xffffff00 broadcast 192.168.1.255
groups: wlan
ssid MEO-62B190 channel 1 (2412 MHz 11g ht/20) bssid 00:06:91:62:b1:90
regdomain 96 indoor ecm authmode WPA2/802.11i privacy ON
deftxkey UNDEF TKIP 2:128-bit txpower 20 bmiss 7 scanvalid 60
protmode CTS ampdulimit 64k ampdudensity 4 shortgi -stbctx stbcrx
-ldpc -uapsd wme burst roaming MANUAL
parent interface: ath0
media: IEEE 802.11 Wireless Ethernet MCS mode 11ng
status: associated
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
My jail's ifconfig looks like this:
Code:
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 78:ac:c0:3f:bc:d2
media: Ethernet autoselect (none)
status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
groups: lo
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 4c:0f:6e:37:9b:10
groups: wlan
ssid MEO-62B190 channel 1 (2412 MHz 11g ht/20) bssid 00:06:91:62:b1:90
regdomain 96 indoor ecm authmode WPA2/802.11i privacy ON
deftxkey UNDEF TKIP 2:128-bit txpower 20 bmiss 7 scanvalid 60
protmode CTS ampdulimit 64k ampdudensity 4 shortgi -stbctx stbcrx
-ldpc -uapsd wme burst roaming MANUAL
parent interface: ath0
media: IEEE 802.11 Wireless Ethernet MCS mode 11ng
status: associated
What am I missing here?