Questions tagged [tun]

The tag has no usage guidance.

26 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
1 answer
2k views

Forward IP packets to tunnel device

I have created an tunnel device using ip tuntap add dev tun0 mode tun user 0 group 0 I then assign it an ip address 192.168.0.1/22 ifconfig tun0 192.168.0.1 netmask 255.255.252.0 On my ethernet ...
Ashwin's user avatar
  • 41
3 votes
0 answers
308 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 <-> ...
Doubidou's user avatar
  • 131
2 votes
0 answers
159 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 ...
LeanMan's user avatar
  • 181
2 votes
0 answers
1k 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 ...
Debashish's user avatar
  • 121
1 vote
0 answers
418 views

what effects performance of a tun/tap or a virtual network interface?

I know what a tun/tap device does in linux. if I create a new tun interface with only a name and assigning an IP address to it, and leave other settings as default, like this: sudo tunctl -t tun0 sudo ...
user3840019's user avatar
1 vote
1 answer
311 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 ...
hamidi's user avatar
  • 21
1 vote
0 answers
775 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 ...
Bob Spar's user avatar
1 vote
0 answers
616 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 ...
Nick's user avatar
  • 11
0 votes
0 answers
23 views

Why Socket bind not work as expected while tun network running?

environment :windows work cases. socket bind nic1 => get external ip => work => confirm ! I got the external ip for nic1. socket bind nic2 => get external ip => work => confirm ! I ...
Jason's user avatar
  • 1
0 votes
0 answers
245 views

NAT Between TUN and Ethernet Network Interfaces

There's a detailed explanation of the setup and my debugging efforts so far, but the main question is at the bottom. I have a setup like so: Machine A has two network interfaces: eth0 (192.168.159.60)...
Jordan's user avatar
  • 117
0 votes
0 answers
58 views

server remot access using VPN FW - TUN vs TAP

I'm trying to improve my home Firewall set up and I'm trying to figure out the best VPN configuration. GOAL: In order to reduce the open ports of my home webserver I thought to use SSH and webmin ...
gipsea's user avatar
  • 1
0 votes
0 answers
273 views

Reply IP packets lost when using eBPF and AF_XDP --- where do they go?

I have a test case eBPF/AF_XDP test case which is supposed to take incoming ethernet packets from an interface, send them to user-space using an AF_XDP socket, filter them according to some criterion (...
Chris Ward's user avatar
0 votes
0 answers
156 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 ...
Sirius Lee's user avatar
0 votes
0 answers
1k 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 ...
sololuvr6969's user avatar
0 votes
0 answers
356 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 ...
M.E.'s user avatar
  • 124
0 votes
0 answers
1k 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 ...
Juan Thomas's user avatar
0 votes
0 answers
1k 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 ...
Bon's user avatar
  • 1
0 votes
1 answer
1k 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 ...
Lewis's user avatar
  • 1
0 votes
0 answers
7k 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 ...
Alexandre Serrano's user avatar
0 votes
0 answers
207 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 ...
frogatto's user avatar
  • 103
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 ...
bomben's user avatar
  • 115
0 votes
1 answer
428 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
0 votes
0 answers
94 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 ...
Abhinav's user avatar
  • 225
0 votes
1 answer
835 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 ...
rokafeller's user avatar
0 votes
1 answer
540 views

bridge on openVPN client

I have some problem with setting up what i call a "remote entry point" (i'm sure ther is a real name for this) First things First : Here is my setup : ||==============================================...
Remy Grandin's user avatar
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:...
sbrattla's user avatar
  • 1,600