カスタム検索
tomo.gif (1144 ツバツイツト)line.gif (927 ツバツイツト)line.gif (927 ツバツイツト)line.gif (927 ツバツイツト)To previous pageTo home pageMailing to me

VTunの実験と話題

Modified: 7 April 2005

RedhatLinux8.0 で実験しました。


VTunのダウンロードからインストール7 April 2005


 VTunのダウンロードからインストール

VTunのダウンロード

http://vtun.sourceforge.net

2005年4月7日に、"vtun-2.6-1.rh80.i386.rpm" をダウンロードしました。

RPMもありますが、次のLZOライブラリが別途必要になるので、ソースからインストールするほうが容易です。

# rpm -ivh vtun-2.6-1.rh80.i386.rpm
Preparing...                ########################################### [100%]
   1:vtun                   ########################################### [100%]
#


LZOライブラリのインストール

以下から、"lzo" をダウンロードします。

http://dag.wieers.com/packages/lzo/

以下のコマンドで、インストールします。

# rpm -ivh lzo-1.08-3.0.rh8.dag.i386.rpm
警告: lzo-1.08-3.0.rh8.dag.i386.rpm: V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing...                ########################################### [100%]
   1:lzo                    ########################################### [100%]
#


パッケージの確認

以下のぺっケージも確認しましょう。

# rpm -q openssl-devel
openssl-devel-0.9.6b-29
# rpm -q zlib-devel
zlib-devel-1.1.4-4
# rpm -q cyrus-sasl-devel
cyrus-sasl-devel-2.1.7-2
#


VTunのインストール

デバイスの確認

# modprobe tun
# lsmod
Module                  Size  Used by    Not tainted
ide-cd                 33608   0  (autoclean)
cdrom                  33696   0  (autoclean) [ide-cd]
soundcore               6532   0  (autoclean)
mousedev                5524   1  (autoclean)
input                   5888   0  (autoclean) [mousedev]
binfmt_misc             7524   1
tun                     5696   3
autofs                 13348   0  (autoclean) (unused)
pcnet32                17856   1
mii                     2156   0  [pcnet32]
iptable_filter          2412   0  (autoclean) (unused)
ip_tables              14936   1  [iptable_filter]
microcode               4668   0  (autoclean)
ext3                   70368   5
jbd                    52212   5  [ext3]
BusLogic              100924   6
sd_mod                 13552  12
scsi_mod              107144   2  [BusLogic sd_mod]
# ls /dev/net/tun
/dev/net/tun
#


VTunを動かしてみる - サーバー側

"/etc/vtund.conf" の設定

options {
        port      5000;
        timeout   60;
        ifconfig  /sbin/ifconfig;
        ppp       /usr/sbin/pppd;
}
default {
        speed   	0;
        encrypt 	yes;
        proto     udp;
        compress  zo:1;
        multi     no;
}
tun {
        passwd    abcd;
        type      tun;
        up {
            ifconfig "%% inet 10.0.0.1 pointtopoint 10.0.0.2 mtu 1450";
        }
}

起動する

# vtund -f /etc/vtund.conf -s

起動を確認します。

# ps ax
     :
24313 ?        S      0:00 vtund[s]: waiting for connections on port 5000
     :
# nmap localhost
     :
5000/tcp   open        UPnP
     :
#


VTunを動かしてみる - クライアント側

"/etc/vtund.conf" の設定

options {
        timeout 60;
        ifconfig  /sbin/ifconfig;
}
tun {
        passwd  abcd;
        up {
                ifconfig "%% inet 10.0.0.2 pointtopoint 10.0.0.1 mtu 1450";
        }
}

起動する

# vtund -f /etc/vtund.conf tun 192.168.0.75
#


To previous pageTo home pageMailing to meJump to Top of pageline.gif (927 ツバツイツト)line.gif (927 ツバツイツト)tomo.gif (1144 ツバツイツト)
カスタム検索


Tweet