From owner-freebsd-net@FreeBSD.ORG Sat Oct 26 09:23:02 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A5795357 for ; Sat, 26 Oct 2013 09:23:02 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13::5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EB17D21B5 for ; Sat, 26 Oct 2013 09:23:01 +0000 (UTC) X-Envelope-From: eugen@grosbein.net X-Envelope-To: freebsd-net@freebsd.org Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.14.7/8.14.7) with ESMTP id r9Q9MpZX078071; Sat, 26 Oct 2013 16:22:52 +0700 (NOVT) (envelope-from eugen@grosbein.net) Message-ID: <526B89EB.7090409@grosbein.net> Date: Sat, 26 Oct 2013 16:22:51 +0700 From: Eugene Grosbein User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130415 Thunderbird/17.0.5 MIME-Version: 1.0 To: MrStalker Subject: Re: How delete the interface route in FreeBSD 9.2 (MPD5)? References: <63600.37.147.154.147.1382647335.squirrel@37.147.154.147> <526A18FC.6030402@rdtc.ru> <526A894E.1070305@simvol7.ru> In-Reply-To: <526A894E.1070305@simvol7.ru> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.3 required=5.0 tests=ALL_TRUSTED,BAYES_00, LOCAL_FROM autolearn=no version=3.3.2 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eg.sd.rdtc.ru Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Oct 2013 09:23:02 -0000 On 25.10.2013 22:07, MrStalker wrote: > > 25.10.2013 11:08, Eugene Grosbein пишет: >> On 25.10.2013 03:42, MrStalker wrote: >>> Hello! >>> For my internet provider (L2TP VPN connection) is required a route to the VPN server via local gate. >>> I'm using MPD5. >>> But, MPD5 creates route to the VPN server via its same interface... >>> >>> root@Eviko:/home/mrstalker # netstat -nrf inet >>> Routing tables >>> >>> Internet: >>> Destination Gateway Flags Refs Use Netif Expire >>> default 85.21.230.206 UGS 0 8 ng0 >>> 85.21.230.206 link#7 UH 0 8 ng0 >>> >>> What will not work... >>> >>> However earlier, it was possible delete this route and then create right route. >>> root@Test2:/home/mrstalker # route delete 85.21.230.206 >>> delete host 85.21.230.206 >>> root@Test2:/home/mrstalker # route add 85.21.230.206 10.165.32.1 >>> add host 85.21.230.206: gateway 10.165.32.1 >>> >>> When i trying FreeBSD 9.2, this is no longer working... >>> Thread about it at the forumhttp://forums.freebsd.org/showthread.php?t=42547 >>> Later I found source of problem: >>> http://svnweb.freebsd.org/base?view=revision&revision=248895 >>> >>> Now I can't delete the interface route (ng0). What does impossible work with the internet provider. >>> >>> How? How now resolve this problem? >>> I need to add route to the vpn server via local gate... >>> >>> Please help me resolve this trouble. Since the release of FreeBSD 9.2 I trying to find a solution. >> You have to create your static route to vpn server before mpd5 starts. >> Use /etc/rc.conf: >> >> static_routes="vpn" >> route_vpn="85.21.230.206 10.165.32.1" >> >> Eugene Grosbein > Unfortunately failed... > > root@Eviko:/home/mrstalker # netstat -nrf inet|grep 85.21.230.206 > 85.21.230.206 10.165.32.1 UGHS 0 0 re0 > root@Eviko:/home/mrstalker # service mpd5 start > Starting mpd5. > root@Eviko:/home/mrstalker # netstat -nrf inet|grep 85.21.230.206 > 85.21.230.206 link#7 UH 0 4 ng0 > > Route via ng0 overwrites the static route. You should try to prevent mpd from installing this route (and removing yours static one) in first place. Try to add this command to your mpd.conf to bundle context: set ipcp ranges 0.0.0.0/0 1.1.1.1/0