LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-05-2012, 04:57 PM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
ssh -w (to do tunneling) not accepting TUN device


First I did this as root:
Code:
lorentz/root /root 576# tunctl -u phil -t tun0
Set 'tun0' persistent and owned by uid 600
lorentz/root /root 577# ls -dl /dev/net/tun
crw-rw-rw- 1 root root 10, 200 Jan 31 16:46 /dev/net/tun
lorentz/root /root 578# ifconfig tun0 up 192.168.100.1 netmask 255.255.255.0
lorentz/root /root 579# ifconfig tun0
tun0      Link encap:Ethernet  HWaddr ee:e9:84:2b:cb:8d  
          inet addr:192.168.100.1  Bcast:192.168.100.255  Mask:255.255.255.0
          inet6 addr: fe80::ece9:84ff:fe2b:cb8d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:34 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lorentz/root /root 580#
My understanding is that leaves the device permanently present and controllable by the specified user. So next I tried ssh with the -w option:
Code:
lorentz/phil /home/phil 612> ssh -w tun0 phil@fw1
Bad tun device 'tun0'
lorentz/phil /home/phil 613>
I tried the later under strace and see that ssh is not even opening the /dev/net/tun device to get a descriptor that can be associated with the device side of the tun0 interface.
Code:
lorentz/phil /home/phil 616> ssh -V
OpenSSH_5.5p1 Debian-4ubuntu5, OpenSSL 0.9.8o 01 Jun 2010
lorentz/phil /home/phil 617>
Is this version just not ready to do tunneling?

BTW, I've looked for online HOWTOs to do this, but everything is describing -L and -R type port forwarding, and mislabeling it as tunneling (but I have been guilty of doing that, too).

Last edited by Skaperen; 03-05-2012 at 04:59 PM. Reason: BTW ...
 
Old 03-05-2012, 05:58 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Just FYI, OpenSSH VPN over tun virtual interfaces was added back in v4.3:
http://www.openssh.com/txt/release-4.3

So your OpenSSH version is not the problem.
 
Old 03-05-2012, 06:36 PM   #3
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by anomie View Post
Just FYI, OpenSSH VPN over tun virtual interfaces was added back in v4.3:
http://www.openssh.com/txt/release-4.3

So your OpenSSH version is not the problem.
The state of the tunnel device is also not the problem, because it never checked it. Any idea what might be? Is this support just buggy?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vnuml tun device /dev/net/tun not found. asalford Linux - Networking 1 01-30-2007 10:11 PM
OpenAFS on an OpenVPN tun device Gsee *BSD 0 05-08-2006 05:28 AM
how to allow tun/tap device in firewall? efm Linux - Networking 12 07-22-2005 04:47 AM
TUN device error palanisaravanan Linux - Networking 1 11-24-2004 12:17 AM
Getting FD for an existing tun device alanwolfen Programming 1 10-18-2004 11:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration