<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>181000</bug_id>
          
          <creation_ts>2007-06-05 20:20 0000</creation_ts>
          <short_desc>net-misc/openvpn-2.1 initscript breaks non client-server setups</short_desc>
          <delta_ts>2007-06-29 09:19:30 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>gentoo.daniels@chacal.com.ar</reporter>
          <assigned_to>uberlord@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>gentoo.daniels@chacal.com.ar</who>
            <bug_when>2007-06-05 20:20:20 0000</bug_when>
            <thetext>Initscript for openvpn 2.1 assumes a client/server setup. It relies on finding a &quot;remote&quot; setting in the config file to decide this is the client side of the connection. In such case it starts openvpn with special &quot;client&quot; arguments like &quot;--no-bind&quot; and up/down scripts to handle DNS configuration.

However, openvpn is also used in true &quot;peer&quot; mode with a static key, like when connecting two routers to route traffic between different networks. Although &quot;remote&quot; options are usually present on both sides, none of them is a &quot;client&quot; in the way initscript considers it. They should be started in the way initscript now starts a &quot;server&quot;.

In this scenario DNS configuration is usually static or managed outside of openvpn configuration, but I will not reopen the discussion in bug#132932.

The biggest problem lies in the argument &quot;nobind&quot; that intiscript uses to start what it considers a &quot;client&quot;, it makes both enpoints to talk on random ports, not listening on the right port for the other side (it gets more funny if you consider firewall rules).

I don&apos;t see an easy way to decide between &quot;I am a client in a client/server configuration&quot; or &quot;I am a peer in a peer configuration&quot;, since &quot;mode p2p&quot; just means &quot;I am NOT a server&quot;. 


Reproducible: Always

Steps to Reproduce:</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jakub@gentoo.org</who>
            <bug_when>2007-06-05 23:48:45 0000</bug_when>
            <thetext>*** Bug 181031 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>uberlord@gentoo.org</who>
            <bug_when>2007-06-29 09:19:30 0000</bug_when>
            <thetext>Good points.

I&apos;ve added DETECT_CLIENT variable to /etc/conf.d/openvpn which toggles this behaviour which should fix this.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>