Date: Thu, 6 Mar 2014 21:51:39 -0500 From: Joe Nosay <superbisquit@gmail.com> To: Devin Teske <dteske@freebsd.org> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org>, Eugene Grosbein <eugen@grosbein.net> Subject: Re: How do I create a cloned interface when there is no static connection? Message-ID: <CA%2BWntOsP_eXL2Lzk2=sJzP-Wrzk1kQ2tzVyp6MinKCFsfyf0Tw@mail.gmail.com> In-Reply-To: <19cd01cf3974$dffa5bf0$9fef13d0$@FreeBSD.org> References: <CA%2BWntOsoNMF5rd=j2qbtnVv6-6709R7JqPH7j6vzwkqwrA_=GQ@mail.gmail.com> <53181410.1030107@freebsd.org> <CA%2BWntOtphdnTRdks%2Bwe1Nx68CXjaz_u1S1JFm%2BfdKc7X6Qro%2BA@mail.gmail.com> <5318B836.7040301@grosbein.net> <19cd01cf3974$dffa5bf0$9fef13d0$@FreeBSD.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Thu, Mar 6, 2014 at 2:47 PM, <dteske@freebsd.org> wrote:
>
>
> > -----Original Message-----
> > From: Eugene Grosbein [mailto:eugen@grosbein.net]
> > Sent: Thursday, March 6, 2014 10:03 AM
> > To: Joe Nosay
> > Cc: FreeBSD Hackers
> > Subject: Re: How do I create a cloned interface when there is no static
> > connection?
> >
> > On 07.03.2014 00:39, Joe Nosay wrote:
> >
> > > I'll need a dummy interface inside of the that can be bridged to
> > > wlan0 outside of the jail. Normal jail with aliases.
> >
> > Try epair(4) and give one part of pair to jail and bridge another part
> with
> > wlan0.
> >
>
> Never tried bridging a wlan with netgraph, but I wonder if the method I use
> for bridging Ethernet with netgraph would work...
>
> Using the ngctl command to create an ng_bridge and then multiple ng_eiface
> devices that you can be shoved into the jail.
>
> kldload ng_ether
> kldload ng_bridge
> kldload ng_eiface
> ngctl
> + mkpeer {IFACE}: bridge lower link0
> + connect {IFACE}: {IFACE}:lower upper link1
> + name {IFACE}:lower {IFACE}bridge
> + quit
> ifconifg {IFACE} up
> ngctl
> + msg {IFACE}: setpromisc 1
> + msg {IFACE}: setautosrc 0
> + mkpeer {IFACE}:lower eiface link{N} ether
> + name {IFACE}bridge:link{N}
> + show -n {IFACE}bridge:
> Name: ngeth0 Type: eiface ID: XXXXXXXX Num
> hooks: N
> + name {IFACE}bridge:link{N} {NEWIFACE}
> ifconfig ngeth0 name {NEWNAME}
> ifconfig {NEWNAME} vnet {JID}
>
> Taking care to replace the following from above:
> {IFACE} - the name of the interface you want to bridge (eg, em0)
> {N} - link number (starts at 2; increments by-one for each new eiface)
> {NEWIFACE} - the name of the new eiface (ngethN) device to create
> {JID} - the jail ID of the jail you want to shove the interface into
>
> Of course, never tried this with WiFi.
> --
> Devin
>
> _____________
> The information contained in this message is proprietary and/or
> confidential. If you are not the intended recipient, please: (i) delete the
> message and all copies; (ii) do not disclose, distribute or use the message
> in any manner; and (iii) notify the sender immediately. In addition, please
> be aware that any message addressed to our domain is subject to archiving
> and review by persons other than the intended recipient. Thank you.
>
I did not properly create the jail.conf script. I believe the file of
/etc/rc.d/jail should be followed; yet, there is no tutorial on setting it
up.
My /etc/rc.conf file is also improperly setup. How? I don't know; but, I
can tell because the system will not boot completely and ctrl+C must be hit
to allow logging in.
[-- Attachment #2 --]
FreeBSD-Google {
path = /jails/FreeBSD-Google_projects;
allow.mount;
mount.devfs;
host.hostname = bsd-googlebox;
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
}
[-- Attachment #3 --]
hostname="nunca-conhecado"
sshd_enable="YES"
moused_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
zfs_enable="YES"
jail_enable="YES"
jail_list="FreeBSD-Google"
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BWntOsP_eXL2Lzk2=sJzP-Wrzk1kQ2tzVyp6MinKCFsfyf0Tw>
