Есть сервер FreeBSD 7.2 Realease который подключён к сети провайдера в которой интернет раздаётся через подключение vpn. Схема
router rl0 FreeBSD rl1
10.3.11.3 <----172.16.x.x 192.168.0.1--->192.168.0.90 192.168.1.1----> lanна сервере настроен mpd5(установлен как пакет, pkg_add) pptp_client для подключения к 10.3.11.3.
Подключение есть, присваивается адрес но интернета нет, не пингуется ни сервер ни присвоеный адрес. Подскажите что делать?
Настройки mpd.conf:
startup:
# configure mpd users
# set user foo bar admin
# set user foo1 bar1
# configure the console
# set console self 127.0.0.1 5005
# set console open
# configure the web server
# set web self 0.0.0.0 5006
# set web open
#
# Default configuration is "dialup"
default:
load pptp_client
pptp_client:
create bundle static B1
set iface up-script /etc/my_bsd/up.sh
set iface down-script /etc/my_bsd/down.sh
create link static L1 pptp
set link action bundle B1
set auth authname LOGIN
set auth password PASS
set link max-redial 0
set link mtu 1460
set link keep-alive 20 75
set pptp peer 10.3.11.3
set pptp disable windowing
open
///////////////////////////////////////////////////////////////////////////
up.sh:
#!/bin/sh
iface=$1
localip=$3
remoteip=$4
defgate=`netstat -rn | grep default | awk '{print $2}'`
/sbin/route change default $remoteip -ifp $iface
echo $defgate > /tmp/dr
///////////////////////////////////////////////////////////////////////////
down.sh:
#!/bin/sh
iface=$1
remoteip=$4
defgate=`cat /tmp/dr`
/sbin/route -q del $remoteip
/sbin/route change default $defgate
rm -f /var/dr
///////////////////////////////////////////////////////////////////////////
До подключения:
# netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.0.10 UGS 0 92 rl0
10.3.11.3 192.168.0.10 UGHS 0 331 rl0
127.0.0.1 127.0.0.1 UH 0 4 lo0
192.168.0.0/24 link#1 UC 0 0 rl0
192.168.0.10 00:1e:58:c5:8c:b1 UHLW 3 28 rl0 924
192.168.0.50 00:15:58:16:e2:41 UHLW 1 275 rl0 963
192.168.0.90 00:02:44:a8:f4:f6 UHLW 1 4 lo0
192.168.1.0/24 link#2 UC 0 0 rl1
///////////////////////////////////////////////////////////////////////////
После подключения
# netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif Expire
default 10.3.128.1 UGS 0 92 ng0
10.3.11.3 192.168.0.10 UGHS 0 347 rl0
10.3.128.1 10.3.149.11 UH 1 0 ng0
127.0.0.1 127.0.0.1 UH 0 4 lo0
192.168.0.0/24 link#1 UC 0 0 rl0
192.168.0.10 00:1e:58:c5:8c:b1 UHLW 2 28 rl0 1198
192.168.0.50 00:15:58:16:e2:41 UHLW 1 301 rl0 920
192.168.0.90 00:02:44:a8:f4:f6 UHLW 1 4 lo0
192.168.1.0/24 link#2 UC 0 0 rl1
///////////////////////////////////////////////////////////////////////////
# ifconfig
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 00:02:44:a8:f4:f6
inet 192.168.0.90 netmask 0xffffff00 broadcast 192.168.0.255
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
rl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 00:c0:26:2c:06:a8
inet6 fe80::2c0:26ff:fe2c:6a8%rl1 prefixlen 64 scopeid 0x2
inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255
media: Ethernet autoselect (none)
status: no carrier
pfsync0: flags=0<> metric 0 mtu 1460
syncpeer: 224.0.0.240 maxupd: 128
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
pflog0: flags=0<> metric 0 mtu 33204
ng0: flags=88d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST> metric 0 mtu 552
inet 10.3.149.11 --> 10.3.128.1 netmask 0xffffffff
Как я и писал не пингуются ни 10.3.149.11 ни 10.3.128.1, если добавить маршрут:
10.3.149.11 127.0.0.1 UH 0 4 lo0
то начинает пинговатся 10.3.149.11, но шлюз 10.3.128.1 не пингуется и инета нет.