安裝 n2n VPN 程序

  • 目標 : 使用 n2n 建立一個跨兩個 Intranet 的 VPN, 讓 Intra-02 的 R600-NB 可以直接 ssh 連上 Intra-01 的 rdtest04-xen0
    • SuperNode : rdtest04
      • OS:CentOS5 x86_64
      • eth0:140.92.143.17
      • n2n0:10.9.9.1
    • Intra-01 : rdtest04-xen0
      • OS:CentOS5 x86_64
      • eth0:192.168.122.100
      • n2n0:10.9.9.2
      • dhcp server : dnsmasq 輕型 dns/dhcpd 安裝設定 (dhcp-range=10.9.9.101,10.9.9.150,12h)
      • 可直接連上 SuperNode 140.92.143.17:7654
    • Intra-02 : R600-NB
      • OS:WinXP SP3
      • eth0:172.16.100.125
      • n2n0:dhcp 分配
      • 可直接連上 SuperNode 140.92.143.17:7654
su - root
cd /usr/src
svn co https://svn.ntop.org/svn/ntop/trunk/n2n
cd n2n/n2n_v1
make
make PREFIX=/opt/n2n install
cd /etc/init.d/
wget http://svn.ichiayi.com/opensvn/opentrysoft/trysrvtool/n2nvpnd
chmod a+x n2nvpnd
chkconfig --add n2nvpnd
cd /etc
wget http://svn.ichiayi.com/opensvn/opentrysoft/trysrvtool/n2nvpnd.conf
vi n2nvpnd.conf
# General configuration
# n2n IP Address
# DHCP Client Enable -> on; Disable -> off
n2n_DHCP='off'
# If DHCP enabled the below IP will be ignored.
n2n_IP='10.9.9.1'

# n2n community name
n2n_cname='n2nrdtest04'

# Encryption key (ASCII)
n2n_pass='n2nrdtest04'

# Supermode Host:
# IP:Port
SNODE_Host='140.92.143.17:7654'

# Supernode Mode: Enable -> on; Disable -> off
SNODE='on'
SNODE_PORT='7654'

# Log file
LOGS='/var/log/n2nvpnd.log'
service n2nvpnd start
su - root
cd /usr/src
svn co https://svn.ntop.org/svn/ntop/trunk/n2n
cd n2n/n2n_v1
make
make PREFIX=/opt/n2n install
cd /etc/init.d/
wget http://svn.ichiayi.com/opensvn/opentrysoft/trysrvtool/n2nvpnd
chmod a+x n2nvpnd
chkconfig --add n2nvpnd
cd /etc
wget http://svn.ichiayi.com/opensvn/opentrysoft/trysrvtool/n2nvpnd.conf
vi n2nvpnd.conf
# General configuration
# n2n IP Address
# DHCP Client Enable -> on; Disable -> off
n2n_DHCP='off'
# If DHCP enabled the below IP will be ignored.
n2n_IP='10.9.9.2'

# n2n community name
n2n_cname='n2nrdtest04'

# Encryption key (ASCII)
n2n_pass='n2nrdtest04'

# Supermode Host:
# IP:Port
SNODE_Host='140.92.143.17:7654'

# Supernode Mode: Enable -> on; Disable -> off
SNODE='off'
SNODE_PORT='7654'

# Log file
LOGS='/var/log/n2nvpnd.log'
service n2nvpnd start

下載安裝後會多出一片 TAP-Win32 Adapter V9 虛擬網卡, 以及 n2n GUI 管理介面 ICON



這樣就可以在 R600-NB 透過 putty 直接連上 10.9.9.2 Intra-01 的 rdtest01-xen0

  • tech/n2nvpn.txt
  • 上一次變更: 2010/04/06 19:55
  • jonathan