This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

[SOLVED] ifconfig in jail creates device in host's /dev/

Jails with XigmaNAS
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
rav
NewUser
NewUser
Posts: 13
Joined: 09 Oct 2015 02:20
Status: Offline

[SOLVED] ifconfig in jail creates device in host's /dev/

Post by rav »

Hi, I hope posting in the right place. I think my problem is due to a jail configuration. (or maybe it's not?)

When I'm trying to connect with OpenVPN inside the jail, it uses ifconfig to create tun0 interface. So the interface is created and I can see it in the ifconfig output but the device tun0 is created on the host in /dev/ and not in the jail's /dev/.
I'm using theBrig to manage my jails.

How to force ifconfig to make those devices inside the jail's /dev/ and not on the host? What did I do wrong here? :)

Thanks in advance for your help!
Last edited by rav on 24 Oct 2015 01:35, edited 1 time in total.

User avatar
Parkcomm
Advanced User
Advanced User
Posts: 384
Joined: 21 Sep 2012 12:58
Location: Australia
Status: Offline

Re: ifconfig in jail creates device in host's /dev/

Post by Parkcomm »

NAS4Free Embedded 10.2.0.2 - Prester (revision 2003), HP N40L Microserver (AMD Turion) with modified BIOS, ZFS Mirror 4 x WD Red + L2ARC 128M Apple SSD, 10G ECC Ram, Intel 1G CT NIC + inbuilt broadcom

User avatar
Parkcomm
Advanced User
Advanced User
Posts: 384
Joined: 21 Sep 2012 12:58
Location: Australia
Status: Offline

Re: ifconfig in jail creates device in host's /dev/

Post by Parkcomm »

Also rav, be aware that a jail is not a full kernal, so only a few virtual devs (for instance null) are jail specific - the main devs exist on the main file system and can be passed through to a jail.
NAS4Free Embedded 10.2.0.2 - Prester (revision 2003), HP N40L Microserver (AMD Turion) with modified BIOS, ZFS Mirror 4 x WD Red + L2ARC 128M Apple SSD, 10G ECC Ram, Intel 1G CT NIC + inbuilt broadcom

rav
NewUser
NewUser
Posts: 13
Joined: 09 Oct 2015 02:20
Status: Offline

Re: ifconfig in jail creates device in host's /dev/

Post by rav »

That's right, I didn't know that, since I'm pretty fresh in BSD but I managed to solve this. It was enough to add just one line to host's devfs.rules:

Code: Select all

add path tun0 unhide
You can add it when creating or editing a jail in theBrig under "Devfs ruleset" option.

Thanks Parkcomm for you help! :)

User avatar
Parkcomm
Advanced User
Advanced User
Posts: 384
Joined: 21 Sep 2012 12:58
Location: Australia
Status: Offline

Re: [SOLVED] ifconfig in jail creates device in host's /dev/

Post by Parkcomm »

nicely done - I think you just solved a problem I have been grappling with. So thankyou
NAS4Free Embedded 10.2.0.2 - Prester (revision 2003), HP N40L Microserver (AMD Turion) with modified BIOS, ZFS Mirror 4 x WD Red + L2ARC 128M Apple SSD, 10G ECC Ram, Intel 1G CT NIC + inbuilt broadcom

Post Reply

Return to “Jails”