Решено:Проблемы с VPN

Для новичков как вообще в Linux, так и в конкретной теме, к которой относится вопрос.

Модератор: Bizdelnick

Аватара пользователя
Or@nge
Сообщения: 9

Решено:Проблемы с VPN

Сообщение Or@nge »

Доброго времени суток!
Пардон, что вновь поднимаю вопрос про впн... сам осилить не могу, надеюсь на помощь гуру =)
Туннель поднимается нормально, но инетовские хосты не пингуются, ни по именам, ни по ip. Понимаю, что проблема с роутингом...

Вот логи:

Код: Выделить всё

[root@localhost orange]# pptp-command start reagent
All routes added.
Tunnel reagent is active on ppp0.  IP Address: 62.63.80.211
Installed /etc/resolv.conf.pptp as /etc/resolv.conf

[root@localhost orange]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:80:48:1A:E0:57
          inet addr:172.16.192.90  Bcast:172.16.207.255  Mask:255.255.240.0
          inet6 addr: fe80::280:48ff:fe1a:e057/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:33630 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1760 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3021924 (2.8 MiB)  TX bytes:124808 (121.8 KiB)
          Interrupt:20

ppp0      Link encap:Point-to-Point Protocol
          inet addr:62.63.80.211  P-t-P:62.63.81.193  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:124 (124.0 b)  TX bytes:130 (130.0 b)

[root@localhost orange]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
80.73.164.146   172.16.192.1    255.255.255.255 UGH   0      0        0 eth0
172.16.207.254  172.16.192.1    255.255.255.255 UGH   0      0        0 eth0
62.63.81.193    *               255.255.255.255 UH    0      0        0 ppp0
80.73.175.2     172.16.192.1    255.255.255.255 UGH   0      0        0 eth0
172.16.192.0    *               255.255.240.0   U     10     0        0 eth0
169.254.0.0     *               255.255.0.0     U     10     0        0 eth0
default         62.63.81.193    0.0.0.0         UG    0      0        0 ppp0

[root@localhost orange]# ping 72.14.207.99
PING 72.14.207.99 (72.14.207.99) 56(84) bytes of data.
From 62.63.80.211 icmp_seq=1 Destination Host Unreachable
From 62.63.80.211 icmp_seq=1 Destination Host Unreachable
From 62.63.80.211 icmp_seq=1 Destination Host Unreachable


Заранее спасибо)
Спасибо сказали:
Skid
Сообщения: 73
ОС: Ubuntu 7.10

Re: Решено:Проблемы с VPN

Сообщение Skid »

Привет. А почему у тебя такое количество интерфейсов eth0, привязанных к разным ip??? помоему это уже путает всю систему..и проверь на всякий случай /etc/resolv.conf, адреса dns-серверов должны быть прописаны.
Но вначале разберись с таким количеством eth0 :)
Спасибо сказали:
Аватара пользователя
Or@nge
Сообщения: 9

Re: Решено:Проблемы с VPN

Сообщение Or@nge »

