From owner-freebsd-questions@FreeBSD.ORG Mon Jun 27 23:06:47 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D581F16A436 for ; Mon, 27 Jun 2005 23:06:47 +0000 (GMT) (envelope-from drew@mykitchentable.net) Received: from relay04.roc.ny.frontiernet.net (relay04.roc.ny.frontiernet.net [66.133.182.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7172443D53 for ; Mon, 27 Jun 2005 23:06:47 +0000 (GMT) (envelope-from drew@mykitchentable.net) Received: from filter08.roc.ny.frontiernet.net (filter08.roc.ny.frontiernet.net [66.133.183.75]) by relay04.roc.ny.frontiernet.net (Postfix) with ESMTP id B369A358498 for ; Mon, 27 Jun 2005 23:06:46 +0000 (UTC) Received: from relay04.roc.ny.frontiernet.net ([66.133.182.167]) by filter08.roc.ny.frontiernet.net (filter08.roc.ny.frontiernet.net [66.133.183.75]) (amavisd-new, port 10024) with LMTP id 11974-08-100 for ; Mon, 27 Jun 2005 23:06:46 +0000 (UTC) Received: from blacklamb.mykitchentable.net (67-137-46-191.dsl2.elk.ca.frontiernet.net [67.137.46.191]) by relay04.roc.ny.frontiernet.net (Postfix) with ESMTP id 69F983582E6 for ; Mon, 27 Jun 2005 23:06:44 +0000 (UTC) Received: from [165.107.42.217] (unknown [165.107.42.217]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by blacklamb.mykitchentable.net (Postfix) with ESMTP id 3601C3BF3AB for ; Mon, 27 Jun 2005 16:06:43 -0700 (PDT) Message-ID: <42C0863D.2000003@mykitchentable.net> Date: Mon, 27 Jun 2005 16:05:33 -0700 From: Drew Tomlinson User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: FreeBSD Questions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20040701 (2.0) at filter08.roc.ny.frontiernet.net Subject: How to Start OpenVPN? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2005 23:06:48 -0000 I installed OpenVPN 2.0 via the ports on a 4.11 machine. I can start it just find by these two steps: 1. cd /usr/local/etc/openvpn 2. openvpn server.conf & The OpenVPN man page suggests that using the '--daemon' switch will make OpenVPN run as a daemon but it doesn't work for me. No error message but no process started. There are no entries in the log file. The port installed /usr/local/etc/rc.d/openvpn.sh.sample. I've looked at the script but all it does is start the tun interface. Thus I have attempted to modify it to include actually starting the OpenVPN daemon. Here is my script: case x$1 in xstart) echo -e "Starting OpenVPN\n" ; exec kldload if_tap ; openvpn --daemon \ --cd /usr/local/etc/openvpn \ --writepid /var/run/openvpn.pid \ --config server.conf.nogateway ;; xstop) echo -e "Stopping OpenVPN\n" ; exec kldunload if_tap ; kill `cat /var/run/openvpn.pid` ; rm /var/run/openvpn.pid ;; *) echo >&2 "Usage: $0 {start|stop}" esac Can anyone tell me my error? Thanks, Drew -- Visit The Alchemist's Warehouse Magic Tricks, DVDs, Videos, Books, & More! http://www.alchemistswarehouse.com