# Fresh Install of Pritunl on Ubuntu 20.04... missing tunnel device? How do I create one?

**URL:** <https://forum.pritunl.com/t/fresh-install-of-pritunl-on-ubuntu-20-04-missing-tunnel-device-how-do-i-create-one/375>\
**Category:** Pritunl VPN\
**Created:** [September 7, 2022, 3:55pm UTC](https://forum.pritunl.com/t/fresh-install-of-pritunl-on-ubuntu-20-04-missing-tunnel-device-how-do-i-create-one/375 "2022-09-07T15:55:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kernull](https://forum.pritunl.com/user_avatar/forum.pritunl.com/kernull/32/143_2.png) [@kernull](https://forum.pritunl.com/u/kernull)\
**Post date:** [September 7, 2022, 3:55pm UTC](https://forum.pritunl.com/t/fresh-install-of-pritunl-on-ubuntu-20-04-missing-tunnel-device-how-do-i-create-one/375/1 "2022-09-07T15:55:34Z")

</div>

After tearing my hair out and finally getting pritunl and mongodb running (the pritunl webUI is fully functional), my current issue in the server log is:

`2022-09-07 10:14:30 ERROR Management socket exception`

which I beleive is due to the fact that the ubuntu 20 server instance this is running on has no tun device.

I ran

`sudo mkdir -p /dev/net`  
`sudo mknod /dev/net/tun c 10 200`  
`sudo chmod 600 /dev/net/tun`

from [https://docs.pritunl.com/discuss/5877cab4511a4e2500f91d66](https://docs.pritunl.com/discuss/5877cab4511a4e2500f91d66)

but theres still no tun device in `ip a` output after a restart  
I have no idea how to use netplan (I previously was use to /etc/networking/interfaces) and google isnt giving me any results that make sense to me…

How the heck do I add a tunnel device in ubuntu 20?

(tried posting on reddit too)

thanks for reading!

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [September 7, 2022, 4:00pm UTC](https://forum.pritunl.com/t/fresh-install-of-pritunl-on-ubuntu-20-04-missing-tunnel-device-how-do-i-create-one/375/2 "2022-09-07T16:00:49Z")

</div>

Check the log files listed in the [**debugging documentation**](https://docs.pritunl.com/docs/debugging-client)

---

<div class="post-metadata">

**Author:** ![kernull](https://forum.pritunl.com/user_avatar/forum.pritunl.com/kernull/32/143_2.png) [@kernull](https://forum.pritunl.com/u/kernull)\
**Post date:** [September 7, 2022, 4:09pm UTC](https://forum.pritunl.com/t/fresh-install-of-pritunl-on-ubuntu-20-04-missing-tunnel-device-how-do-i-create-one/375/3 "2022-09-07T16:09:37Z")

</div>

thanks for the link- but im unable to get client access at all, so I was refferring to the server side log:

edit: I do see this in the terminal log output which i think is just the result of pritunl trying to use a tun0 that is not present…

```auto
[winter-waves-6815][2022-09-07 10:14:40,540][ERROR] Error in management socket thread
Traceback (most recent call last):
  File "/usr/lib/pritunl/lib/python3.8/site-packages/pritunl/server/instance_com.py", line 286, in _socket_thread
    self.connect()
  File "/usr/lib/pritunl/lib/python3.8/site-packages/pritunl/server/instance_com.py", line 372, in connect
    self.sock.connect(self.socket_path)
ConnectionRefusedError: [Errno 111] Connection refused
  server_id = "6317199e4a0ff4ee08c8d5b1"
  instance_id = "63186f10746ff8feb72e9b11"
  socket_path = "/var/run/pritunl_63186f10746ff8feb72e9b11.sock"

```

---

<div class="post-metadata">

**Author:** ![CaldwellConsulting](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/c/49beb7/32.png) [@CaldwellConsulting](https://forum.pritunl.com/u/CaldwellConsulting)\
**Post date:** [October 12, 2022, 9:01am UTC](https://forum.pritunl.com/t/fresh-install-of-pritunl-on-ubuntu-20-04-missing-tunnel-device-how-do-i-create-one/375/4 "2022-10-12T09:01:07Z")

</div>

If you are still looking for an answer, this seems to have worked for me, I have not tested it much, yet.

shut down the container

add the following lines to the container config file, if they do not already exist:

features: nesting=1  
lxc.cgroup2.devices.allow: c 10:200 rwm  
lxc.mount.entry: /dev/net dev/net none bind,create=dir

On the physical proxmox host, run:  
chown 100000:100000 /dev/net/tun

start the container, and hopefully things will work.

---

<div class="post-metadata">

**Author:** ![kernull](https://forum.pritunl.com/user_avatar/forum.pritunl.com/kernull/32/143_2.png) [@kernull](https://forum.pritunl.com/u/kernull)\
**Post date:** [October 12, 2022, 11:15am UTC](https://forum.pritunl.com/t/fresh-install-of-pritunl-on-ubuntu-20-04-missing-tunnel-device-how-do-i-create-one/375/5 "2022-10-12T11:15:41Z")

</div>

I ended up having to reinstall pritunl…

Changed perms on the tun device to 755 and apt --purge autoremove pritunl then reinstalled. servers working now as expected 🤷‍♂️ I think it was just the reinstall that did it honestly…
