在openwrt路由中加入n2n,并在ubuntu里加入n2n服务,实现开机联网互通互访
来源:互联网 作者:佚名 时间:2015-04-24 12:51
在openwrt路由中加入n2n,并在ubuntu里加入n2n服务,实现开机联网互通互访
在openwrt路由中加入n2n,,并在ubuntu里加入n2n服务,实现开机联网互通互访
1、openwrt的硬件环境:
将自己的WR703N刷入openwrt(这里需要修改FLASH芯片,换个8M的FLASH);
刷机后,安装openwrt,此教程网上一大堆,无需说明了,TELNET进入,并开启SSH后,root登陆。
2、安装n2n到openwrt中:
root@LeeKwen:~# opkg update
root@LeeKwen:~# cat /etc/opkg.conf
root@LeeKwen:~# opkg install n2n
运行上述命令即可安装n2n。
3、修改n2n的配置文件:
root@LeeKwen:~# cat /etc/config/n2n
config edge
option ipaddr
'10.10.100.191'
option supernode
'106.186.30.16'
option port
'9876'
option community
'leekwen'
option key
'leekwen'
option route
'1'
4、修改n2n服务的启动脚本:
root@LeeKwen:~# vi /etc/init.d/n2n
#!/bin/sh /etc/rc.common
# Copyright (C) 2008-2012 OpenWrt.org
START=90
start_inst