Missing TUN/TAP drivers?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Missing TUN/TAP drivers?
Running Mint Mate Sonya (18.2) x64 on an Acer Aspire One D257-13448. New install - only additional software installed is a few games, no software uninstalled.
My router supports running an OpenVPN server, which I use to connect to a VM running at home (that I RDP into to give me some extra juice on this underpowered netbook). The router gives me a pre-made config file that I know works because the exact same file used in the exact same way works on Puppy Linux 3.14.55 (Slacko) with the openvpn package installed.
Searching around the web, one of the issues raised was that the TUN/TAP drivers were not properly initialized. It brought me to using the command "find /lib/modules/ -iname 'tun.ko.gz' " to seek if the driver was present - the command returned no file path. I then proceeded to look into where another link told me the driver might be (/lib/modules/4.18-generic/drivers/net I believe?) and I could not find it either.
The specific error given by OpenVPN in the process is "write to TUN/TAP : Input/output error (code=5)"
Any help?
Thanks!
My router supports running an OpenVPN server, which I use to connect to a VM running at home (that I RDP into to give me some extra juice on this underpowered netbook). The router gives me a pre-made config file that I know works because the exact same file used in the exact same way works on Puppy Linux 3.14.55 (Slacko) with the openvpn package installed.
Searching around the web, one of the issues raised was that the TUN/TAP drivers were not properly initialized. It brought me to using the command "find /lib/modules/ -iname 'tun.ko.gz' " to seek if the driver was present - the command returned no file path. I then proceeded to look into where another link told me the driver might be (/lib/modules/4.18-generic/drivers/net I believe?) and I could not find it either.
The specific error given by OpenVPN in the process is "write to TUN/TAP : Input/output error (code=5)"
Any help?
Thanks!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Missing TUN/TAP drivers?
Not much on the internet regarding your issue, but I did find something for RedHat here.
Also I'm using tun0 and have no tun.ko.gz on my system. That's about all I came up with.
So instead of Viscosity you could try using Network manager and set ip4 to dhcp if your router supports it.Error: write to TUN/TAP : Input/output error (code=5)
OpenVPN may display the error message "write to TUN/TAP : Input/output error (code=5)" if it cannot send network packets through the VPN's network interface. This is usually due to the network interface not being ready yet, and hence it's not uncommon for several of the errors to appear while the network interface is still being setup.
However if these error messages do not stop, and you are unable to access anything on the VPN network, it's likely the network interface hasn't been assigned an IP address. This is common for TAP based connections where the IP address is assigned using a DHCP server. In this instance you should enable Viscosity's DHCP support like so:
Open Viscosity's Preferences window
Select your connection and click the Edit button
Tick the "Enable DHCP" option
Click the Save button
Try reconnecting
The DHCP option should only be enabled if the IP address should be assigned by a DHCP server. Enabled the DHCP option when it's not necessary can result in the VPN network interface having multiple IP addresses assigned which can cause routing problems.
Also I'm using tun0 and have no tun.ko.gz on my system. That's about all I came up with.
Re: Missing TUN/TAP drivers?
All of my existing connections are already DHCP-enabled, and network manager does not show a TUN/TAP connection (only the ethernet port and the 2 wifi configs I use - home and college). Some extra searching brought up ifconfig - ifconfig also only shows three devices (Ethernet @ enpls0, what I assume is the wireless even though it states it's ethernet @ wlp2s0, and local loopback @ lo).
Re: Missing TUN/TAP drivers?
Without trying to connect the VPN, can you ping your router?
EDIT: also for wireless you can use iwconfig for more info, and wlp2s0 is your wireless.
EDIT: also for wireless you can use iwconfig for more info, and wlp2s0 is your wireless.
Re: Missing TUN/TAP drivers?
Thanks for the tip about iwconfig!
Yes, I can successfully ping my router without VPN, from the network I would connect to the VPN from, using the same address that's in my openvpn config.
Yes, I can successfully ping my router without VPN, from the network I would connect to the VPN from, using the same address that's in my openvpn config.
Re: Missing TUN/TAP drivers?
I would suggest running Puppy Linux, open Network Manager Connection Settings, and record all settings for the VPN (don't forget the advanced button), could be some simple config issue like port, encryption, compression, etc.
Also you can run it from the command line which would give lots of information.
Also you can run it from the command line which would give lots of information.
sudo openvpn client.conf
substituting client.conf with the file supplied by your router, and posting the output here, with personal data removed of course.Re: Missing TUN/TAP drivers?
Couldn't find the network manager in Slacko, but I have a hunch it's not going to be compression or port since on Mint, the tap interface never even comes up in ifconfig OR the network manager. Meaning that unless I change the (currently found to be working on Slacko) config file, I couldn't even change the settings of the tap connection if I wanted to.
Pastebin containing the OpenVPN logs: https://pastebin.com/8ZFUszsB
Pastebin containing the OpenVPN logs: https://pastebin.com/8ZFUszsB
Re: Missing TUN/TAP drivers?
From your pastebin
I don't think you can add a route to an already existing route, see here and here.Wed Nov 1 15:10:50 2017 us=176503 /sbin/ip route add 192.168.1.1/24 via 192.168.1.1
RTNETLINK answers: Invalid argument
Wed Nov 1 15:10:50 2017 us=186877 ERROR: Linux route add command failed: external program exited with error status: 2
Re: Missing TUN/TAP drivers?
Using the command "ip config" found in your second link, I looked at the routes made before and after launching OpenVPN. In neither state did that route pop up. Or am I misunderstanding what you are saying?
Re: Missing TUN/TAP drivers?
Unless I'm mis-understanding, the router you want to connect to is in your home and you're trying to connect remotely. Then the Gateway in Network Manager - VPN has to point to that address, which won't be 192.168.xx.xx, it'll be what ever your ISP has assigned it.
Re: Missing TUN/TAP drivers?
That is correct - though in the config, the gateway points to an address to a DDNS service that keeps my home IP updated. (remote mything.netgear.com *portgoeshere* - obviously a reference and not the actual address, but it's how the command goes).
Though the way I understand it - isn't the gateway supposed to be telling "this is the address of the router on the network you're connected" AFTER connection? Because that's how it behaves under Puppy.
(Also even if that were true, I can't do shit about it, because as I said, the VPN tun/tap interface never even comes up in the network manager or ifconfig)
Though the way I understand it - isn't the gateway supposed to be telling "this is the address of the router on the network you're connected" AFTER connection? Because that's how it behaves under Puppy.
(Also even if that were true, I can't do shit about it, because as I said, the VPN tun/tap interface never even comes up in the network manager or ifconfig)
Re: Missing TUN/TAP drivers?
Ah, another cog in the wheel, I guess that looks OK but I've never used a service like that.Cocohurtz wrote:That is correct - though in the config, the gateway points to an address to a DDNS service that keeps my home IP updated. (remote mything.netgear.com *portgoeshere* - obviously a reference and not the actual address, but it's how the command goes).
I think you will find with a VPN there are two gateways, the one from your normal connections, in Network Settings - IPv4 Settings- Addresses Gateway (or IPv6 if using that) that points to the local router and a separate VPN Gateway mentioned above in the VPN settings.Cocohurtz wrote:Though the way I understand it - isn't the gateway supposed to be telling "this is the address of the router on the network you're connected" AFTER connection? Because that's how it behaves under Puppy.
My understanding, which should in no way be considered Gospel, is that the negotiation has to be done over the normal network between you and the VPN server, then the Tun0 (or whatever) is created as a new (virtual?) interface. So if you can't connect to, or the negotiations fail with the VPN server Tun0 will never get created.Cocohurtz wrote:(Also even if that were true, I can't do unicorns about it, because as I said, the VPN tun/tap interface never even comes up in the network manager or ifconfig)
Is there a way to get the actual ip of your home router just to test? This might help trouble shoot the issue.
Re: Missing TUN/TAP drivers?
Understandable - I use it because it's free, and because my ISP has dynamic IP assignment on a lease. It's functional - as I said, it resolves to my latest home IP.greerd wrote:Ah, another cog in the wheel, I guess that looks OK but I've never used a service like that.
In this case, my router IS my gateway. I'm not using a third-party VPN service. The only two parties in this VPN connection are my router (which is running the VPN server and connection) and this laptop connecting from a private WiFi connection.greerd wrote:I think you will find with a VPN there are two gateways, the one from your normal connections, in Network Settings - IPv4 Settings- Addresses Gateway (or IPv6 if using that) that points to the local router and a separate VPN Gateway mentioned above in the VPN settings.
That's interesting. I'll be noting this down for future reference.greerd wrote:My understanding, which should in no way be considered Gospel, is that the negotiation has to be done over the normal network between you and the VPN server, then the Tun0 (or whatever) is created as a new (virtual?) interface. So if you can't connect to, or the negotiations fail with the VPN server Tun0 will never get created.
Yep! As I said, my DDNS service just talks to my router and keeps my home IP updated at that address - so that no matter what is my home address, the DDNS service address will point to it. And so, like all web addresses, I can ping it to get the IP easily.greerd wrote:Is there a way to get the actual ip of your home router just to test? This might help trouble shoot the issue.
Re: Missing TUN/TAP drivers?
Quick update: I looked around a bit, and found this out:
The "Add VPN connection" option in my context menu for the network is grayed out. And I can't import, in any way or form, the openVPN configs into the network manager.
The "Add VPN connection" option in my context menu for the network is grayed out. And I can't import, in any way or form, the openVPN configs into the network manager.
Re: Missing TUN/TAP drivers?
Is network-manager-openvpn and network-manager-openvpn-gnome installed?
Re: Missing TUN/TAP drivers?
Installed and fully updated:
$ sudo apt-get install network-manager-openvpn
Reading package lists... Done
Building dependency tree
Reading state information... Done
network-manager-openvpn is already the newest version (1.1.93-1ubuntu1.1).
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
$ sudo apt-get install network-manager-openvpn-gnome
Reading package lists... Done
Building dependency tree
Reading state information... Done
network-manager-openvpn-gnome is already the newest version (1.1.93-1ubuntu1.1).
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.