Hello all.
I recently purchased a miniture computer to use as a home server, and decided to try FreeBSD out for the first time. Part of my endeavor involved setting up a jail with ezjail and running nginx inside.
Unfortunately, I'm experiencing an issue wherein the jail is only occasionally able to reach the internet but can reach/be reached by computers on the local network. That is to say that for a length of time after restarting the jail, I can download packages and telnet remote IPs, but will invariably lose the capability to do so later on. Restarting the jail seems to fix this for a little bit.
I've followed the manpage on jails as best as I could and have tried configuring things as directed by quite a few different tutorials, all to no avail, so I would appreciate any help.
Below are snippets from the host machine that I believe to be relevant:
And below are the jail's files and command outputs:
I recently purchased a miniture computer to use as a home server, and decided to try FreeBSD out for the first time. Part of my endeavor involved setting up a jail with ezjail and running nginx inside.
Unfortunately, I'm experiencing an issue wherein the jail is only occasionally able to reach the internet but can reach/be reached by computers on the local network. That is to say that for a length of time after restarting the jail, I can download packages and telnet remote IPs, but will invariably lose the capability to do so later on. Restarting the jail seems to fix this for a little bit.
I've followed the manpage on jails as best as I could and have tried configuring things as directed by quite a few different tutorials, all to no avail, so I would appreciate any help.
Below are snippets from the host machine that I believe to be relevant:
Code:
/etc/rc.conf
----------------
hostname="machinename.mydomain.net"
wlans_iwm0="wlan0"
ifconfig_wlan0="WPA DHCP"
cloned_interfaces="lo1"
ifconfig_lo1_aliases="\
inet 192.168.50.181 "
sshd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
zfs_enable="YES"
jail_enable="YES"
ezjail_enable="YES"
Code:
/etc/hosts
----------------
127.0.0.1 localhost mydomain.net
Code:
/etc/resolv.conf
----------------
nameserver 192.168.50.1
Code:
/usr/local/etc/ezjail/webserver
----------------
export jail_webserver_hostname="webserver"
export jail_webserver_ip="lo1|127.0.1.1,wlan0|192.168.50.181"
export jail_webserver_rootdir="/usr/jails/webserver"
export jail_webserver_exec_start="/bin/sh /etc/rc"
export jail_webserver_exec_stop=""
export jail_webserver_mount_enable="YES"
export jail_webserver_devfs_enable="YES"
export jail_webserver_devfs_ruleset="devfsrules_jail"
export jail_webserver_procfs_enable="YES"
export jail_webserver_fdescfs_enable="YES"
export jail_webserver_image=""
export jail_webserver_imagetype=""
export jail_webserver_attachparams=""
export jail_webserver_attachblocking=""
export jail_webserver_forceblocking=""
export jail_webserver_zfs_datasets=""
export jail_webserver_cpuset=""
export jail_webserver_fib=""
export jail_webserver_parentzfs=""
export jail_webserver_parameters=""
export jail_webserver_post_start_script=""
export jail_webserver_retention_policy=""
Code:
ifconfig output
----------------
em0: flags=8822<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=481249b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LRO,WOL_MAGIC,VLAN_HWFILTER,NOMAP>
ether 6c:4b:90:45:9e:5f
media: Ethernet autoselect
status: no carrier
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>
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:24:d6:eb:e8:c1
inet 192.168.50.180 netmask 0xffffff00 broadcast 192.168.50.255
inet 192.168.50.181 netmask 0xffffffff broadcast 192.168.50.181
groups: wlan
ssid CurrentNetwork channel 161 (5805 MHz 11a) bssid 04:d9:f5:91:de:8c
regdomain FCC country US authmode WPA2/802.11i privacy ON
deftxkey UNDEF AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 23 bmiss 10
mcastrate 6 mgmtrate 6 scanvalid 60 wme roaming MANUAL
parent interface: iwm0
media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11a
status: associated
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet 192.168.50.181 netmask 0xffffff00
inet 127.0.1.1 netmask 0xffffffff
inet6 fe80::1%lo1 prefixlen 64 scopeid 0x4
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
Code:
netstat -rn output
----------------
Routing tables
Internet:
Destination Gateway Flags Netif Expire
default 192.168.50.1 UGS wlan0
127.0.0.1 link#2 UH lo0
127.0.1.1 link#4 UH lo1
192.168.50.0/24 link#3 U wlan0
192.168.50.180 link#3 UHS lo0
192.168.50.181 link#4 UH lo1
Internet6:
Destination Gateway Flags Netif Expire
::/96 ::1 URS lo0
::1 link#2 UHS lo0
::ffff:0.0.0.0/96 ::1 URS lo0
fe80::/10 ::1 URS lo0
fe80::%lo0/64 link#2 U lo0
fe80::1%lo0 link#2 UHS lo0
fe80::%lo1/64 link#4 U lo1
fe80::1%lo1 link#4 UHS lo0
ff02::/16 ::1 URS lo0
And below are the jail's files and command outputs:
Code:
/etc/rc.conf
----------------
nginx_enable="YES"
Code:
/etc/hosts
----------------
127.0.1.1 localhost localhost.my.domain
Code:
/etc/resolv.conf
----------------
nameserver 192.168.50.1
Code:
ifconfig output
----------------
em0: flags=8822<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=481249b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LRO,WOL_MAGIC,VLAN_HWFILTER,NOMAP>
ether 6c:4b:90:45:9e:5f
media: Ethernet autoselect
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 00:24:d6:eb:e8:c1
inet 192.168.50.181 netmask 0xffffffff broadcast 192.168.50.181
groups: wlan
ssid A_Network-5G channel 161 (5805 MHz 11a) bssid 04:d9:f5:91:de:8c
regdomain FCC country US authmode WPA2/802.11i privacy ON
deftxkey UNDEF AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 23 bmiss 10
mcastrate 6 mgmtrate 6 scanvalid 60 wme roaming MANUAL
parent interface: iwm0
media: IEEE 802.11 Wireless Ethernet OFDM/54Mbps mode 11a
status: associated
lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet 192.168.50.181 netmask 0xffffff00
inet 127.0.1.1 netmask 0xffffffff
groups: lo
Code:
netstat -rn output
----------------
Routing tables
Internet:
Destination Gateway Flags Netif Expire
127.0.1.1 link#4 UH lo1
192.168.50.181 link#4 UH lo1