{"id":659,"date":"2025-10-23T15:47:00","date_gmt":"2025-10-23T07:47:00","guid":{"rendered":"https:\/\/blog.lcsoul.cn\/?p=658"},"modified":"2025-10-23T15:47:00","modified_gmt":"2025-10-23T07:47:00","slug":"%e7%94%a8incus-%e5%bc%80-nat-%e5%b0%8f%e9%b8%a1","status":"publish","type":"post","link":"https:\/\/blog.lcsoul.top\/index.php\/2025\/10\/23\/%e7%94%a8incus-%e5%bc%80-nat-%e5%b0%8f%e9%b8%a1\/","title":{"rendered":"\u7528incus \u5f00 NAT \u5c0f\u9e21"},"content":{"rendered":"<h2>\u5f00\u5c0f\u9e21\u6761\u4ef6<\/h2>\n<p>1\u3001\u516c\u7f51ipv4 vps\u4e00\u53f0\u505a\u6bcd\u9e21\u3002\u6ce8\u610f\uff1a\u4e0d\u80fd\u662fNAT\uff08\u5fc5\u987b\uff09<br \/>\n2\u3001ipv6\uff08\u975e\u5fc5\u987b\uff09\uff1a\u5982\u679c\u4f60\u7684\u6bcd\u9e21\u652f\u6301ipv6 \/64,\u53ef\u4ee5\u7ed9\u5c0f\u5c0f\u9e21\u76f4\u63a5\u5206\u914dipv6<br \/>\n\u5982\u679c\u6ca1\u6709\uff0c\u53ef\u4ee5\u6ce8\u518c he.net \u8d26\u53f7\uff0c\u5229\u7528 he.net \u7684ipv6 \u96a7\u9053\u670d\u52a1\u5b9e\u73b0\u5c0f\u5c0f\u9e21ipv6 \u516c\u7f51\u7684\u652f\u6301<\/p>\n<p>&nbsp;<\/p>\n<h2>\u6b65\u9aa4\uff1a<\/h2>\n<p>1\u3001\u901a\u8fc7ssh\u8fde\u63a5\u4f60\u7684vps<br \/>\n2\u3001DD \u91cd\u88c5\u7cfb\u7edf\uff08\u975e\u5fc5\u987b\uff09\u7cfb\u7edf\u6700\u597d\u662fdebian 12\uff0c \u4e5f\u53ef\u4ee5\u5728\u4e3b\u673a\u5546\u540e\u53f0\u76f4\u63a5\u91cd\u88c5\u4e3adebian12<br \/>\n\u6211\u559c\u6b22\u81ea\u5df1DD,\u547d\u4ee4\u5982\u4e0b\uff1a<br \/>\n\u6ca1\u6709\u5b89\u88c5wget\u00a0 curl\u7684\u53ef\u4ee5\u5148\u5b89\u88c5\u4e00\u4e0b<\/p>\n<pre class=\"corepress-code-pre\"><code>apt update &amp;&amp; apt install wget curl -y<\/code><\/pre>\n<p>\u56fd\u5916<\/p>\n<pre class=\"corepress-code-pre\"><code>curl -O https:\/\/raw.githubusercontent.com\/bin456789\/reinstall\/main\/reinstall.sh || wget -O ${_##*\/} $_<\/code><\/pre>\n<p>\u56fd\u5185<\/p>\n<pre class=\"corepress-code-pre\"><code>curl -O https:\/\/cnb.cool\/bin456789\/reinstall\/-\/git\/raw\/main\/reinstall.sh || wget -O ${_##*\/} $_<\/code><\/pre>\n<p>\u6267\u884c\u547d\u4ee4<\/p>\n<pre class=\"corepress-code-pre\"><code>bash reinstall.sh debian 11  --ssh-port SSH\u7aef\u53e3 --password \u5bc6\u7801<\/code><\/pre>\n<p>\u6267\u884c\u5b8c\u8f93\u5165\u00a0 reboot \u91cd\u542f \u7b49\u5f85\u91cd\u88c5\u5b8c\u6210<\/p>\n<p>3\u3001swap\uff08\u53ef\u9009\uff09<\/p>\n<pre class=\"corepress-code-pre\"><code>curl -L https:\/\/raw.githubusercontent.com\/spiritLHLS\/addswap\/main\/addswap.sh -o addswap.sh &amp;&amp; chmod +x addswap.sh &amp;&amp; bash addswap.sh<\/code><\/pre>\n<p>\u9ed8\u8ba4 \u90091 \u4e00\u76f4\u56de\u8f66\u5c31\u884c<br \/>\n&nbsp;<\/p>\n<h2>\u68c0\u6d4b\u73af\u5883<\/h2>\n<p>\u4f7f\u7528\u540e\u7eed\u811a\u672c\u7684\u52a1\u5fc5\u6267\u884c\u672c\u547d\u4ee4\u68c0\u6d4b\u5bbf\u4e3b\u673a\u662f\u5426\u7b26\u5408\u8981\u6c42<\/p>\n<pre class=\"corepress-code-pre\"><code>bash &lt;(wget -qO- --no-check-certificate https:\/\/raw.githubusercontent.com\/oneclickvirt\/incus\/main\/scripts\/pre_check.sh)<\/code><\/pre>\n<p>incus \u5b89\u88c5<\/p>\n<pre class=\"corepress-code-pre\"><code>curl -L https:\/\/raw.githubusercontent.com\/oneclickvirt\/incus\/main\/scripts\/incus_install.sh -o incus_install.sh &amp;&amp; chmod +x incus_install.sh &amp;&amp; bash incus_install.sh<\/code><\/pre>\n<p>&nbsp;<\/p>\n<h2>\u81ea\u5b9a\u4e49\u6279\u91cf\u751f\u6210\u7248\u672c<\/h2>\n<pre class=\"corepress-code-pre\"><code>curl -L https:\/\/github.com\/oneclickvirt\/incus\/raw\/main\/scripts\/add_more.sh -o add_more.sh &amp;&amp; chmod +x add_more.sh &amp;&amp; bash add_more.sh<\/code><\/pre>\n<p>\u6309\u63d0\u793a\u751f\u6210\u5373\u53ef<\/p>\n<p>\u5f00\u5b8c\u5bb9\u5668\u540e\uff0c\u5177\u4f53\u4fe1\u606f\u4f1a\u751f\u6210\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u7684log\u6587\u4ef6\u4e2d \u4f7f\u7528 <code>cat log<\/code>\u67e5\u770b\u5df2\u5f00\u5bb9\u5668<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n\u6587\u7ae0\u6765\u6e90\uff1a<a href=\"https:\/\/www.nodeloc.com\/t\/topic\/61325\">https:\/\/www.nodeloc.com\/t\/topic\/61325<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f00\u5c0f\u9e21\u6761\u4ef6 1\u3001\u516c\u7f51ipv4 vps\u4e00\u53f0\u505a\u6bcd\u9e21\u3002\u6ce8\u610f\uff1a\u4e0d\u80fd\u662fNAT\uff08\u5fc5\u987b\uff09 2\u3001ipv6\uff08\u975e\u5fc5\u987b\uff09\uff1a\u5982\u679c\u4f60\u7684\u6bcd [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-659","post","type-post","status-publish","format-standard","hentry","category-vps"],"_links":{"self":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/posts\/659","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/comments?post=659"}],"version-history":[{"count":0,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/posts\/659\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/media?parent=659"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/categories?post=659"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/tags?post=659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}