收藏 分销(赏)

openwrt N2N VPN应用 (实现在家访问公司内网).docx

上传人:xrp****65 文档编号:7227328 上传时间:2024-12-28 格式:DOCX 页数:4 大小:137.69KB 下载积分:10 金币
下载 相关 举报
openwrt N2N VPN应用 (实现在家访问公司内网).docx_第1页
第1页 / 共4页
openwrt N2N VPN应用 (实现在家访问公司内网).docx_第2页
第2页 / 共4页


点击查看更多>>
资源描述
openwrt N2N VPN应用 (实现在家访问公司内网) ###################### # 风飞雪  2011-3-10                    # #            # ###################### N2N可以用公众服务器, 所以可以不用外网IP,不用端口映射 OpenVPN服务器必需要一个外网端口 N2N VPN的公共SuperNode  88.86.108.50     :  82 58.252.61.130   :  53  #openwrt 下安装N2N opkg update opkg install n2n  openwrt路由路一 (假设是公司) :  这个当VPN服务器,桥接到lan,  lan上有DHCP服务 ________________________________________________________________ #修改配置文件cat /etc/config/n2n config edge         option ipaddr           '0.0.0.0'         option supernode        '88.86.108.50'         option port             '82'         option community        'openwrt'     #随便起个名称如 openwrt         option key              '1234'              #密码      option route            '1' #修改启动文件vi /etc/init.d/n2n   start()区域  红色部分是添加的 start() { config_load n2n ifconfig edge0 mtu 1300    #修改MTU为1300 brctl addif br-lan edge0  #把n2n桥接到lan  就可以用DHCP了 } #ssh下运行 /etc/init.d/n2n  start  #启动n2n /etc/init.d/n2n  enable  #设置开机自己启动 ________________________________________________________________ openwrt路由路二 : 这个路由当VPN客户端,通过dhcp获取地址 ________________________________________________________________ #修改配置文件vi /etc/config/n2n config edge         option ipaddr           '0.0.0.0'         option supernode        '88.86.108.50'         option port             '82'         option community        'openwrt'     #随便起个名称如 openwrt(与上面设置一样)         option key              '1234'               #密码  (与上面设置一样)         option route            '1' #/etc/config/network 设置 #添加一个n2n的网络  #n2n网络接口用 edge0  协议DHCP  如下 : config 'interface' 'n2n' option 'proto' 'dhcp' option 'ifname' 'edge0' option 'defaultroute' '0'   #防火墙设置 也就是也n2n网络加入到wan防火墙 config 'zone'         option 'name' 'wan'         option 'input' 'ACCEPT'         option 'output' 'ACCEPT'         option 'masq' '1'         option 'mtu_fix' '1'         option 'forward' 'ACCEPT'         option 'network' 'wan n2n' #修改启动文件vi /etc/init.d/n2n   start()区域  红色部分是添加的 start() {         config_load n2n         ifconfig edge0 mtu 1300          ifup n2n      #ifup n2n 使其获取IP地址 }   /etc/init.d/n2n  start  #启动n2n /etc/init.d/n2n  enable  #设置开机自己启动 ________________________________________________________________ 这个n2n网卡edge0工作在第二层,  pppoe、DHCP 等协议可以在这隧道中传输   相当于hub windows下客户端 windows版n2n下载地址:http://www.vpnhosting.cz/n2nguien.exe   当然你也可以用windows下n2n做服务器 把n2n的虚拟网卡与本地连接桥接 你也可以把路由用vlan划一个口与edge0   使路由上的某个lan网口做VPN专用通道 openwrt的网络设置非常灵活  你也可以不用桥接,用路由模式 具体应用、设置自己发挥
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 百科休闲 > 其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服