Register for the iXsystems Community to get an ad-free experience

SOLVED OpenVPN not starting in Jail

Western Digital Drives - The Preferred Drives of FreeNAS and TrueNAS CORE
Joined
Mar 14, 2019
Messages
2
Hi everyone, new to FreeNAS and have run into something that I have spent hours trying to figure out.

I am on the very latest update of FreeNAS and have installed the Transmission plugin. I have run the command that allows you to use pkg in a plugin created Jail and have installed OpenVPN in this Jail following this guide: https://www.ixsystems.com/community...g-up-transmission-with-openvpn-and-pia.24566/

I got to the end of the guide but my IP didn't change. In the thread some people mention this being a problem on the latest update but there didn't seem to be a final solution.

I then found this thread on Google: https://www.reddit.com/r/freenas/comments/atwn2s/openvpn_wont_start_in_transmission_jail/

This Reddit thread describes my problem exactly. I've tried using the fixes listed in the guy's edit (turn on allow_tun in the Jail settings) and have rebooted a few times, but it hasn't made any difference, I am still having the exact same problem.

The internet works fine in the Jail, I can ping things and can download with Transmission, I just can't get this OpenVPN to work properly.

I'm now at the point where my research is taking me in circles and I've run out of things to try, could somebody please help?
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,476
Can you provide a bit more details:

full hardware specs and software version
you create your jails via plugin or manual?
you are installing openvpn within its own jail or in the same jail as transmission?
does the process ever start when you try and start the openvpn daemon?
do you ever see a "tun" interface when you run "ifconfig" from within the jail after starting openvpn?
 
Last edited:
Joined
Mar 14, 2019
Messages
2
Thanks for your reply. I couldn't ever see a tun interface, which led me to look up some more things.

For anyone else in my situation, I looked in /var/log/messages and could see that openvpn was failing to start with the error "Cannot allocate TUN/TAP dynamically." I also found I couldn't manually create a tun device with "ifconfig tun create" as it would come back with the error "ifconfig: SIOCIFCREATE2: Operation not permitted"

After some digging, I found that turning on VNET and setting the Jail's adaptor to VNET0 with the IP address wanted and the gateway entered fixed this for me at least.

So this is sorted for me now, hopefully this helps anyone else in the same boat.
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,476
Great glad got it figured out. sometimes it just helps to spell it out to others.
 
Top