What have I neglected to do in order to get networking in a jail?
Herbert J. Skuhra
herbert at gojira.at
Thu May 31 14:40:12 UTC 2018
On Thu, 31 May 2018 15:15:11 +0200, "James B. Byrne via freebsd-questions" wrote:
> On Thu, May 31, 2018 04:55, Herbert J. Skuhra wrote:
> > On Wed, 30 May 2018 17:24:03 +0200, "James B. Byrne via
> >> root at mx31:~ # ifconfig
> >> vtnet0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST>
> >> metric 0 mtu 1500
> >> options=80028<VLAN_MTU,JUMBO_MTU,LINKSTATE>
> >> ether 58:9c:fc:0e:cd:bb
> >> hwaddr 58:9c:fc:0e:cd:bb
> >> inet 18.104.22.168 netmask 0xffffffff broadcast 22.214.171.124
> >> Why does this jail not have a network connection?
> > After a quick check I guess you are missing NAT on the host (pf or
> > ipfw)?
> One does not require NAT when one has a public IP address assigned to
> the I/F. The jail network traffic is not getting off the host system
> as I have determined from tcpdump.
> I have set jails up before on a similarly configured host and have
> gotten them to work, albeit always with some difficulty or other.
OK, you are obviously smarter than me (or a magician). I'll continue
using NAT in such a setup. Adding the follwing to /etc/pf.conf works for me:
nat on $ext_if inet from 127.0.32.1/32 to any -> $ext_ip
More information about the freebsd-questions