I am trying to create a jail on a VPS following this guide on networked jails with a single ip. However, I have no internet access within the jail. Though I do have internet access on the host.
Here is my ifconfig(8) from the host:
Here is the relevant section of rc.conf on the host:
Here is my pf.conf on the host:
And running
I am using Google's nameservers inside the jail:
And here is the ifconfig(8) output from within the jail:
Finally, when I try to
Any suggestions? I've read previously that setting jail addresses on the loopback device will result in no internet connection. But, again (according to this guide that I was following for setting up jails with a single IP) it appears to be possible.
Here is my ifconfig(8) from the host:
Code:
vtnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=6c07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
ether 56:00:00:18:fa:73
inet6 fe80::5400:ff:fe18:fa73%vtnet0 prefixlen 64 scopeid 0x1
inet6 2001:19f0:0:2067:5400:ff:fe18:fa73 prefixlen 64 autoconf
inet X1.X2.X3.92 netmask 0xfffffe00 broadcast X1.X2.X3.255
nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
media: Ethernet 10Gbase-T <full-duplex>
status: active
vtnet1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=6c07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
ether 5a:00:00:18:fa:73
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
media: Ethernet 10Gbase-T <full-duplex>
status: active
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>
lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet 192.168.0.1 netmask 0xfffffff8
...
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
pflog0: flags=141<UP,RUNNING,PROMISC> metric 0 mtu 33160
Here is the relevant section of rc.conf on the host:
Code:
cloned_interfaces="lo1"
ipv4_addrs_lo1="192.168.0.1-254/29"
ezjail_enable="YES"
# PF
pf_enable="YES"
pf_flag=""
pf_rules="/etc/pf.conf"
pflog_enable="YES"
pflog_flags=""
gateway_enable="YES"
Here is my pf.conf on the host:
Code:
IP_PUB="X1.X2.X3.92"
IP_JAIL="192.168.0.2"
NET_JAIL="192.168.0.0/24"
scrub in all
nat pass on vrtnet0 from $NET_JAIL to any -> $IP_PUB
And running
pfctl -sn
on the host gives this:
Code:
No ALTQ support in kernel
ALTQ related functions disabled
nat pass on vrtnet0 inet from 192.168.0.0/24 to any -> X1.X2.X3.92
I am using Google's nameservers inside the jail:
Code:
nameserver 8.8.8.8
nameserver 8.8.4.4
And here is the ifconfig(8) output from within the jail:
Code:
vtnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=6c07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
ether 56:00:00:18:fa:73
media: Ethernet 10Gbase-T <full-duplex>
status: active
vtnet1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=6c07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
ether 5a:00:00:18:fa:73
media: Ethernet 10Gbase-T <full-duplex>
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
lo1: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
inet 192.168.0.2 netmask 0xffffffff
pflog0: flags=141<UP,RUNNING,PROMISC> metric 0 mtu 33160
Finally, when I try to
drill google.com
within the jail I get a timeout:
Code:
Error: error sending query: Could not send or receive, because of network error
Any suggestions? I've read previously that setting jail addresses on the loopback device will result in no internet connection. But, again (according to this guide that I was following for setting up jails with a single IP) it appears to be possible.