<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>openwrt归档 - Liao&#039;s blog</title>
	<atom:link href="https://www.laobaiblog.top/tag/openwrt/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.laobaiblog.top/tag/openwrt/</link>
	<description>路漫漫其修远兮，吾将上下而求索</description>
	<lastBuildDate>Tue, 16 Jul 2024 05:21:11 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.laobaiblog.top/wp-content/uploads/2022/01/cropped-tyuu-32x32.png</url>
	<title>openwrt归档 - Liao&#039;s blog</title>
	<link>https://www.laobaiblog.top/tag/openwrt/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Docker安装nps实现[OpenWrt]内网穿透</title>
		<link>https://www.laobaiblog.top/2022/11/02/docker%e5%ae%89%e8%a3%85nps%e5%ae%9e%e7%8e%b0openwrt%e5%86%85%e7%bd%91%e7%a9%bf%e9%80%8f/</link>
		
		<dc:creator><![CDATA[大白]]></dc:creator>
		<pubDate>Wed, 02 Nov 2022 06:36:43 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[分享]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nps]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[内网穿透]]></category>
		<guid isPermaLink="false">https://www.laobaiblog.top/?p=334</guid>

					<description><![CDATA[<p>一、NPS 概述 NPS 是一款轻量级、功能强大的内网穿透代理服务器。支持 tcp、udp 流量转发 &#8230;</p>
<p><a href="https://www.laobaiblog.top/2022/11/02/docker%e5%ae%89%e8%a3%85nps%e5%ae%9e%e7%8e%b0openwrt%e5%86%85%e7%bd%91%e7%a9%bf%e9%80%8f/">Docker安装nps实现[OpenWrt]内网穿透</a>最先出现在<a href="https://www.laobaiblog.top">Liao&#039;s blog</a>。</p>
]]></description>
										<content:encoded><![CDATA[<h3>一、NPS 概述</h3>
<p>NPS 是一款轻量级、功能强大的内网穿透代理服务器。支持 tcp、udp 流量转发，支持内网 http 代理、内网 socks5 代理，同时支持 snappy 压缩、站点保护、加密传输、多路复用、header 修改等。支持 web 图形化管理，集成多用户模式。管理系统比 FRP 方便很多，更容易上手。</p>
<h3>二、配置要求</h3>
<ul>
<li>一台拥有公网 IP 的服务器。</li>
<li>开放端口例如：(8080,8024,80,443）等可以不是这些端口，nps可以配置任意端口，实现与其它服务共存。</li>
</ul>
<h3>三、相关文档</h3>
<ul>
<li>NPS 配置文档：https://ehang-io.github.io/nps/#/</li>
<li>NPS 安装包：https://github.com/ehang-io/nps/releases</li>
<li>NPS 源码：https://github.com/ehang-io/nps</li>
</ul>
<h3>四、环境说明</h3>
<ul>
<li>服务器端是我的Ubuntu(arm)云服务器；</li>
<li><strong>客户端是本地N1盒子Openwrt系统的nps插件（无需安装客户端）</strong>。</li>
</ul>
<h3>五、演示安装</h3>
<h4>1. 服务端</h4>
<ul>
<li><strong>Docker拉取Nps镜像</strong></li>
</ul>
<pre><code class="language-shell line-numbers">#拉取nps镜像
docker pull ffdfgdfg/nps
#创建nps配置文件目录
mkdir -p /root/nps/conf
</code></pre>
<ul>
<li>github下载配置文件，<strong>将nps-master下的conf文件拷贝至服务器上的/root/nps/conf目录下</strong></li>
</ul>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/11/wp_editor_md_265c4dd6295be6b20c0ebbaea52b7f2f.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/11/wp_editor_md_265c4dd6295be6b20c0ebbaea52b7f2f.jpg" alt="" /></a></p>
<p><span id="more-334"></span></p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/11/wp_editor_md_5f324c40e1444e06a3980f7f451b335a.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/11/wp_editor_md_5f324c40e1444e06a3980f7f451b335a.jpg" alt="" /></a></p>
<ul>
<li><strong>修改nps.conf配置</strong></li>
</ul>
<pre><code class="language-shell line-numbers">#编辑nps.conf
vim /root/nps/conf/nps.conf

#nps.conf
appname = nps
runmode = dev

http_proxy_ip=0.0.0.0
http_proxy_port=19000
https_proxy_port=19001
https_just_proxy=true

https_default_cert_file=conf/server.pem
https_default_key_file=conf/server.key

bridge_type=tcp
bridge_port=19002
bridge_ip=0.0.0.0

public_vkey=123

log_level=7

web_host=a.o.com
web_username=admin
web_password=123
web_port = 19003
web_ip=0.0.0.0
web_base_url=
web_open_ssl=false
web_cert_file=conf/server.pem
web_key_file=conf/server.key
auth_crypt_key =1234567887654321
allow_user_login=false
allow_user_register=false
allow_user_change_username=false
allow_flow_limit=false
allow_rate_limit=false
allow_tunnel_num_limit=false
allow_local_proxy=false
allow_connection_num_limit=false
allow_multi_ip=false
system_info_display=false
http_cache=false
http_cache_length=100
http_add_origin_header=false[object Object]


</code></pre>
<ul>
<li><strong>docker启动nps，注意防火墙是否开放相关端口</strong></li>
</ul>
<pre><code class="language-shell line-numbers">#启动nps，端口开放19000-19010
docker run -d -p 19000-19010:19000-19010 -v /root/nps/conf:/conf --name=nps --restart=always ffdfgdfg/nps
</code></pre>
<ul>
<li><strong>访问Nps后台：http://IP:19003 默认账号密码是配置文件中的admin/123(可自行更改)。</strong></li>
</ul>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/11/wp_editor_md_dc27a065af42956f136ee1424fd069e9.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/11/wp_editor_md_dc27a065af42956f136ee1424fd069e9.jpg" alt="" /></a></p>
<ul>
<li><strong>创建nps客户端及tcp隧道</strong></li>
</ul>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/11/wp_editor_md_1f47862aa69dd09a9dd397316ba0d9cc.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/11/wp_editor_md_1f47862aa69dd09a9dd397316ba0d9cc.jpg" alt="" /></a></p>
<p><!--more--></p>
<p>创建客户端，点击客户端详情查看 <strong>-server/-key</strong> 两个参数。</p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/11/wp_editor_md_3e67ef83c08e03524f834e442df1a1a9.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/11/wp_editor_md_3e67ef83c08e03524f834e442df1a1a9.jpg" alt="" /></a></p>
<h4>2. 客户端</h4>
<ul>
<li><strong>进入内网OpenWrt，打开nps插件，输入server及key参数保存，在服务端即可发现客户端已连接。</strong></li>
</ul>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/11/wp_editor_md_fa3e4010917fd1997f207478acc8c24f.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/11/wp_editor_md_fa3e4010917fd1997f207478acc8c24f.jpg" alt="" /></a></p>
<h4>3. 配置转发</h4>
<ul>
<li><strong>查看客户端状态</strong></li>
</ul>
<p>此处可以看到一个客户端ID为6，连接状态为在线。</p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/11/wp_editor_md_701405fdb3565a5c8c329c7b615ee226.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/11/wp_editor_md_701405fdb3565a5c8c329c7b615ee226.jpg" alt="" /></a></p>
<ul>
<li><strong>添加tcp隧道转发</strong></li>
</ul>
<p>如下配置表示<strong>将服务端的1XXX6端口转发到局域网内192.168.50.1/3的80/5244等端口</strong>。其他的UDP、SOCKS、HTTP也是类似的配置不再赘述。</p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/11/wp_editor_md_7a46b904fdeb607003c0270434ee4951.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/11/wp_editor_md_7a46b904fdeb607003c0270434ee4951.jpg" alt="" /></a></p>
<h4>4. 总结</h4>
<p>NPS及OpenWrt的配置安装都很便捷，如果你有一台自己的VPS云服务器，可以尝试一下，将你的家庭本地电脑映射到外网服务器。<strong>访问公网IP+对应1XXXX端口即可访问到内网对应服务。</strong></p>
<h4>5. 参考文章</h4>
<p>不同的安装环境可以看看其他博文：</p>
<p>超详细openwrt内网穿透-nps小白教程：https://vpsxb.net/419/<br />
软路由openwrt之nps内网穿透插件服务：https://www.vjsun.com/424.html<br />
nps实现内网穿透，电脑免费变云服务器：https://tangly1024.com/article/nps-centos-nat-traversal<br />
N1盒子op系统nps内网穿透对接腾讯云傻妞：https://blog.csdn.net/hebine7/article/details/122373365<br />
docker安装nps实现内网穿透：https://5616760.com/docker/nps/2021/08/09/docker-nps.html</p>
<p><a href="https://www.laobaiblog.top/2022/11/02/docker%e5%ae%89%e8%a3%85nps%e5%ae%9e%e7%8e%b0openwrt%e5%86%85%e7%bd%91%e7%a9%bf%e9%80%8f/">Docker安装nps实现[OpenWrt]内网穿透</a>最先出现在<a href="https://www.laobaiblog.top">Liao&#039;s blog</a>。</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>N1盒子刷入OpenWrt设置旁路由实现科学上网</title>
		<link>https://www.laobaiblog.top/2022/07/26/n1%e7%9b%92%e5%ad%90%e5%88%b7%e5%85%a5openwrt%e8%ae%be%e7%bd%ae%e6%97%81%e8%b7%af%e7%94%b1%e5%ae%9e%e7%8e%b0%e7%a7%91%e5%ad%a6%e4%b8%8a%e7%bd%91/</link>
		
		<dc:creator><![CDATA[大白]]></dc:creator>
		<pubDate>Tue, 26 Jul 2022 07:44:31 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[分享]]></category>
		<category><![CDATA[N1]]></category>
		<category><![CDATA[openwrt]]></category>
		<guid isPermaLink="false">https://www.laobaiblog.top/?p=249</guid>

					<description><![CDATA[<p>N1盒子我在前文刷入了joyo1大神的安卓盒子及蓝光播放机双系统 感兴趣可以看看之前的博文 安装环境 &#8230;</p>
<p><a href="https://www.laobaiblog.top/2022/07/26/n1%e7%9b%92%e5%ad%90%e5%88%b7%e5%85%a5openwrt%e8%ae%be%e7%bd%ae%e6%97%81%e8%b7%af%e7%94%b1%e5%ae%9e%e7%8e%b0%e7%a7%91%e5%ad%a6%e4%b8%8a%e7%bd%91/">N1盒子刷入OpenWrt设置旁路由实现科学上网</a>最先出现在<a href="https://www.laobaiblog.top">Liao&#039;s blog</a>。</p>
]]></description>
										<content:encoded><![CDATA[<p><em>N1盒子我在前文刷入了joyo1大神的安卓盒子及蓝光播放机双系统<br />
感兴趣可以看看之前的<a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/2022/05/18/idea2021-%e8%bf%85%e9%9b%b7%e7%a0%b4%e8%a7%a3%e7%89%88-n1%e7%9b%92%e5%ad%90%e5%a4%9a%e7%b3%bb%e7%bb%9f%e5%9b%ba%e4%bb%b6%e5%8c%85%e5%88%86%e4%ba%ab/">博文</a></em></p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_1bad57895b84bc5293210c56b931867d.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_1bad57895b84bc5293210c56b931867d.jpg" alt="" /></a></p>
<hr />
<h1>安装环境</h1>
<ol>
<li><a class="wp-editor-md-post-content-link" href="https://pan.baidu.com/s/15b1OWLXcmpJjqdaYFKvIlg?pwd=6nc4">镜像包百度云下载</a> 提取码：6nc4</p>
</li>
<li><a class="wp-editor-md-post-content-link" href="https://mrliao.lanzouj.com/iVWrX0nfkstg">烧录U盘工具</a></p>
</li>
<li><a class="wp-editor-md-post-content-link" href="https://mrliao.lanzouy.com/i24FH08fslbe">U盘启动工具</a></p>
</li>
<li>
<p>N1盒子</p>
</li>
</ol>
<p>在这里我用的是<a class="wp-editor-md-post-content-link" href="https://www.right.com.cn/forum/thread-4076037-1-1.html">恩山论坛</a>flippy大神编译最新的+O 版本镜像包。<br />
（原博排版及知识量对于新入手的玩家来说不是太友好）</p>
<p><strong>+O：代表已经装好各类插件</strong></p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_078692b2a3642f180c18ae0b39d5efe2.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_078692b2a3642f180c18ae0b39d5efe2.jpg" alt="" /></a></p>
<h1>刷机教程</h1>
<ol>
<li><a class="wp-editor-md-post-content-link" href="https://www.bilibili.com/video/av331820870/">B站视频教程</a></li>
<li><a class="wp-editor-md-post-content-link" href="https://www.youtube.com/watch?v=8j8-BDTHKAM&#038;t=3s">Youtube视频完整教程</a></li>
</ol>
<h1>注意事项</h1>
<p>（1）在烧录U盘过程中，如果安装失败可以更换U盘多试几次。</p>
<p><strong>（2）刷机完成之后有可能遇到N1盒子无法联通网络问题。</strong><br />
在ShadowSocksRPlus+插件中，测试百度无法链接，在这里我们需要在防火墙中设置几条参数。</p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_6d0014314376d1330e924912e580fba1.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_6d0014314376d1330e924912e580fba1.jpg" alt="" /></a></p>
<ol>
<li>设置N1中的DNS服务</li>
</ol>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_80f823c3aa289dce0a2099383ef6d608.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_80f823c3aa289dce0a2099383ef6d608.jpg" alt="" /></a></p>
<ol start="2">
<li>添加防火墙规则</li>
</ol>
<pre><code class="language-shell line-numbers">iptables -t nat -I POSTROUTING -j MASQUERADE
iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
</code></pre>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_14b798a3cde62a292ed6238e873b6a31.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_14b798a3cde62a292ed6238e873b6a31.jpg" alt="" /></a></p>
<ol start="3">
<li>调整防火墙网关</li>
</ol>
<p>进入TTYD终端，输入命令添加默认192.168.50.1网关</p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_2ddfb35785e1e860d818d89a82977402.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_2ddfb35785e1e860d818d89a82977402.jpg" alt="" /></a></p>
<pre><code class="language-shell line-numbers">root@OpenWrt:~# route
root@OpenWrt:~# route add default gw 192.168.50.1
</code></pre>
<p>最后终于可以ping通外网了</p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_8608826dabc256e5b56dbb762306b0b2.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_8608826dabc256e5b56dbb762306b0b2.jpg" alt="" /></a></p>
<h1>成品展示</h1>
<p>系统概览</p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_5fb4aac38398a02cebc10fb40c61c755.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_5fb4aac38398a02cebc10fb40c61c755.jpg" alt="" /></a></p>
<hr />
<p>网络联通测试</p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_0f8ef06ef0fdf0d628bdc0489e1a1295.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_0f8ef06ef0fdf0d628bdc0489e1a1295.jpg" alt="" /></a></p>
<hr />
<p><a class="wp-editor-md-post-content-link" href="http://www.fast.com">外网网速测试</a></p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_6a693eb45560884da0bb92aef9b6ce03.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_6a693eb45560884da0bb92aef9b6ce03.jpg" alt="" /></a></p>
<p><span id="more-249"></span></p>
<p><a class="wp-editor-md-post-content-link" href="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_a5e9e6574b534340ab987f3b3aa3be27.jpg"><img decoding="async" src="https://www.laobaiblog.top/wp-content/uploads/2022/07/wp_editor_md_a5e9e6574b534340ab987f3b3aa3be27.jpg" alt="" /></a></p>
<p><a href="https://www.laobaiblog.top/2022/07/26/n1%e7%9b%92%e5%ad%90%e5%88%b7%e5%85%a5openwrt%e8%ae%be%e7%bd%ae%e6%97%81%e8%b7%af%e7%94%b1%e5%ae%9e%e7%8e%b0%e7%a7%91%e5%ad%a6%e4%b8%8a%e7%bd%91/">N1盒子刷入OpenWrt设置旁路由实现科学上网</a>最先出现在<a href="https://www.laobaiblog.top">Liao&#039;s blog</a>。</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
