From owner-FreeBSD-net-jp@jp.FreeBSD.org Mon Jul 29 20:57:33 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g6TBvXp38629;
	Mon, 29 Jul 2002 20:57:33 +0900 (JST)
	(envelope-from owner-FreeBSD-net-jp@jp.FreeBSD.org)
Received: from maruma.net.dhis.org (YahooBB218133124022.bbtec.net [218.133.124.22])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with SMTP/inet id g6TBvXn38624
	for <FreeBSD-net-jp@jp.FreeBSD.org>; Mon, 29 Jul 2002 20:57:33 +0900 (JST)
	(envelope-from wa_da_ma@ybb.ne.jp)
Received: (qmail 73197 invoked by uid 1003); 29 Jul 2002 20:57:32 +0900
Date: 29 Jul 2002 20:57:32 +0900
Message-ID: <20020729115732.73196.qmail@maruma.net.dhis.org>
From: Masashi WADA <wa_da_ma@ybb.ne.jp>
X-Mailer: Mozilla 4.78 [ja] (Win98; U)
X-Accept-Language: ja
MIME-Version: 1.0
To: FreeBSD-net-jp@jp.FreeBSD.org
References: <20020729095700.GC716%ginga-freebsd@ginganet.org>
Content-Type: text/plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Reply-To: FreeBSD-net-jp@jp.FreeBSD.org
Precedence: list
X-Sequence: FreeBSD-net-jp 3765
Subject: [FreeBSD-net-jp 3765] Re: vtund =?ISO-2022-JP?B?GyRCJEcbKEI=?=
 =?ISO-2022-JP?B?GyRCREw+byROGyhC?=	IP address
 =?ISO-2022-JP?B?GyRCJEskaCRrQFxCMxsoQg==?=(
	unnumberedrouting?)
Errors-To: owner-FreeBSD-net-jp@jp.FreeBSD.org
Sender: owner-FreeBSD-net-jp@jp.FreeBSD.org
X-Originator: wa_da_ma@ybb.ne.jp
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+020727


$BOBED$G$9!#8!:w$G0z$C$+$1$i$l$??M$G$9!#(B

Kawaguti Ginga wrote:

> $B$G!$$3$l$@$H!$(Bvtund.conf $B$=$N$b$N$N7A$K$O$J$C$F$$$J$$(B
> ($BJ,$+$C$F$$$kJ}$K$O<+L@$J$N$+$b$7$l$^$;$s$,(B)$B$N$G!$(B
> $B$=$l$r;29M$K=q$$$F$_$?$N$G$9$,!$$5$C$Q$j$&$^$/9T$-$^$;$s!%(B

vtun.conf$B$=$N$b$N$r0J2<$K<($7$^$9!#(B
client$BB&$N$_(BNIC$B$N(BIP$B%"%I%l%9$H(Btun$B$K?6$k%"%I%l%9$,F1$8$K$J$C(B
$B$F$$$^$9!#(Bserver$BB&$O(BNIC$B$N%"%I%l%9$H(Btun$B$N%"%I%l%9$,0c$$$^$9!#(B

$B$^$?!"(Bserver,client$B6&$K(Bproto udp$B$K$9$k$H!"$J$<$+$3$1$k$N$G!"(B
server$BB&$O(Btcp$B!"(Bclient$BB&$O(Budp$B$K$7$F$$$^$9!#(B

$B$J$*!"(Bclient$BB&$O(BLinux$B$J$N$G!"(Bifconfig,route$B$N=q<0$,>/$70c(B
$B$$$^$9!#(B


----- server$BB&$N(Bvtun.conf -----
options {
  port 5000;  # Listen on this port.

  # Path to various programs
  ppp   /usr/sbin/pppd;
  ifconfig  /sbin/ifconfig;
  route  /sbin/route;
}

default {
  compress no;  # Compression is off by default
  speed 0;  # By default maximum speed, NO shaping
}

vtun00 {
  pass  xxxx; # Password
  type  tun;  # IP tunnel
  proto tcp;    # TCP protocol
  encr  yes;  # Encryption
  keepalive yes; # Keep connection alive

  up {
 ifconfig "%% inet 192.168.100.100 158.211.xxx.yyy netmask 255.255.255.255";
 route "add -net 158.211.xxx.0 158.211.xxx.yyy -netmask 255.255.255.0";
  };

  down {
 route "delete -net 158.211.xxx.0";
 ifconfig "%% delete down";
  };
}


----- client$BB&$N(Bvtun.conf -----
options {
  port 5000;  # Connect to this port.
  timeout 60;  # General timeout

  ppp  /usr/sbin/pppd;
  ifconfig /sbin/ifconfig;
  route  /sbin/route;
}

vtun00 {
  pass  xxxx; # Password
  device tun0;  # Device tun0
  proto udp;  # UDP mode
  keepalive yes;
  persist yes;  # Persist mode
  up {

 ifconfig "%% inet 158.211.xxx.yyy pointopoint 192.168.100.100";
 route "del default";
 route "add default gw 192.168.100.100";
  };

  down {
 route "del default";
 route "add default gw 158.211.xxx.1";
 ifconfig "%% del down";
  };
}

--
$B"#""""""(B - - - - - - - - - - - - - - - - - $B""""""(B
  Masashi WADA / $BOBED@5;V(B  <wa_da_ma@ybb.ne.jp>
$B""""""(B - - - - - - - - - - - - - - - - - $B"""""""#(B


