Настройка VPN

openSUSE, SUSE Linux Enterprise

Модератор: Модераторы разделов

Аватара пользователя
Dimas
Сообщения: 137
Статус: FreeBSD

Настройка VPN

Сообщение Dimas »

Suse 9.2
Не могу настроить VPN соединение
Есть локальная сеть , но для доступа в интернет нужно vpn соединение....
пробывал через pptp-command setup
Соединяется, но инет не открывается
Через вебмин попробывал вот что пишет:
Establishing a PPTP connection with the command pptp xxx.xxx.xxx.xxx call Internet ..

.. connection successfully activated using interface ppp0. Your local address is 10.0.x.xx, and the remote address is 10.0.x.x

Кто знает раскажите по подробнее как мне vpn настроить =)

Dimas добавил в 01.05.2005 00:20

Вот что имеем
login: user
password: slovo
Ip : 172.19.21.1
Маска : 255.255.255.0
Шлюз : 172.19.20.1
DNS: 172.16.1.1 и 172.19.10.4
IP VPN сервера: 172.19.10.5
(local IP address 10.0.1.10
remote IP address 10.0.0.1)
И так
pptp-command setup

1.) Manage CHAP secrets
2.) Manage PAP secrets
3.) List PPTP Tunnels
4.) Add a NEW PPTP Tunnel
5.) Delete a PPTP Tunnel
6.) Configure resolv.conf
7.) Select a default tunnel
8.) Quit
?:
Выбираем 1
1.) List CHAP secrets
2.) Add a New CHAP secret
3.) Delete a CHAP secret
4.) Quit
?:
Выбираем 2

Local Name:user
Remote Name [PPTP]: <Enter>
Password:slovo

1.) Manage CHAP secrets
2.) Manage PAP secrets
3.) List PPTP Tunnels
4.) Add a NEW PPTP Tunnel
5.) Delete a PPTP Tunnel
6.) Configure resolv.conf
7.) Select a default tunnel
8.) Quit
?:
Выбираем 4
Add a NEW PPTP Tunnel.

1.) Other
Which configuration would you like to use?:
Выбираем 1
Tunnel Name:i-net
Server IP:172.19.10.5
route: del default
route: add defaults gw 10.0.0.1
Local Name:user
Remote Name:slovo

ifcfg-pptp0
PERRDNS="no"
DEVICE="pptp0"
ONBOOT="no"
USERCTR="yes"
PERSIST="no"
DEBUG="yes"
PPPOPTIONS="no"
MRU=""
MTU=""
IDLETIMEOUT=""
VPN_HOST="172.19.1.201"
VPN_USER="sector11-10"
ROUTES=""

resolf.conf
nameserver 172.16.2.7
nameserver 172.19.1.1



Затем pptp-command start
Using interface ppp0
Connect: ppp0 <--> /dev/pts/3
CHAP authentication succeeded: Welcome!!
local IP address 10.0.1.10
remote IP address 10.0.0.1
Script ?? finished (pid 6489), status = 0x0
Script /etc/ppp/ip-up finished (pid 6520), status = 0x0
Route: del default added
Route: add default gw 10.0.0.1 added
All routes added.
Tunnel i-net is active on ppp0. IP Address: 10.0.1.10
Dimas:/etc # pptp-command stop
Sending HUP signal to PPTP processes...
Modem hangup
Connection terminated.
Connect time 1.4 minutes.
Sent 653846365 bytes, received 66 bytes.
Script /etc/ppp/ip-down finished (pid 6552), status = 0x0
Connect time 1.4 minutes.
Sent 653846365 bytes, received 66 bytes.

Инет не пашет, локальная сеть как и положено во время vpn отвалилась
Спасибо сказали:
Аватара пользователя
madskull
Сообщения: 1019
Статус: Экс-металлюга

Re: Настройка VPN

Сообщение madskull »

Похоже, что тема про VPN скоро обгонит по популярности тему про "Квадратики"

По существу: посмотри на route -n и убедись, что маршруты неправильны.
ArchLinux / IceWM
Спасибо сказали:
Аватара пользователя
Dimas
Сообщения: 137
Статус: FreeBSD

Re: Настройка VPN

Сообщение Dimas »

До подключения к VPN
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
172.19.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 172.19.20.1 0.0.0.0 UG 0 0 0 eth0



После подключения к VPN
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
10.0.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp1
172.19.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 ppp0
0.0.0.0 172.19.20.1 0.0.0.0 UG 0 0 0 eth0
Спасибо сказали:
Аватара пользователя
Shurik
Сообщения: 415
ОС: Mandriva 2010.2

Re: Настройка VPN

Сообщение Shurik »

Спасибо сказали:
Аватара пользователя
Dimas
Сообщения: 137
Статус: FreeBSD

Re: Настройка VPN

Сообщение Dimas »

Connect: ppp0 <--> /dev/pts/3
CHAP authentication succeeded: Welcome!!
local IP address 10.0.1.14
remote IP address 10.0.0.1
Script ?? finished (pid 10000), status = 0x0
Script /etc/ppp/ip-up finished (pid 10034), status = 0x0
Route: add -host 172.19.1.201 gw 172.19.11.2 dev eth0 added
Route: del default added
Route: add default gw 10.0.0.1 dev ppp0 added
All routes added.
Tunnel meridian2 is active on ppp0. IP Address: 10.0.1.14
Installed /etc/resolv.conf.pptp as /etc/resolv.con

route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
172.19.1.201 172.19.11.2 255.255.255.255 UGH 0 0 0 eth0
172.19.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 ppp0

Походу проблема с ДНС
т.к пинг например на яндекс (213.180.204.11) есть


resolf.conf
nameserver 172.16.2.7
nameserver 172.19.1.1
Мои ДНС
Спасибо сказали:
Аватара пользователя
Dimas
Сообщения: 137
Статус: FreeBSD

Re: Настройка VPN

Сообщение Dimas »

Все настроил и все работает, проблема была в немеврном resolf.conf
Спасибо сказали: