ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Peter V.Saveliev" <peet@infosite.ru>
To: ALT Linux <mandrake-russian@altlinux.ru>
Subject: [mdk-re] cipe: is this a way?
Date: Thu Jan 24 13:20:46 2002
Message-ID: <20020124132348.2529e5ac.peet@infosite.ru> (raw)

( http://sites.inka.de/sites/bigred/devel/cipe.html )

Есть ли поддержка $subj в ALT? Очень бы хотелось посмотреть
на это чудо. Сейчас метаюсь в попытках наладить туннель,
но хитрый.

Вариант с pptp не подходит, он неустойчив, угрюм, хотя и
прост, и, наконец, требует прописывания машины-туннеллера
в таблицу маршрутизации машин локальной сети, что не модно.

А задача - вот: есть две локальных сети. Так получилось, что
часть из машин обеих локалок имеют анонсированные IP, часть -
без них. Внутри каждой сети проблема решается просто: каждый
добавляет себе IP из пространства адресов 10.0.0.0/8 и 
открывает SMB-ресурсы только на него (+ дополнительная
безопасность), но хотелось бы связать обе сети. Для этого
мы попытались проделать фокус с ip из пакета iproute2 (см.
текст скрипта ниже), но пока не получилось. Смотрим дальше,
может, общественность наставит на путь истинный?


Петр.


8<-----------------------------------------------------------------------------------
#!/bin/sh
# /etc/init.d/tunneling: tunneling services module.

IP=/sbin/ip
LOCAL_GATE_IP=<мой анонсированный IP>
LOCAL_NETWORK_NUMBER=12

#############################################################################
#############################################################################

# tunnel_up()
# Usage: tunnel_up print_name network_digit remote_network_gate_ip
tunnel_up() {
	echo -n "$1 "
	$IP tunnel add net${2} mode gre remote $3 local $LOCAL_GATE_IP ttl 64 key $2
	$IP addr add 10.${LOCAL_NETWORK_NUMBER}.255.${2} dev net${2}
	$IP link set net${2} up
	$IP route add 10.${2}.0.0/16 dev net${2}
}

# tunnel_down()
# Usage: tunnel_down print_name network_digit
tunnel_down() {
    echo -n "$1 "
    $IP link set net${2} down
    $IP tunnel del net${2}
}

##############################################################################
##############################################################################

test -f $IP || exit 0

case "$1" in
  start)
    insmod ip_gre
    echo -n "Setting up tunneling: "
	tunnel_up matmex 20 <его анонсированный IP>
    echo "complete."
    ;;
  stop)
    echo -n "Stopping tunneling: "
	tunnel_down matmex 20
    rmmod ip_gre
    echo "..complete."
    ;;
  reload|force-reload|restart)
    $0 stop
    $0 start
    ;;
  *)
    echo "Usage: $0 {start|stop|reload|force-reload|restart}"
    exit 1
esac



exit 0
8<-----------------------------------------------------------------------------------



             reply	other threads:[~2002-01-24 13:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-24 13:20 Peter V.Saveliev [this message]
2002-01-24 13:39 ` Peter V.Saveliev

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=20020124132348.2529e5ac.peet@infosite.ru \
    --to=peet@infosite.ru \
    --cc=mandrake-russian@altlinux.ru \
    /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