Это статические маршруты к VPN (172.16.207.254) и DNS (80.73.164.146, 80.73.175.2) и роут на локалку.
А вот это - 169.254.0.0 не знаю откуда взялось, не могу удалить из таблицы. route del 169.254.0.0 не получается((. Правильную команду не подскажете?
Спасибо сказали:
Аватара пользователя
SANTA
Сообщения: 181
ОС: GNU/Linux

Re: Решено:Проблемы с VPN

Сообщение SANTA »

/sbin/route del default netmask 0.0.0.0 gw 62.63.81.193
/sbin/route add default dev ppp0
Спасибо сказали:
Аватара пользователя
Or@nge
Сообщения: 9

Re: Решено:Проблемы с VPN

Сообщение Or@nge »

SANTA писал(а):
03.01.2007 14:19
/sbin/route del default netmask 0.0.0.0 gw 62.63.81.193
/sbin/route add default dev ppp0

Не помогает.
Спасибо сказали:
Аватара пользователя
SANTA
Сообщения: 181
ОС: GNU/Linux

Re: Решено:Проблемы с VPN

Сообщение SANTA »

А что говорит
iptables -L

Вообще после того как прописал мои строчки, скинь вывод
/sbin/route -n
Спасибо сказали:
Аватара пользователя
Or@nge
Сообщения: 9

Re: Решено:Проблемы с VPN

Сообщение Or@nge »

Код: Выделить всё

[root@localhost orange]# /sbin/route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
80.73.164.146   172.16.192.1    255.255.255.255 UGH   0      0        0 eth0
172.16.207.254  172.16.192.1    255.255.255.255 UGH   0      0        0 eth0
62.63.81.193    0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
80.73.175.2     172.16.192.1    255.255.255.255 UGH   0      0        0 eth0
172.16.192.0    0.0.0.0         255.255.240.0   U     10     0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     10     0        0 eth0
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 ppp0
Спасибо сказали:
Аватара пользователя
SANTA
Сообщения: 181
ОС: GNU/Linux

Re: Решено:Проблемы с VPN

Сообщение SANTA »

/sbin/route del -net 169.254.0.0 netsmask 255.255.0.0 dev eth0
Спасибо сказали:
Аватара пользователя
Or@nge
Сообщения: 9

Re: Решено:Проблемы с VPN

Сообщение Or@nge »

SANTA писал(а):
03.01.2007 18:59
/sbin/route del -net 169.254.0.0 netsmask 255.255.0.0 dev eth0

За это спасибо)) Но пинга всё равно нет...
Проблема не может быть в /etc/ppp/options.pptp?

Код: Выделить всё

# Lock the port
#
lock

#
# We don't need the tunnel server to authenticate itself
#
noauth

#
# Turn off transmission protocols we know won't be used
#
nobsdcomp
nodeflate

#
# We want MPPE
#
#mppe no40
#mppe no56
#mppe no128
#mppe required,stateless

# needed for W2K3 anyway
refuse-eap

#
# We want a sane mtu/mru
#
#mtu 1000
#mru 1000

#
# Time this thing out of it goes poof
#
#lcp-echo-failure 10
#lcp-echo-interval 10
Спасибо сказали:
Аватара пользователя
SANTA
Сообщения: 181
ОС: GNU/Linux

Re: Решено:Проблемы с VPN

Сообщение SANTA »

А если
ping -I ppp0 ya.ru

Да и вывод
iptables -L
желательно
Спасибо сказали:
Аватара пользователя
Or@nge
Сообщения: 9

Re: Решено:Проблемы с VPN

Сообщение Or@nge »

Код: Выделить всё

[root@localhost orange]# pptp-command start reagent
Route: del default added
Route: add default dev ppp0 added
All routes added.
Tunnel reagent is active on ppp0.  IP Address: 62.63.80.250
Installed /etc/resolv.conf.pptp as /etc/resolv.conf
[root@localhost orange]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
62.63.81.193    0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
172.16.192.0    0.0.0.0         255.255.240.0   U     10     0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     10     0        0 eth0
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 ppp0
[root@localhost orange]# ping -I ppp0 72.14.207.99
PING 72.14.207.99 (72.14.207.99) from 62.63.80.250 ppp0: 56(84) bytes of data.
From 62.63.80.250 icmp_seq=1 Destination Host Unreachable
From 62.63.80.250 icmp_seq=1 Destination Host Unreachable
From 62.63.80.250 icmp_seq=1 Destination Host Unreachable
....
--- 72.14.207.99 ping statistics ---
0 packets transmitted, 0 received, +199 errors

[root@localhost orange]# iptables -L
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
Ifw        all  --  anywhere             anywhere
eth0_in    all  --  anywhere             anywhere
eth1_in    all  --  anywhere             anywhere
Reject     all  --  anywhere             anywhere
LOG        all  --  anywhere             anywhere            LOG level info prefix `Shorewall:INPUT:REJECT:'
reject     all  --  anywhere             anywhere

Chain FORWARD (policy DROP)
target     prot opt source               destination
eth0_fwd   all  --  anywhere             anywhere
eth1_fwd   all  --  anywhere             anywhere
Reject     all  --  anywhere             anywhere
LOG        all  --  anywhere             anywhere            LOG level info prefix `Shorewall:FORWARD:REJECT:'
reject     all  --  anywhere             anywhere

