Questions tagged [tunneling]
166 questions
151
votes
8 answers
Simple way to create a tunnel from one local port to another?
I have a development server, which is only accessible from 127.0.0.1:8000, not 192.168.1.x:8000. As a quick hack, is there a way to set up something to listen on another port (say, 8001) so that from the local network I could connect…
waitinforatrain
- 1,615
- 2
- 11
- 7
44
votes
4 answers
ssh into a server which is connected to a VPN service
I have a virtual private server, which I would like to run a web server while my server is connected to a VPN service
When the VPN connection to my provider is not up, I can do anything I want with this server, ssh, scp, http etc.
Once the openvpn…
Scott
- 483
- 1
- 5
- 8
29
votes
3 answers
What is the tun network interface for?
I noticed when running ifconfig that there is a network interface called tun0 and it has an ipv4 address. A bit of research shows that it is a tunneling device, but I don't really know how it's used, what's using it, and why it has an IP address.
I…
smcg
- 453
- 1
- 4
- 13
17
votes
6 answers
How to route specific addresses through a tunnel?
There are certain websites/services which I can only access from the subnet on which my server is located (think of the typical intranet scenario). Is there a way to transparently route traffic that go to these addresses through an SSH…
Ruben Vermeersch
- 373
- 1
- 4
- 8
14
votes
1 answer
Understanding tun0 addresses
I have already done some searching and more or less understand what a tun0 interface does. I got the following from various sources,
Packets sent by an operating system via a tun/tap device are delivered
to a user-space program which attaches…
Masroor
- 285
- 2
- 3
- 12
11
votes
1 answer
Forward all ports SSH
I have a question about SSH/Port forwarding. I haven't found the solution anywhere and don't know if there is any.
I have a server behind my NAT box at home. I have port forwarding from my NAT box to my server for SSH on port 22. Hence, I connect to…
Noé Malzieu
- 807
- 3
- 10
- 15
11
votes
2 answers
iptables forward traffic to vpn tunnel if open
I've used the following guide to set up my raspberry pi as an access point:
Raspberry Pi 3 as wifi access point
I'm forwarding wlan0 to eth0 and NATing all my traffic. Works great!
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo…
Shrout1
- 431
- 1
- 6
- 13
10
votes
3 answers
Is it possible to expose TCP tunnel in Linux as special character device?
Recently I found in QNX documentation that it allows to set up message based IPC between processes on separate physical machines by using serial device (dev/serX) and it made me wonder:
Is it possible in Linux to create system-wide special device…
Lapsio
- 1,283
- 2
- 18
- 27
9
votes
1 answer
Why doesn't FTP work through my ssh tunnel?
Computer A (assumed that ip is 44.44.44.44)can ftp the host 130.89.148.12.
ftp 130.89.148.12
Connected to 130.89.148.12.
220 ftp.debian.org FTP server
Name (130.89.148.12:debian8): anonymous
331 Please specify the password.
Password:
230 Login…
showkey
- 79
- 23
- 67
- 128
9
votes
1 answer
How to utilize TUN/TAP tunnel from user program?
I recently discovered the existence of Linux TUN/TAP interfaces and am still trying to understand them. I think I get the basic concept - pseudo devices are created which emulate a network interface and instead of passing data to hardware it is…
Mr. Shickadance
- 6,884
- 6
- 26
- 28
8
votes
2 answers
apt-get via ssh-tunnel if only port 22 is allowed
I have a server which has only access to the outer world via port 22 (for the use of ssh from the server to other computers).
I want to install some packages via apt-get on this server.
Can I achive this with a ssh-tunnel to my super-machine which…
erik
- 16,959
- 4
- 32
- 46
7
votes
1 answer
What is this sit0 device?
I'm setting my computer (running Debian Buster) up for Hurricane Electric's IPv6 tunnel broker. They provide instructions for several configuration methods, but here's for iproute2, which I've been using for testing purposes:
ip tunnel add he-ipv6…
Dominick Pastore
- 805
- 1
- 9
- 19
7
votes
2 answers
Why are incoming packets on a TAP interface seen with tcpdump but not with iptables?
A program injects packets on a Linux TAP interface (these packets are coming from a virtual machine). Specifically, these are DHCP requests (so they're UDP). I can see the packets with tcpdump but not with iptables, and they don't reach the local…
Gilles 'SO- stop being evil'
- 807,993
- 194
- 1,674
- 2,175
6
votes
2 answers
Can't forward traffic from eth to TUN/TAP
I'm trying to forward traffic from a physical interface enp5s0 to a virtual one tun0. The goal is to make tun0 receive essentially all packets from enp5s0.
First, I enable forwarding with a command
sudo sysctl -w net.ipv4.ip_forward=1
Then I create…
Nikita Zeulin
- 61
- 1
- 2
6
votes
2 answers
Restart a specific reverse ssh tunnel?
I have multiple machines in the wild that open reverse ssh connections to my server. Each machine out there is using a different reverse ssh port, which I use to differentiate between the machines. I use these tunnels to log into the machines from…
Christian
- 421
- 5
- 11