Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 May 2018 16:32:28 +0200
From:      "Herbert J. Skuhra" <herbert@gojira.at>
To:        freebsd-questions@freebsd.org
Subject:   Re: What have I neglected to do in order to get networking in a jail?
Message-ID:  <876033dhfn.wl-herbert@gojira.at>
In-Reply-To: <3f375650dfee47082e77cba953961a3f.squirrel@webmail.harte-lyne.ca>
References:  <mailman.92.1527768001.7501.freebsd-questions@freebsd.org> <3f375650dfee47082e77cba953961a3f.squirrel@webmail.harte-lyne.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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 218.185.71.31 netmask 0xffffffff broadcast 218.185.71.31
> >>
> >> 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

--
Herbert



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?876033dhfn.wl-herbert>