[nos-bbs] Problem attaching tun device

Michael Curry dgspotman at gmail.com
Fri Feb 24 01:12:34 EST 2012


> Run the command "tail -f /var/syslog" in one terminal while you (re)start
> jnos in another shell.
> You will see an error logged in syslog right away.
>

Ah, no... it just sits there.  (Actually in my case the command has to be
"tail -f /var/log/syslog".)

But I snuck a bit of code into tun.c to log the value of errno along with
the "unable to setup tunnel" message, and got "1" (EPERM).  And I found in
the nos-bbs archive that there's a message in this thread from Pascal
VE2HOM (which never showed up in my Gmail client, hmm) saying that one
needs to be root to attach the tun device.

So I ran jnos as "sudo ~/bin/jnos", and the error message went away.

(Um, so, did I miss this point in the documentation? I don't recall seeing
anything until VE2HOM's post suggesting that I need to run jnos as root.)

*Anyway*, pressing on to configuring the linux side of the tunnel, *NOW* is
when I start to get messages in syslog:

Feb 23 21:42:08 linuxbox avahi-daemon[692]: Withdrawing workstation service
for tun0.
Feb 23 21:42:08 linuxbox NetworkManager[691]:    SCPlugin-Ifupdown: devices
removed (path: /sys/devices/virtual/net/tun0, iface: tun0)
Feb 23 21:42:23 linuxbox modem-manager: (net/tun0): could not get port's
parent device
Feb 23 21:42:23 linuxbox NetworkManager[691]:    SCPlugin-Ifupdown: devices
added (path: /sys/devices/virtual/net/tun0, iface: tun0)
Feb 23 21:42:23 linuxbox NetworkManager[691]:    SCPlugin-Ifupdown: device
added (path: /sys/devices/virtual/net/tun0, iface: tun0): no ifupdown
configuration found.
Feb 23 21:42:23 linuxbox kernel: [458309.056830] tun0: Disabled Privacy
Extensions

That "no ifupdown configuration found" message doesn't look too good to me.

And, of course, attempting to telnet to the IP address on the jnos end of
the tunnel fails with "telnet: Unable to connect to remote host: Connection
refused".

For what it's worth, the relevant commands in my autoexec.nos are:

ip address 192.168.1.67
attach tun tun0 1500 0
ifconfig tun0 ipaddress 192.168.1.67
ifconfig tun0 netmask   255.255.255.0
ifconfig tun0 mtu       1500
pause 1
shell ifconfig tun0 192.168.1.68 pointopoint 192.168.1.67 mtu 1500 up
route addprivate default tun0

And here's what (linux) "ifconfig tun0" reports:

tun0      Link encap:UNSPEC  HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:192.168.1.68  P-t-P:192.168.1.67  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:40 (40.0 B)  TX bytes:60 (60.0 B)

The "Link encap: UNSPEC" part also looks a little suspicious...

(I suppose it might help if I had some idea what any of this meant! :-)

M
-- 
This cat is pushing a watermelon out of a lake. Your argument is invalid.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tapr.org/pipermail/nos-bbs_lists.tapr.org/attachments/20120223/ed7dce8e/attachment.html>


More information about the nos-bbs mailing list