From owner-freebsd-questions@FreeBSD.ORG Wed Dec 13 14:19:23 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 187A616A403 for ; Wed, 13 Dec 2006 14:19:23 +0000 (UTC) (envelope-from wash@wananchi.com) Received: from ns2.wananchi.com (ns2.wananchi.com [62.8.64.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEE0143CC1 for ; Wed, 13 Dec 2006 14:17:50 +0000 (GMT) (envelope-from wash@wananchi.com) Received: from wash by ns2.wananchi.com with local (Exim 4.63 #0 (FreeBSD 4.11-STABLE)) id 1GuUx1-0007MZ-07 by authid for ; Wed, 13 Dec 2006 17:19:15 +0300 Date: Wed, 13 Dec 2006 17:19:14 +0300 From: Odhiambo Washington To: freebsd-questions@freebsd.org Message-ID: <20061213141914.GR46624@ns2.wananchi.com> Mail-Followup-To: Odhiambo Washington , freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Disclaimer: Any views expressed in this message, where not explicitly attributed otherwise, are mine alone!. X-Mailer: Mutt 1.5.13 (2006-08-11) X-Designation: Systems Administrator, Wananchi Online Ltd. X-Location: Nairobi, KE, East Africa. User-Agent: Mutt/1.5.13 (2006-08-11) Subject: 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 14:19:23 -0000 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? -Wash http://www.netmeister.org/news/learn2quote.html DISCLAIMER: See http://www.wananchi.com/bms/terms.php -- +======================================================================+ |\ _,,,---,,_ | Odhiambo Washington Zzz /,`.-'`' -. ;-;;,_ | Wananchi Online Ltd. www.wananchi.com |,4- ) )-,_. ,\ ( `'-'| Tel: +254 20 313985-9 +254 20 313922 '---''(_/--' `-'\_) | GSM: +254 722 743223 +254 733 744121 +======================================================================+ This is an unauthorized cybernetic announcement.