From: Alexander Kubatkin <_kaa_@mail.ru>
To: ALT Linux Community <community@lists.altlinux.org>
Subject: Re: [Comm] pptptunnel + routing
Date: Wed, 2 Nov 2005 12:12:51 +0300
Message-ID: <200511021212.51754._kaa_@mail.ru> (raw)
In-Reply-To: <20051102074314.GA11931@dennis.td.tascom.ru>
On Wednesday 02 November 2005 10:43, Alexander Vasiliev wrote:
> On Wed, Nov 02, 2005 at 08:32:29AM +0800, Аня wrote:
[поскипано]
> > С route add/del игралась очень много. Пробовала поставить дефолтовый
> > маршрут другой, старый удалить, добавить строку маршрутизации для
> > локальной сети, но все это выливается в результате в то что через
> > интерфейс ppp0 идет трафик в 2мб/с, хотя сеть абсолютно не загружена
> > никакими процессами, а пинг не идет до http сервера провайдера.
>
> Маршрутизация - это очень просто.
> 1. Маршрут на pptp-server должен идти "мимо" pptp-tunnel (не
> через ppp0).
> 2. Default route направьте в pptp-tunnel (возможно придется
> удалить прежний defult).
> 3. Для этого используйте файлы /etc/ppp/ip-up.local и
> /etc/ppp/ip-down.local. Если их нет, создайте и пропишите нужные
> команды. Не забудьте сделать их исполнимыми.
точно, именно так и надо делать, правда в Сизифе оно должно ложиться в
/etc/ppp/ip-up.d/ и /etc/ppp/ip-down.d/, приведу пример:
1. из сети 10.0.0.0/16 выдается IP по dhcp от провайдера для работы в локальной сети, 10.0.0.1 - шлюз.
2. 192.168.1.1 - vpn-сервер
3. 172.16.0.0/16 - сеть после поднятия тунеля, 172.16.10.10 -нам, 172.16.0.1 - удаленный.
в /etc/ppp/ip-up.local пишем
---
route add -net 192.168.1.0/24 gw 10.0.0.1 # тем самым добавляем статический рутинг до vpn-сервера
route del default
route add default via ppp0
--
в /etc/ppp/ip-down.local пишем
---
route add default gw 10.0.0.1
---
если адреса берем по DHCP, то можно сделать так
в /etc/ppp/ip-up.local пишем
----
. /etc/dhcpc/имя_файла_с_полученными_по_DHCP_параметрами
route add -net 192.168.1.0/24 {$GATEWAY} # тем самым добавляем статический рутинг до vpn-сервера, где адреса могут меняться.
route del default
route add default via ppp0
------
если нужно, могу прислать рабочие options.pptp и /etc/pears/имя_тунеля.
--
Alexander Kubatkin
next prev parent reply other threads:[~2005-11-02 9:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-02 0:32 Аня
2005-11-02 7:43 ` Alexander Vasiliev
2005-11-02 9:12 ` Alexander Kubatkin [this message]
2005-11-02 10:05 ` [Comm] " Michael Shigorin
2005-11-02 10:36 ` Gennadiy Redko
2005-11-02 10:35 ` Michael Shigorin
2005-11-02 11:51 ` ABATAPA
2005-11-03 7:50 ` Max A Mazin
2005-11-02 11:51 ` [Comm] " ABATAPA
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200511021212.51754._kaa_@mail.ru \
--to=_kaa_@mail.ru \
--cc=community@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git