Настраиваю у себя PPTP клиент под Linux для подключения к прововскому
интернету. Столкнулся с проблемой настройки роутинга. Ничего не
получается. PPTP клиент запускается и работает, а интернета нет. Помогите пожалуйста!
Моя система: ASPLinux 10 (ядро 2.6.12.2 +патч MPPC/MPPE).
# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:05:5D:6B:4E:8B
inet addr:10.5.24.xx Bcast:10.5.255.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1372 Metric:1
RX packets:360 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:2
collisions:0 txqueuelen:1000
RX bytes:38616 (37.7 Kb) TX bytes:240 (240.0 b)
Interrupt:177 Base address:0xa800
/etc/options.pptp:
lcp-echo-failure 3
lcp-echo-interval 5
+chap
-pap
nobsdcomp
nodeflate
nodefaultroute
mtu 1372
mru 1372
noauth
asyncmap 0
crtscts
lock
hide-password
local
noproxyarp
noipx
/etc/ppp/peers/tunnel:
file /etc/ppp/options.pptp
name "мой логин"
pty "pptp vpn.пров.lan --nolaunchpppd"
/etc/chap-secrets:
"мой логин" "ppp0" "мой пароль"
"мой логин" * "мой пароль"
# pppd call tunnel debug logfd 2 nodetach
using channel 7
Using interface ppp0
Connect: ppp0 <--> /dev/pts/1
...
local IP address 172.xx.xx.xx
remote IP address 192.168.254.25
Script /etc/ppp/ip-up started (pid 20249)
Script /etc/ppp/ip-up finished (pid 20249), status = 0x0
Я считаю, что здесь должен был бы объявиться интернет. А его нет!
# ping ya.ru
PING ya.ru (213.180.204.8) 56(84) bytes of data.
From 10.5.24.254 icmp_seq=0 Destination Net Unreachable
From 10.5.24.254 icmp_seq=1 Destination Net Unreachable
From 10.5.24.254 icmp_seq=2 Destination Net Unreachable
From 10.5.24.254 icmp_seq=3 Destination Net Unreachable
From 10.5.24.254 icmp_seq=4 Destination Net Unreachable
--- ya.ru ping statistics ---
5 packets transmitted, 0 received, +5 errors, 100% packet loss, ...
# ping -i ppp0 ya.ru
ping: bad timing interval.
Роутинг "до":
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.5.24.0 * 255.255.255.0 U 0 0 0 eth0
default 10.5.24.254 0.0.0.0 UG 0 0 0 eth0
Роутинг "после":
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.254.64 * 255.255.255.255 UH 0 0 0 ppp0
10.5.24.0 * 255.255.255.0 U 0 0 0 eth0
default 10.5.24.254 0.0.0.0 UG 0 0 0 eth0
Делал так:
1) менял опцию "nodefaultroute" в файле /etc/ppp/options.pptp на "defaultroute". Получил:
"not replacing existing default route to eth0 [10.5.24.254]"
2) конструкция "route del default" не работает, pppd сразу падает.
3) route add default gw 192.168.254.25 metric 1 -- не помогло.
4) iptables:
# echo "1" > /proc/sys/net/ipv4/ip_forward
# iptables -t nat -A POSTROUTING -s 0.0.0.0 -o ppp0 -j MASQUERADE
# iptables -A FORWARD -s 0.0.0.0 -j ACCEPT
# iptables -A FORWARD -d 0.0.0.0 -j ACCEPT
...не работает.
5) и так тоже не работает =)
# iptables --insert OUTPUT 1 --source 0.0.0.0/0.0.0.0 --destination
192.168.254.25 --jump ACCEPT --out-interface ppp0
# iptables --insert INPUT 1 --source 192.168.254.25 --destination
0.0.0.0/0.0.0.0 --jump ACCEPT --in-interface ppp0
# iptables --insert FORWARD 1 --source 192.168.254.25 --destination
0.0.0.0/0.0.0.0 --jump ACCEPT
6) Вот винда пишет (при соединении с VPN провайдера):
[С:\] netstat -rn
...
255.255.255.255 255.255.255.255 10.5.24.xx 10.5.24.xx 1
255.255.255.255 255.255.255.255 172.xx.xx.xx 172.xx.xx.xx 1
Default Gateway: 172.xx.xx.xx
============================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
10.5.0.0 255.255.0.0 10.5.24.254 1
Может у кого-нибудь глаз зацепит что я делаю не так? Помогите!
Спасибо.
Andrey Masiuk.
masik
26.07.05 09:47:52 MSD