TUN/TAP drivers for OpenVPN on Linux
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 12
- Joined: Mon Jan 28, 2013 4:53 pm
TUN/TAP drivers for OpenVPN on Linux
I am trying to use OpenVPN on several versions of Linux but I am currently using Ubuntu 12.04 and Amazon AMI Linux. I installed openvpn on both machines and try to send a message between the two. The first step is to create the Tun/tap driver to start the connection and in Windows, I would use the tapinstall executable file to do this. I am trying to find a way how to do it for Linux but unfortunately, I am unable to find anything so far. Can anyone provide any insight on how to create a Tap/Tun driver in a Linux environment?
Thanks,
Mike
Thanks,
Mike
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: TUN/TAP drivers for OpenVPN on Linux
On Linux , the tun/tap drivers are part of the kernel itself and you don't need to install anything.
-
- OpenVpn Newbie
- Posts: 12
- Joined: Mon Jan 28, 2013 4:53 pm
Re: TUN/TAP drivers for OpenVPN on Linux
Ok so I just use the OpenVPN command to connect to a remote user and select the number for the driver? (for example tun0, tun1, etc)
Also in Windows, there is a show valid subnets command. Is there something equivalent in Linux?
Thanks,
Michael
Also in Windows, there is a show valid subnets command. Is there something equivalent in Linux?
Thanks,
Michael
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: TUN/TAP drivers for OpenVPN on Linux
just use
and the OS will pick one for you; if you want to overrule this, specify an explicit number, e.g.
but in that case it's "whoever comes first, wins" : the second openvpn instance to start will fail because "tun0" has been assigned already.
the '--show-valid-subnets' command also works on Linux.
Code: Select all
dev tun
Code: Select all
dev tun0
the '--show-valid-subnets' command also works on Linux.
-
- OpenVpn Newbie
- Posts: 12
- Joined: Mon Jan 28, 2013 4:53 pm
Re: TUN/TAP drivers for OpenVPN on Linux
Thanks for that.
I tried to use the openvpn command but i get the following message below.
"Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1)
/sbin/ip link set dev up mtu 1500
Linux ip link set failed: external program exited with error status: 255"
In addition,
I used the show valid subnets command, like this: openvpn --show-valid-subnets and the error states "Unrecognized options or missing parameters in CMD-LINE: 1. Then I try openvpn show-valid-subnets and the error states: "Error opening configuration file: show-valid-subnets"
Do you have any insight on what this means?
Thanks
Michael
I tried to use the openvpn command but i get the following message below.
"Cannot ioctl TUNSETIFF tun: Operation not permitted (errno=1)
/sbin/ip link set dev up mtu 1500
Linux ip link set failed: external program exited with error status: 255"
In addition,
I used the show valid subnets command, like this: openvpn --show-valid-subnets and the error states "Unrecognized options or missing parameters in CMD-LINE: 1. Then I try openvpn show-valid-subnets and the error states: "Error opening configuration file: show-valid-subnets"
Do you have any insight on what this means?
Thanks
Michael
-
- OpenVpn Newbie
- Posts: 12
- Joined: Mon Jan 28, 2013 4:53 pm
Re: TUN/TAP drivers for OpenVPN on Linux
Ok I figured out the first problem. My good friend sudo came to the rescue.
I am still having issues receiving the subnets from the command.
Thanks
Michael
I am still having issues receiving the subnets from the command.
Thanks
Michael
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: TUN/TAP drivers for OpenVPN on Linux
oh my bad: I thought the command was also included in the Linux version; it's pretty much a bogus command anyways
For your server subnet, choose something like "server 10.8.0.0 255.255.255.0" (this is the often-used default). It should be fine for most uses.
For your server subnet, choose something like "server 10.8.0.0 255.255.255.0" (this is the often-used default). It should be fine for most uses.
-
- OpenVpn Newbie
- Posts: 12
- Joined: Mon Jan 28, 2013 4:53 pm
Re: TUN/TAP drivers for OpenVPN on Linux
Ok I will try that.
Thanks,
Michael
Thanks,
Michael