From owner-freebsd-questions@freebsd.org Mon Mar 19 14:32:47 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E792FF51137 for ; Mon, 19 Mar 2018 14:32:46 +0000 (UTC) (envelope-from sce.tech@imrcom.fr) Received: from mail.imrcom.eu (mail.imrcom.eu [212.83.164.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CE4372235 for ; Mon, 19 Mar 2018 14:32:46 +0000 (UTC) (envelope-from sce.tech@imrcom.fr) Received: from mail.imrcom.eu (localhost [127.0.0.1]) by mail.imrcom.eu (Postfix) with ESMTP id A28EC20092 for ; Mon, 19 Mar 2018 15:32:44 +0100 (CET) Authentication-Results: mail.imrcom.eu (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=imrcom.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=imrcom.fr; h= content-language:content-transfer-encoding:content-type :content-type:in-reply-to:mime-version:user-agent:date:date :message-id:from:from:references:to:subject:subject; s=dkim; t= 1521469962; x=1522333963; bh=RY4SXeeoLEIEc2JdMNTmhC4KGs9r3dw/1Xf fZ+YR7qo=; b=4A3ml5iEXJ5VoVGfJiADLDjTHwK4JLio9bBnKtzWfX8Pg2Qdqpa 9T3SJmMLqqTLqXMJVF15908oEtG3Aoy4e2EMQ7sc/cPoYCZ8jK56KzhCo9U1KVsd qtqIja3xZ5CANwDNMkXfcAx55mIr3XvAzO9pdsK4X36aQKBj/6J6GgJ4= X-Virus-Scanned: Debian amavisd-new at mail.imrcom.eu Received: from mail.imrcom.eu ([127.0.0.1]) by mail.imrcom.eu (mail.imrcom.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Kfyd0hS8mibY for ; Mon, 19 Mar 2018 15:32:42 +0100 (CET) Received: from [172.20.0.15] (LStLambert-656-1-103-134.w80-14.abo.wanadoo.fr [80.14.151.134]) by mail.imrcom.eu (Postfix) with ESMTPSA id 44F6720091 for ; Mon, 19 Mar 2018 15:32:42 +0100 (CET) Subject: Re: How configure a point to point connection? To: freebsd-questions@freebsd.org References: <20180319113653.b24768dae3c1f5535d73acaa@sohara.org> From: Martin LEUSCH Message-ID: <26bf0b09-e9e2-4537-5817-0d8ad69badf2@imrcom.fr> Date: Mon, 19 Mar 2018 15:32:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180319113653.b24768dae3c1f5535d73acaa@sohara.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2018 14:32:47 -0000 Le 19/03/2018 à 12:36, Steve O'Hara-Smith a écrit : > On Mon, 19 Mar 2018 11:53:48 +0100 > Martin LEUSCH wrote: > >> Hi, >> >> I want to add a public IP of my hosting provider to a FreeBSD VM. To do >> this I have to reach a remote gateway with a point to point connection >> but I didn't how how to do that on FreeBSD. Under Debian GNU/Linux, I >> just have to add the gateway to the "pointopoint" parameters in >> /etc/network/interfaces: >> >> iface eth0 inet static >> address my.public.ip >> netmask 255.255.255.255 >> pointopoint my.provider.gw >> gateway my.provider.gw >> >> I tried the following commands: >> >> ifconfig vtnet0 inet my.public.ip my.provider.gw netmask 255.255.255.255 >> route add default my.provider.gw >> >> When I tried to add the default route, I get "Network is unreachable". > Try losing the netmask 255.255.255.255 which puts only a single > address on the segment making the default route unreachable. > Actually I cannot play with the netmask as my public IP and the remote gateway are not on the same IP range but it was effectively a routing issue. I simply have to add a static route to the remote gateway via the network interface of my VM:      route add -host my.provider.gw -interface vtnet0