Форум русскоязычного сообщества Ubuntu


Считаете, что Ubuntu недостаточно дружелюбна к новичкам?
Помогите создать новое Руководство для новичков!

Автор Тема: Поиск проблемы в настройке vpn сервера на ubuntu-server  (Прочитано 693 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн Knes

  • Автор темы
  • Новичок
  • *
  • Сообщений: 27
  • "Наши знания - залог успеха" ©
    • Просмотр профиля
Доброго всем времени суток.

Хочу настроить vpn сервер для раздачи интернет трафика в локальной сети, использовав старый системник.
Все началось хорошо, соединение с нетом на сервере установил, а вот дальше не получаеться и причём не поянтно, что именно не получилось.

Делал всё как написано вот тут: http://habrahabr.ru/blogs/linux/80258/

1. Установил pptpd пакет.
2.Прописал в "/etc/pptpd.conf"
localip 10.10.10.10
remoteip 172.22.1.1-5
я правильно понял,что тут нет разницы каккой localip прописать, главное, чтобы потом его же вписать в адрес сервера при настройке vpn на клиентских компах, а от remoteip зависит какой этому компу будет выдан серверу? Или надо прописывать те ip, под которые выданы dhcp в локалке?
3. В /etc/ppp/pptpd-options оставил только
# требуем авторизацию у клиентов

auth

Шифрование пока не включал( провайдер запрещает шифровать, ну пока пусть так и будет)
4. В /etc/ppp/chap-secrets прописал:
LOGIN pptpd PASSWORD "*"

5. Добавил(правда так и непонял зачем) в /etc/rc.local:

iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

echo "1" > /proc/sys/net/ipv4/ip_forward


Ну и собственно все, reboot и на влиентской машине создаю vpn подключение к серверу с адресом 10.10.10.10 логин - LOGIN пароль - PASSWORD...
Но этому подключению в нет не заходит.

Интересно, что там не так происходит, но единственный монитор, что я знаю -sudo tail -f /var/log/syslog
который говарит, что там всё вот так:

Oct 14 18:53:43 JeiSi pptpd[1275]: CTRL: Client 172.30.41.148 control connection started
Oct 14 18:53:44 JeiSi pptpd[1275]: CTRL: Starting call (launching pppd, opening GRE)
Oct 14 18:53:44 JeiSi pppd[1276]: Plugin /usr/lib/pptpd/pptpd-logwtmp.so loaded.
Oct 14 18:53:44 JeiSi pppd[1276]: pppd 2.4.5 started by root, uid 0
Oct 14 18:53:44 JeiSi pppd[1276]: Using interface ppp1
Oct 14 18:53:44 JeiSi pppd[1276]: Connect: ppp1 <--> /dev/pts/2
Oct 14 18:53:44 JeiSi pptpd[1275]: GRE: Bad checksum from pppd.
Oct 14 18:53:44 JeiSi pppd[1276]: MPPE required but peer refused
Oct 14 18:53:44 JeiSi pppd[1276]: Connection terminated.
Oct 14 18:53:44 JeiSi pppd[1276]: Connect time 0.0 minutes.
Oct 14 18:53:44 JeiSi pppd[1276]: Sent 18 bytes, received 42 bytes.
Oct 14 18:53:44 JeiSi pppd[1276]: Exit.
Oct 14 18:53:44 JeiSi pptpd[1275]: GRE: read(fd=6,buffer=611640,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs
Oct 14 18:53:44 JeiSi pptpd[1275]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7)
Oct 14 18:53:44 JeiSi pptpd[1275]: CTRL: Reaping child PPP[1276]
Oct 14 18:53:44 JeiSi pptpd[1275]: CTRL: Client 172.30.41.148 control connection finished
Но тут ничего интересного я не нашёл =(
(172.30.41.148 - мой ип в локалке от dhcp)

Как понять что там происходит при подключении и исправить, то что не так работает?
Или в /var/log/syslog всё видно, просто я не туда смотрю?
« Последнее редактирование: 14 Октября 2011, 19:58:00 от Knes »
«Лишь та - ошибка, что не исправляется.» © Конфуций

Гарри Кашпировский

  • Гость
С этим разобраться бы для начала
Код: (text) [Выделить]
Oct 14 18:53:44 JeiSi pppd[1276]: MPPE required but peer refused

Оффлайн Knes

  • Автор темы
  • Новичок
  • *
  • Сообщений: 27
  • "Наши знания - залог успеха" ©
    • Просмотр профиля
Извиняюсь, прогледел
#require-mppe-128 в /etc/ppp/pptpd-options
Подключилось выдало мне мой ип, который писался в "/etc/pptpd.conf", но в нет так и не заходит, ничего не пингуеться.
Вот снова тот - же sudo tail -f /var/log/syslog
Oct 14 20:22:45 JeiSi pppd[1288]: pppd 2.4.5 started by root, uid 0
Oct 14 20:22:45 JeiSi pppd[1288]: Using interface ppp1
Oct 14 20:22:45 JeiSi pppd[1288]: Connect: ppp1 <--> /dev/pts/3
Oct 14 20:22:45 JeiSi pptpd[1287]: GRE: Bad checksum from pppd.
Oct 14 20:22:45 JeiSi pppd[1288]: found interface eth0 for proxy arp
Oct 14 20:22:45 JeiSi pppd[1288]: local  IP address 172.30.41.87
Oct 14 20:22:45 JeiSi pppd[1288]: remote IP address 172.30.41.145

И на всякий случай сам "/etc/ppp/pptpd-options"

# Authentication

# Name of the local system for authentication purposes
# (must match the second field in /etc/ppp/chap-secrets entries)
name pptpd

# Optional: domain name to use for authentication
# domain mydomain.net

# Strip the domain prefix from the username before authentication.
# (applies if you use pppd with chapms-strip-domain patch)
#chapms-strip-domain


# Encryption
# Debian: on systems with a kernel built with the package
# kernel-patch-mppe >= 2.4.2 and using ppp >= 2.4.2, ...
# {{{
#refuse-pap
#refuse-chap
#refuse-mschap
# Require the peer to authenticate itself using MS-CHAPv2 [Microsoft
# Challenge Handshake Authentication Protocol, Version 2] authentication.
require-mschap-v2
# Require MPPE 128-bit encryption
# (note that MPPE requires the use of MSCHAP-V2 during authentication)
#require-mppe-128
# }}}




# Network and Routing

# If pppd is acting as a server for Microsoft Windows clients, this
# option allows pppd to supply one or two DNS (Domain Name Server)
# addresses to the clients.  The first instance of this option
# specifies the primary DNS address; the second instance (if given)
# specifies the secondary DNS address.
# Attention! This information may not be taken into account by a Windows
# client. See KB311218 in Microsoft's knowledge base for more information.
#ms-dns 10.0.0.1
#ms-dns 10.0.0.2

# If pppd is acting as a server for Microsoft Windows or "Samba"
# clients, this option allows pppd to supply one or two WINS (Windows
# Internet Name Services) server addresses to the clients.  The first
# instance of this option specifies the primary WINS address; the
# second instance (if given) specifies the secondary WINS address.
#ms-wins 10.0.0.3
#ms-wins 10.0.0.4

# Add an entry to this system's ARP [Address Resolution Protocol]
# table with the IP address of the peer and the Ethernet address of this
# system.  This will have the effect of making the peer appear to other
# systems to be on the local ethernet.
# (you do not need this if your PPTP server is responsible for routing
# packets to the clients -- James Cameron)
proxyarp

# Debian: do not replace the default route
nodefaultroute


# Logging

# Enable connection debugging facilities.
# (see your syslog configuration for where pppd sends to)
#debug

# Print out all the option values which have been set.
# (often requested by mailing list to verify options)
#dump


# Miscellaneous
# Create a UUCP-style lock file for the pseudo-tty to ensure exclusive
# access.
lock

# Disable BSD-Compress compression
nobsdcomp

auth
#require-mppe


«Лишь та - ошибка, что не исправляется.» © Конфуций

Гарри Кашпировский

  • Гость
Зато подключается. :)
А теперь то, что вбили и непоняли, удаляйте.
И настраивайте вот примерно как тут в части II. Выше про загрузку правил iptabes через interfaces тоже описан процесс. В общем, все прилепленные темы могут быть полезными. А Вы темы плодите.
И, да. В /etc/ppp/pptpd-options параметр ms-dns ip_ДНС-сервера не забудьте, а то следующее сообщение будет похоже на предыдущее, но это скорее не к хабру или ко мне, это в ман.
« Последнее редактирование: 14 Октября 2011, 21:44:04 от KT315 »

 

Страница сгенерирована за 0.048 секунд. Запросов: 25.