Chain OUTPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
fw2net     all  --  anywhere             anywhere            policy match dir out pol none
fw2loc     all  --  anywhere             anywhere            policy match dir out pol none
Reject     all  --  anywhere             anywhere
LOG        all  --  anywhere             anywhere            LOG level info prefix `Shorewall:OUTPUT:REJECT:'
reject     all  --  anywhere             anywhere

Chain Drop (1 references)
target     prot opt source               destination
reject     tcp  --  anywhere             anywhere            tcp dpt:auth
dropBcast  all  --  anywhere             anywhere
ACCEPT     icmp --  anywhere             anywhere            icmp fragmentation-needed
ACCEPT     icmp --  anywhere             anywhere            icmp time-exceeded
dropInvalid  all  --  anywhere             anywhere
DROP       udp  --  anywhere             anywhere            multiport dports 135,microsoft-ds
DROP       udp  --  anywhere             anywhere            udp dpts:netbios-ns:netbios-ssn
DROP       udp  --  anywhere             anywhere            udp spt:netbios-ns dpts:1024:65535
DROP       tcp  --  anywhere             anywhere            multiport dports 135,netbios-ssn,microsoft-ds
DROP       udp  --  anywhere             anywhere            udp dpt:1900
dropNotSyn  tcp  --  anywhere             anywhere
DROP       udp  --  anywhere             anywhere            udp spt:domain

Chain Ifw (1 references)
target     prot opt source               destination
RETURN     all  --  anywhere             anywhere            set ifw_wl src
DROP       all  --  anywhere             anywhere            set ifw_bl src
IFWLOG     all  --  anywhere             anywhere            state INVALID,NEW psd weight-threshold: 10 delay-threshold: 10000 lo-ports-weight: 2 hi-ports-weight: 1 IFWLOG prefix 'SCAN'

Chain Reject (4 references)
target     prot opt source               destination
reject     tcp  --  anywhere             anywhere            tcp dpt:auth
dropBcast  all  --  anywhere             anywhere
ACCEPT     icmp --  anywhere             anywhere            icmp fragmentation-needed
ACCEPT     icmp --  anywhere             anywhere            icmp time-exceeded
dropInvalid  all  --  anywhere             anywhere
reject     udp  --  anywhere             anywhere            multiport dports 135,microsoft-ds
reject     udp  --  anywhere             anywhere            udp dpts:netbios-ns:netbios-ssn
reject     udp  --  anywhere             anywhere            udp spt:netbios-ns dpts:1024:65535
reject     tcp  --  anywhere             anywhere            multiport dports 135,netbios-ssn,microsoft-ds
DROP       udp  --  anywhere             anywhere            udp dpt:1900
dropNotSyn  tcp  --  anywhere             anywhere
DROP       udp  --  anywhere             anywhere            udp spt:domain

Chain all2all (0 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
Reject     all  --  anywhere             anywhere
LOG        all  --  anywhere             anywhere            LOG level info prefix `Shorewall:all2all:REJECT:'
reject     all  --  anywhere             anywhere

Chain dropBcast (2 references)
target     prot opt source               destination
DROP       all  --  anywhere             anywhere            PKTTYPE = broadcast
DROP       all  --  anywhere             anywhere            PKTTYPE = multicast

Chain dropInvalid (2 references)
target     prot opt source               destination
DROP       all  --  anywhere             anywhere            state INVALID

Chain dropNotSyn (2 references)
target     prot opt source               destination
DROP       tcp  --  anywhere             anywhere            tcp flags:!FIN,SYN,RST,ACK/SYN

Chain dynamic (4 references)
target     prot opt source               destination

Chain eth0_fwd (1 references)
target     prot opt source               destination
dynamic    all  --  anywhere             anywhere            state INVALID,NEW
net2all    all  --  anywhere             anywhere            policy match dir out pol none

