How delete the interface route in FreeBSD 9.2 (MPD5)?

Eugene Grosbein eugen at grosbein.net
Sat Oct 26 09:23:02 UTC 2013


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 at 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 at Test2:/home/mrstalker # route delete 85.21.230.206
>>> delete host 85.21.230.206
>>> root at 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 at Eviko:/home/mrstalker # netstat -nrf inet|grep 85.21.230.206
> 85.21.230.206      10.165.32.1        UGHS        0        0    re0
> root at Eviko:/home/mrstalker # service mpd5 start
> Starting mpd5.
> root at 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



More information about the freebsd-net mailing list