From owner-freebsd-net@FreeBSD.ORG Fri Oct 25 15:08:05 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 5DBC728D for ; Fri, 25 Oct 2013 15:08:05 +0000 (UTC) (envelope-from mrstalker@simvol7.ru) Received: from smtp1.mtw.ru (smtp.mtw.ru [37.228.88.77]) by mx1.freebsd.org (Postfix) with ESMTP id 1A4232C76 for ; Fri, 25 Oct 2013 15:08:04 +0000 (UTC) Received: from [127.0.0.1] (37-147-128-249.broadband.corbina.ru [37.147.128.249]) (Authenticated sender: mrstalker-simvol7ru) by smtp1.mtw.ru (Postfix) with ESMTPSA id 25415E8A0 for ; Fri, 25 Oct 2013 18:56:15 +0400 (MSK) Message-ID: <526A894E.1070305@simvol7.ru> Date: Fri, 25 Oct 2013 19:07:58 +0400 From: MrStalker User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: freebsd-net@freebsd.org Subject: 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> In-Reply-To: <526A18FC.6030402@rdtc.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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: Fri, 25 Oct 2013 15:08:05 -0000 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.