Questions tagged [tun]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
18 views

qemu commandline can't see /dev/net/tun

i am newbie with qemu and libvirt. I hit the issue with virsh and qemu, especially with tun interface setup. Once i run qemu-system-x86_64 \ -nographic -enable-kvm \ -cpu host -m 2048 \ -...
user avatar
0 votes
0 answers
24 views

Is it possible to read less than 4 bytes from TUN device when IFF_NO_PI is not set?

I was reading the implementation of wireguard-go, and found it handles reading less than 4 bytes from the TUN device file when the no packet information flag is not set. I wonder is it possible that ...
user avatar
0 votes
1 answer
25 views

I am creating a tun interface with sudo ip tuntap add dev <interface_name> mod tun, but it's not receiving packets when I ping it?

Here are my command when I set up the interface: sudo ip tuntap add dev router0 mod tun sudo ip addr add 10.0.0.138/24 dev router0 sudo ip link set dev router0 up Here is the output of ip addr show ...
user avatar
0 votes
0 answers
94 views

tun2socks configuration not working

I am trying to configure a tun2socks server that forwards all traffic to an external proxy found online. I also want to retain the ability to ssh into the server so I had to take this into ...
user avatar
0 votes
0 answers
61 views

Testing a tun tunnel between an Ubiquiti edge router and a Linux Server

I am following the first example setup for OpenVPN which involves establishing a TUN tunnel. On the server I run: openvpn --ifconfig 10.200.0.1 10.200.0.2 --dev tun The ubiquiti Edge Router is ...
user avatar
  • 124
0 votes
0 answers
235 views

Socat TUN listener can't handle multiple connections?

I set up tun device server on 1.2.3.4 socat -v -v -v -v -d -d TCP-LISTEN:11443,reuseaddr,fork TUN:10.3.33.20/16,up I set up client 1: socat TCP:1.2.3.4:11443 TUN:10.3.33.21/16,up I can ping 10.3.33....
user avatar
  • 139
0 votes
1 answer
307 views

QEMU VM with tap interface sees all packages coming from hypervisor instead of real source IP

I have set up a very simple Hypervisor using Alpine Linux and my VM sees all traffic coming from the IP of the hypervisor. Which also means if fail2ban tries to block attacks, it always blocks the ...
user avatar
  • 333
2 votes
1 answer
766 views

What does ip addr add dev tun1 local 192.168.69.0 remote 192.168.69.1 mean? [closed]