Chain eth0_in (1 references)
target     prot opt source               destination
dynamic    all  --  anywhere             anywhere            state INVALID,NEW
net2all    all  --  anywhere             anywhere            policy match dir in pol none

Chain eth1_fwd (1 references)
target     prot opt source               destination
dynamic    all  --  anywhere             anywhere            state INVALID,NEW
loc2net    all  --  anywhere             anywhere            policy match dir out pol none

Chain eth1_in (1 references)
target     prot opt source               destination
dynamic    all  --  anywhere             anywhere            state INVALID,NEW
loc2fw     all  --  anywhere             anywhere            policy match dir in pol none

Chain fw2loc (1 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere

Chain fw2net (1 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere

Chain loc2fw (1 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere

Chain loc2net (1 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere

Chain logdrop (0 references)
target     prot opt source               destination
LOG        all  --  anywhere             anywhere            LOG level info prefix `Shorewall:logdrop:DROP:'
DROP       all  --  anywhere             anywhere

Chain logreject (0 references)
target     prot opt source               destination
LOG        all  --  anywhere             anywhere            LOG level info prefix `Shorewall:logreject:REJECT:'
reject     all  --  anywhere             anywhere

Chain net2all (2 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
Drop       all  --  anywhere             anywhere
LOG        all  --  anywhere             anywhere            LOG level info prefix `Shorewall:net2all:DROP:'
DROP       all  --  anywhere             anywhere

Chain reject (11 references)
target     prot opt source               destination
DROP       all  --  255.255.255.255      anywhere
DROP       all  --  224.0.0.0/4          anywhere
DROP       all  --  anywhere             anywhere            PKTTYPE = broadcast
DROP       all  --  anywhere             anywhere            PKTTYPE = multicast
DROP       all  --  255.255.255.255      anywhere
DROP       all  --  224.0.0.0/4          anywhere
REJECT     tcp  --  anywhere             anywhere            reject-with tcp-reset
REJECT     udp  --  anywhere             anywhere            reject-with icmp-port-unreachable
REJECT     icmp --  anywhere             anywhere            reject-with icmp-host-unreachable
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain shorewall (0 references)
target     prot opt source               destination

Chain smurfs (0 references)
target     prot opt source               destination
LOG        all  --  172.16.207.255       anywhere            LOG level info prefix `Shorewall:smurfs:DROP:'
DROP       all  --  172.16.207.255       anywhere
LOG        all  --  255.255.255.255      anywhere            LOG level info prefix `Shorewall:smurfs:DROP:'
DROP       all  --  255.255.255.255      anywhere
LOG        all  --  224.0.0.0/4          anywhere            LOG level info prefix `Shorewall:smurfs:DROP:'
DROP       all  --  224.0.0.0/4          anywhere
Спасибо сказали:
Аватара пользователя
SANTA
Сообщения: 181
ОС: GNU/Linux

Re: Решено:Проблемы с VPN

Сообщение SANTA »

iptables -F
и пробуй пингануть
Спасибо сказали:
Аватара пользователя
Or@nge
Сообщения: 9

Re: Решено:Проблемы с VPN

Сообщение Or@nge »

SANTA писал(а):
04.01.2007 01:33
iptables -F
и пробуй пингануть

Странно, теперь даже шлюз не пингуется... Operation not permitted.
Спасибо сказали:
Аватара пользователя
SANTA
Сообщения: 181
ОС: GNU/Linux

Re: Решено:Проблемы с VPN

Сообщение SANTA »

а ну прально, у тебя для eth0 не указан айпи гейта.
route del -net 172.16.192.0 netmask 255.255.240.0 dev eth0
route add -net 172.16.192.0 netmask 255.255.240.0 gw 172.16.192.1 #ну или не один.... вообщем ип гейта пиши
Спасибо сказали:
Аватара пользователя
Or@nge
Сообщения: 9

Re: Решено:Проблемы с VPN

Сообщение Or@nge »

Благодарю SANTA за помощь. :happy: Всё решилось: /etc/init.d/iptables stop
Тему можно закрывать.
Спасибо сказали: