N2N 安装方法,适用于 多台电脑由于处于各自内网环境,不能互通, 但是能够访问一台公共的外网服务器, 通过该服务器实现多台内网服务器直接的互连互通

5.        安装及用法

源码直接从SVN上获取,里面包含了V1和V2两个版本,我编译的是V2版本

#svn cohttps://svn.ntop.org/svn/ntop/trunk/n2n

#cd # cd n2n/n2n_v2

#make

#make install

 

编译安装后,多了两个应用:supernode和edge

l        启动supernode

# supernode -l <listening port>

参数-l是监听的端口,进程缺省是运行在后台的。可选参数:

supernode usage
-l <lport>      
Set UDP main listen port to <lport>
-f              Run in foreground.
-v              Increase verbosity. Can be used multiple times.
-h              This help message.

 

l         Ege的用法:

#edge-a 10.10.0.1 -c mypbxn2n -k mypbxn2n -l 192.168.122.180:8888 -s 255.255.0.0
edge -a 
虚拟IP -c 你的虚拟网名 -k 密码  -l supernodeip:端口 -s 子网掩码

edge -d <tun device> -a [static:|dhcp:]<tun IP address> -c <community> [-k <encrypt key> | -K <key file>] [-s <netmask>] [-u <uid> -g <gid>][-f][-m <MAC address>]
-l <supernode host:port> [-p <local port>] [-M <mtu>] [-r] [-E] [-v] [-t <mgmt port>] [-b] [-h]

-d <tun device>          
| tun device name
-a <mode:address>        | Set interface address. For DHCP use '-r -a dhcp:0.0.0.0'
-c <community>           | n2n community name the edge belongs to.
-k <encrypt key>         | Encryption key (ASCII) - also N2N_KEY=<encrypt key>. Not with -K.
-K <key file>            | Specify a key schedule file to load. Not with -k.
-s <netmask>             | Edge interface netmask in dotted decimal notation (255.255.255.0).
-l <supernode host:port> | Supernode IP:port
-b                       | Periodically resolve supernode IP
                         : (when supernodes are running on dynamic IPs)
-p <local port>          | Fixed local UDP port.
-u <UID>                 | User ID (numeric) to use when privileges are dropped.
-g <GID>                 | Group ID (numeric) to use when privileges are dropped.
-f                       | Do not fork and run as a daemon; rather run in foreground.
-m <MAC address>         | Fix MAC address for the TAP interface (otherwise it may be random)
                         : eg. -m 01:02:03:04:05:06
-M <mtu>                 | Specify n2n MTU of edge interface (default 1400).
-r                       | Enable packet forwarding through n2n community.
-E                       | Accept multicast MAC addresses (default=drop).
-v                       | Make more verbose. Repeat as required.
-t                       | Management UDP Port (for multiple edges on a machine).

Environment variables:
  N2N_KEY                | Encryption key (ASCII). Not with -K or -k.

 

l         Windows

我没有在Win32下自己编译,http://www.vpnhosting.cz/n2nguien.exe提供了一个安装包,里面包含了V1和V2版本,注意使用时和自己所选版本的匹配。

 

单击advanced按键,勾选Enable packet forwarding through n2n community

 

注意在win7下,安装目录下的所有可执行文件,均需要以管理员身份运行。

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值