From owner-freebsd-questions@FreeBSD.ORG Wed Dec 13 15:48:40 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3AC7B16A403 for ; Wed, 13 Dec 2006 15:48:40 +0000 (UTC) (envelope-from phatfish@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id D8AD143CB0 for ; Wed, 13 Dec 2006 15:47:08 +0000 (GMT) (envelope-from phatfish@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so530384nfc for ; Wed, 13 Dec 2006 07:48:36 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Kd/r355KppxHONqjEwVYkB5HQjm1raQWqio0D9zLyK1978osJGYcU+di/TLgZ93W4rdM4UHV3NZPmTUcOCeiiYze5O/UYWcfJVBRqQVf4/w4Yb3CL0qrrMPYo0Eafhlpq4y935TG7F9Ze461Alm/yWiYa/v5HOBnzCi+txg07E8= Received: by 10.82.165.1 with SMTP id n1mr183157bue.1166024916497; Wed, 13 Dec 2006 07:48:36 -0800 (PST) Received: by 10.82.167.16 with HTTP; Wed, 13 Dec 2006 07:48:36 -0800 (PST) Message-ID: <718eeb340612130748p4a96f640qa3a9693f3e8ad4f7@mail.gmail.com> Date: Wed, 13 Dec 2006 15:48:36 +0000 From: Chris To: freebsd-questions@freebsd.org In-Reply-To: <20061213141914.GR46624@ns2.wananchi.com> MIME-Version: 1.0 References: <20061213141914.GR46624@ns2.wananchi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Newbie on tunnelling 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: Wed, 13 Dec 2006 15:48:40 -0000 Loading a kernel module at boot time is done by editing (or creating) loader.conf in /boot. And adding [module_name]_load="YES" to load a module, so: if_gre_load="YES". Edit rc.conf for startup configurations. Take a look at "man rc.conf". The sections on network_interfaces and static_routes will be of some help. On 13/12/06, Odhiambo Washington wrote: > > I need to create a VPN between two offices. Each has a LAN that is > behind a FreeBSD router/firewall. > > I have managed to do the following manually: > > hq-office: > kldload if_gre.ko > ifconfig gre0 create > ifconfig gre0 tunnel 62.8.68.94 62.8.82.142 > ifconfig gre0 inet 10.0.0.1 10.0.0.2 netmask 255.255.255.252 > route add -net 192.168.1.0/24 -interface gre0 > > sub-office: > kldload if_gre.ko > ifconfig gre0 create > ifconfig gre0 tunnel 62.8.82.142 62.8.68.94 > ifconfig gre0 inet 10.0.0.2 10.0.0.1 netmask 255.255.255.252 > route add -net 192.168.0.0/24 -interface gre0 > > Now my simple question is: How do I automate these commands during boot > time? >