I found the following set of commands to open a tun device on linux that relays things to the internet. However, packets are not relayed back to the tun device ip tuntap add dev tun1 mode tun user `id ...
user avatar
0 votes
0 answers
435 views

Forwarding Traffic from TUN interface to XX

My setup is the following: I'm writing a program that creates a tun interface and writes raw (Layer 3) packets to that interface. For example a ICMP ping packet (to make things easy). Now i want to ...
user avatar
1 vote
1 answer
115 views

Name resolution for dummy interfaces

I've a virtual NIC of type NAT on my Ubuntu 20.04 virtual machine which connects it to the internet via host. For some processing, I need to route all incoming and outgoing packets via a program I've ...
user avatar
  • 21
1 vote
1 answer
2k views

Route all traffic through TUN interface

I want all my traffic go through TUN interface. So, as you can see, the traffic is routed to TUN iface on 10.0.0.1 address from every program. Then, the program attached to the TUN does something ...
user avatar
2 votes
0 answers
44 views

Is there a tool I can use to test out multiple vpn tunnels in one machine?

I use wget -q -O https://checkmyip.com/csv to determine if I am connected to a VPN but I want to verify multiple VPN tunnels on the same machine. Is there a tool that can allow me to send a command ...
user avatar
  • 171
0 votes
0 answers
632 views

Attach a VM to a host TAP or TUN device

I'm working on a project whilst in lockdown in England, and I am hoping someone can offer some advice? I have a machine with 5 physical eth interfaces on Linux Mint, 20.04. All eth interfaces ...
user avatar
  • 1
3 votes
0 answers
126 views

How to migrate OpenVPN architecture TAP to TUN

I did a tunnel system with OpenVPN to let a distant client act like a private network client to access private resources. It uses a client on the private network as a gateway. DistantClient <-> ...
user avatar
  • 131
0 votes
1 answer
920 views

Unable to connect VPN client to OpenVPN server running Ubuntu 16.04.6

im a bit new to Linux and also rather stuck with this... any help here would be much appreciated... I am running Ubuntu 16.0.4 on my server and trying to connect a client to it but no luck. The ...
user avatar
  • 1
0 votes
0 answers
5k views

OpenVPN: Cannot open TUN/TAP dev /dev/net/tun: Operation not permitted

I'm have some trouble with OpenVPN reccently, OpenVPN server are hosted on a VPS. It had been work for few months but last friday I reboot and update and upgrade since impossible to connect from my PC ...
user avatar
0 votes
0 answers
107 views

Embedding 3 bytes custom data in IPv4 header and then filter by iptables

In my modified OpenVPN server process, as an intermediate node, I'd need to embed my custom 3 bytes data in the header of every IP packet and then in the same machine (after going through tun) filter ...
user avatar
  • 103
0 votes
1 answer
1k views

tun/tap works on incoming or outgoing packet?

When we create a tun virtual interface we use read and write to read and write packets from/into network stack. My question is when we use .read, we are actually reading outgoing packets (the packets ...
user avatar
  • 3
0 votes
1 answer
186 views

what is difference between simple TUN and VPNs like PPTP and L2TP

In respect of VPNs and tunneling, as far as i know, TUN is a virtual interface works on network Layer 3 (IP packets), and is nothing more than a simple more likely UDP socket link in practice (I think)...
user avatar
2 votes
1 answer
1k views

socat tun device very low throughput

I was tinkering around with socat and tried to use socat for creating a TUN device for tunneling between two debian stretch servers. However, throughput seemed very low and comparing with iperf ...
user avatar
2 votes
0 answers
875 views

write into a tun interface and forward traffic to another computer

I have the following setup. An application on machine A creates an IP packet which is captured by the tun1 interface. I have added the route using the command : sudo route add -host 10.129.131.220 ...
user avatar
  • 121
8 votes
2 answers
15k views

OpenVPN persist-tun option - what's the point?

According the OpenVPN 2 Cookbook: The persist-tun and persist-key options are used to ensure that the connection comes back up automatically if the underlying network is disrupted. These ...
user avatar
  • 183
3 votes
1 answer
2k views

Multiqueue tun/tap interface

I am trying to understand how Multiqueue tuntap interface works. Following the instructions provided at: https://www.kernel.org/doc/Documentation/networking/tuntap.txt I was able to create multiple ...
user avatar
2 votes
1 answer
1k views

IPv6 on Linux tun/tap: NDP not working

I am working on an old code that used to connect different IPv6 devices over a different kind of network (a powe line netwrok, PLC, which is quite similar to 802.15.4). To do that, it created Linux ...
user avatar
  • 191
2 votes
1 answer
5k views

OpenVPN TAP vs TUN in parallel

I have a few questions about our existing OpenVPN server setup and a requirement that we have to expand our access. Our current setup is as follows: 1 OpenVPN server (in TAP mode) Multiple VM ...
user avatar
0 votes
1 answer
1k views

How to set up single client TAP/TUN on the client for my OpenVPN?

My laptop OpenVPN client establishes a TAP device. My client config is TUN, though. This devices shows under ifconfig /ALL with the IP 10.8.0.6 and a subnetmask of 255.255.255.252. (!!!) This ...
user avatar
  • 105
0 votes
1 answer
2k views

Can the inet address assigned to P-t-P tun interface be used for a client inet address if the server runs out of all addresses within a subnet?

I have an OpenVPN server with an Inet address 10.8.0.1 serving the subnet 10.8.0.0/24. I have two clients connected to this server and the status log (/etc/openvpn/openvpn-status.log)reads as follows: ...
user avatar
2 votes
1 answer
2k views

Issues setting up TINC on Mac OSX 10.12.2

I have TINC setup on a few linux boxes and they are working great. linux001 (static ip vps - 10.0.0.1) macosx002 (connects to linux001 - 10.0.0.2) linux050 (connects to linux001 - 10.0.0.50) I also ...
user avatar
0 votes
1 answer
188 views

OpenVPN allows some users to jump to other hosts in the LAN

All users can connect to host where OpenVPN runs but some users can jump to other hosts in the LAN. For example, foo user can reach host 10.2.0.1/32 (where OpenVPN runs) and hosts at 10.0.0.0/24 but ...
user avatar
  • 1
0 votes
1 answer
2k views

openvpn - Why do I have 2 tun interfaces on my server?

I have just configured watching this Hak5 video I found on Youtube. But what is bothering me is that why do I have two tun interfaces on my server ? Namely-: tun0 Link encap:UNSPEC HWaddr 00-...
user avatar
  • 103
0 votes
1 answer
384 views

Why is my host not receiving packets sent across tun0?

I have a tun0 interface set up which allows packets to be sent as such: HOST (aaaa::1) ----> tun0 ----> SLIP ----> Router (aaaa::200:0:0:1) The router receives the packets, and can send back a ...
user avatar
  • 101
0 votes
1 answer
2k views

How do I route traffic over the a tun0 device (IPSec VPN connection)?

I've set up an IPSec VPN tunnel between my laptop and work. The tunnel gets established, but routing does not. The relevant part of ifconfig is : eth0 Link encap:Ethernet HWaddr d4:be:d9:6f:a7:...
user avatar
  • 1,456
0 votes
1 answer
37 views

Endpoint to security gateway tunnel

I want to establish a connection between the client and the proxy server through a VPN tunnel in android device. I want to do this at layer 2 or 3 , where a packet can captured and encrypted. Please ...
user avatar
5 votes
3 answers
581 views

How do VPN servers/clients avoid routing their own remote connection packets through themself?

I am trying to conceptualise how networking works under the hood for linux VPNs which use TUN interfaces. My current best guess is as follows (please correct me): Connection established to remote ...
user avatar
1 vote
0 answers
694 views

Direct all traffic between Eth0:1 interface and VPN Tun0

If answered correctly this question will show you how to link a 2nd public IP address on a machine to a VPN server tunnel on that machine, so that the remote VPN client (running a server), sees this ...
user avatar
0 votes
1 answer
350 views

OpenVPN - connect server as client to itself

I have tried to setup a small openvpn network but I ran into one big problem. I have a server and a machine at home. So I created a openvpn server on my machine and a configured the client on the ...
user avatar
1 vote
1 answer
1k views

Prevent IP Spoofing on OpenVPN tun

I have a question regarding IP Spoofing and authentication. I have an OpenVPN server in TUN mode with many untrusted clients in the same VPN network, and I was wondering if one client is able to spoof ...
user avatar
  • 13
0 votes
1 answer
1k views

/dev/net/tun exists, but OpenVPN is refussing to find it

I'm currently configuring an OpenVPN client on an arm microprocessor running debian squeeze, however I'm running into problems. As the below shows, /dev/net/tun exists: debarm:~# whoami root debarm:~...
user avatar
11 votes
1 answer
12k views

How to create /dev/tun device inside unprivileged LXC container?

This question is similar to No tun device in lxc guest for openvpn . The LXC has evolved and the unprivileged LXC containers were introduced recently that offer another layer of security against ...
user avatar
1 vote
1 answer
6k views

What exactly happens to packets written to a TUN/TAP device?

I'm trying to send packets to an application listening on eth0 from machine's user-space as if they were coming from a remote machine. What I can't seem to find good documentation for is the exact ...
user avatar
0 votes
0 answers
91 views

OpenVPN tunnel not able to support secure connect request

In CentOS 7 host we have installed openvpn package and did create an tunnel using OpenVPN tunneling for eth9 and tap9. Everthing work fine for unsecure connection but when we try to connect to server ...
user avatar
  • 225
2 votes
2 answers
1k views

Use OpenVPN tun device for specific request

I have setup an OpenVPN connection with the route-nopull configuration. So now no special routes have been added to the client's configuration and only a TUN device is created, like so: tun0 ...
user avatar
  • 1,045
0 votes
1 answer
177 views

Setup openvpn as interface device only

I just setup OpenVPN client using this guide on The Geek Stuff But now (somewhat as expected) all my traffic is routed through the VPN. I actually just want to set up the interface device. Does ...
user avatar
  • 1,045
0 votes
2 answers
3k views

OpenVPN Tunnel between two LANs, traffic dropped on the way?

I'd like to create a OpenVPN Tunnel between to LANs 192.168.1.0/24 and 192.168.2.0/24. However somehow packets entering the tunnel on one side don't come out of the other side ... The following ...
user avatar
  • 101
0 votes
2 answers
4k views

openvpn connection has established but cant ping the server

I have a openvz vps and setup a openvpn server, and I successfully connect to the server in my ubuntu 14.10 client. server.conf: port 1199 proto udp dev tun ca ca.crt cert server.crt key server.key ...
user avatar
  • 101
0 votes
1 answer
689 views

TCP RST from telnet/ssh daemons when connecting from openvpn

I have LAN_1 and LAN_2 interconnected with an openvpn tunnel terminated ona pair of SOHO routers running busybox. One of the vpn purpose is to allow clients on both LAN_1 and LAN_2, to administer the ...
user avatar
1 vote
0 answers
575 views

TUN/TAP VPN no internet connection

I have set up a tun/tap vpn to a VPS. For this, I created a 10/24 network and gave the server the IP 10.0.0.100 and my client got 10.0.0.200. I can now successfully ping the server / access my mail ...
user avatar
  • 11
4 votes
1 answer
13k views

iptables: access connected openvpn client from the LAN with the VPN server

I have what is essentially a routing problem, and I'm not familiar enough with routing and iptables to effectively troubleshoot and set up my network needs. What's working I have an openVPN network ...
user avatar
  • 475
1 vote
1 answer
5k views

How to make Tun module running at linux start

i installed Tun using: modprobe tun then did: lsmod | grep tun tun 83840 0 Please how to make Tun running at reboot? This is written on Hamachi website: ...Then add tun to ...
user avatar
  • 376
0 votes
1 answer
862 views

Unbridged tap device

Good UTC evening! I've created a tap0 device on my host, it looks like: tap0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.0.255 ...
user avatar
  • 103