Re: recent change to ifconfig breaks OpenVPN?

From: Bjoern A. Zeeb <bzeeb-lists_at_lists.zabbadoz.net>
Date: Thu, 30 Jul 2009 22:36:26 +0000 (UTC)
On Thu, 30 Jul 2009, Julian Elischer wrote:

Hi,

some comments though it's late and I just got back from a UG meeting.


> note that he is using *ether* which seems odd. Since we are talking about 
> tun.  Is this the correct variable?

yes:
net.link.ether.inet.useloopback: 1
net.inet6.icmp6.nd6_useloopback: 1

(I guess historical accident).


Stefan Bethke <stb_at_lassitu.de> wrote:

> The problem appears to be that OpenVPN invokes ifconfig with
> incorrect (but previously working) parameters, namely "ifconfig tun0
> local_ip local_ip" instead of "ifconfig tun0 local_ip remote_ip".

Exactly, that is the problem.  So this is a ports issue.


> p.s. log output wrt ifconfig:
>
> FreeBSD (working up to last week, continues to work in -stable):
> /sbin/ifconfig tun1 44.128.127.2 44.128.127.2 netmask 255.255.255.0 mtu 1500 up

The ifconfig error you can see in HEAD is, as pointed out before, from installing
the additional route for the local address to the local machine that the
command above already installs for the remote end. Changing
 	sysctl net.link.ether.inet.useloopback=0
and the error goes away, as the extra route is not installed by the
kernel and everything seems fine (to answer Qing).

I would say that this is bad but still works (even with the ioctl
error):

tun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
         inet 44.128.127.2 --> 44.128.127.2 netmask 0xffffff00

The problem is that seems bogus; It means that you reach the remote end
on the local address; so it's kind of
 	ifconfig lo0 44.128.127.2/32 alias
You will never reach the remote ptp end this way and that'll not be any
help with openvpn.  I wonder what got the packets out in the past;
probably lax checking and some other magic.

Side-note: the same applies to a gif tunnel.


> Linux:
> /sbin/ifconfig tun4 44.128.127.15 netmask 255.255.255.0 mtu 1500 broadcast 44.128.127.255
>
> It is interesting to note that tun4 on the Linux box has the same local and remote address:
> /sbin/ifconfig tun4
> tun4      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
>           inet addr:44.128.127.15  P-t-P:44.128.127.15 Mask:255.255.255.0
>           UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1

Yeah that is as great as we are or rather were.

So really, fix the openvpn scripts that assign the address to
interfaces to do something that would make sense from the ``man ip''
(not the literal command) point of view.  Just that it's "working"
somewhere or used to work elswhere neither means that it was correct
nor made sense at any time before.


/bz

-- 
Bjoern A. Zeeb                      The greatest risk is not taking one.
Received on Thu Jul 30 2009 - 20:40:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:53 UTC