{"id":27843,"date":"2024-02-04T06:51:05","date_gmt":"2024-02-19T01:32:48","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ubuntu%e8%bf%9e%e6%8e%a5%e5%88%b0vpn%e7%bd%91%e5%85%b3%e3%80%82-4\/"},"modified":"2025-08-12T04:55:58","modified_gmt":"2025-08-11T20:55:58","slug":"%e4%bd%bf%e7%94%a8ubuntu%e8%bf%9e%e6%8e%a5%e5%88%b0vpn%e7%bd%91%e5%85%b3%e3%80%82-4","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ubuntu%e8%bf%9e%e6%8e%a5%e5%88%b0vpn%e7%bd%91%e5%85%b3%e3%80%82-4\/","title":{"rendered":"\u4f7f\u7528Ubuntu\u8fde\u63a5\u5230VPN\u7f51\u5173"},"content":{"rendered":"<h1>\u51c6\u5907\u4e8b\u9879<\/h1>\n<h2>\u7531\u4e8e\u6ca1\u6709net-tools\u5b89\u88c5\uff0c\u9700\u8981\u8fdb\u884c\u5b89\u88c5\u3002<\/h2>\n<pre class=\"post-pre\"><code>apt <span class=\"nb\">install <\/span>net-tools\r\n<\/code><\/pre>\n<h2>\u9009\u62e9VPN\u670d\u52a1\u5668<\/h2>\n<\/p>\n<h2>\n\u81ea\u5206\u306e\u74b0\u5883\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u3092\u8abf\u3079\u308b<\/h2>\n<pre class=\"post-pre\"><code>ip route show | <span class=\"nb\">grep <\/span>default\r\n<\/code><\/pre>\n<h1>\n\u5c0e\u5165\u4f5c\u696d<\/h1>\n<h2>\u4e0b\u8f7d\u548c\u542f\u52a8  h\u00e9 <\/h2>\n<h3>VPN\u5ba2\u6237\u7aef\u4e0b\u8f7d<\/h3>\n<\/p>\n<div>\n                            <img decoding=\"async\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657c19f8d0c9c81e0f5aef52\/11-0.png\" class='post-images' alt=\"image.png\" title=\"\">\n                        <\/div>\n<h3>\u89e3\u538btar.gz\u6587\u4ef6<\/h3>\n<pre class=\"post-pre\"><code><span class=\"nb\">tar<\/span> <span class=\"nt\">-xzvf<\/span> \u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30d5\u30a1\u30a4\u30eb\r\n<\/code><\/pre>\n<h3>\u505a<\/h3>\n<p>\u524d\u5f80\u89e3\u538b\u76ee\u5f55\u5e76\u6267\u884c make \u547d\u4ee4\u3002<\/p>\n<pre class=\"post-pre\"><code>make\r\n<\/code><\/pre>\n<h3>\u542f\u52a8VPN\u5ba2\u6237\u7aef<\/h3>\n<pre class=\"post-pre\"><code>.\/vpnclient start\r\n<\/code><\/pre>\n<h3>\u5728\u4e2d\u56fd\u672c\u571f\uff0c\u6dfb\u52a0\u5230VPN\u670d\u52a1\u5668\u7684\u9759\u6001\u8def\u7531\u3002<\/h3>\n<pre class=\"post-pre\"><code>oute add -host [\u4e8b\u524d\u6e96\u5099\u3067\u9078\u629e\u3057\u305fVPNGate\u30b5\u30fc\u30d0\u30fchost] gw [\u5148\u7a0b\u8abf\u3079\u305f\u4eca\u306e\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4IP]\r\n<\/code><\/pre>\n<h2>VPN\u5ba2\u6237\u7aef\u8bbe\u7f6e<\/h2>\n<h3>\u76f4\u63a5\u8f93\u51fa\u5230\u63a7\u5236\u53f0<\/h3>\n<pre class=\"post-pre\"><code>.\/vpncmd\r\n<\/code><\/pre>\n<h3>\u521b\u5efa\u865a\u62df\u7f51\u7edc\u63a5\u53e3<\/h3>\n<pre class=\"post-pre\"><code>NicCreate tun0\r\n<\/code><\/pre>\n<h3>\u542f\u7528\u865a\u62df\u7f51\u7edc\u63a5\u53e3<\/h3>\n<pre class=\"post-pre\"><code>NicEnable tun0\r\n<\/code><\/pre>\n<h3>\u589e\u52a0VPN\u8bbe\u7f6e<\/h3>\n<pre class=\"post-pre\"><code>AccountCreate vpngate0 \/SERVER:[\u4e8b\u524d\u6e96\u5099\u3067\u9078\u629e\u3057\u305fVPNGate\u30b5\u30fc\u30d0\u30fchost:TCP\u30dd\u30fc\u30c8] \/HUB:VPNGATE \/USERNAME:vpn \/NICNAME:tun0\r\n<\/code><\/pre>\n<h3>\u542f\u7528\u533f\u540d\u767b\u5f55<\/h3>\n<pre class=\"post-pre\"><code>AccountAnonymousSet vpngate0\r\n<\/code><\/pre>\n<h3>VPN\u8fde\u63a5<\/h3>\n<pre class=\"post-pre\"><code>AccountConnect vpngate0\r\n<\/code><\/pre>\n<h3>\u9000\u51fa <\/h3>\n<pre class=\"post-pre\"><code>exit\r\n<\/code><\/pre>\n<h2>\nterminal\u4e0a\u3067\u4f5c\u696d<\/h2>\n<h3>\nifconfig\u3067\u8ffd\u52a0\u3057\u305f\u4eee\u60f3LAN\u30ab\u30fc\u30c9\u3092\u78ba\u8a8d<\/h3>\n<pre class=\"post-pre\"><code>ifconfig\r\n<\/code><\/pre>\n<p>\u5e94\u8be5\u80fd\u770b\u5230\u5df2\u6dfb\u52a0\u7684\u8bbe\u5907\uff08vpn_tun0\uff09\u3002<\/p>\n<h3>\u4f7f\u7528dhclient\u83b7\u53d6IP<\/h3>\n<pre class=\"post-pre\"><code>dhclient [device\u540d]\r\n<\/code><\/pre>\n<h3>\ndefault route\u524a\u9664<\/h3>\n<p>\u203b \u4e8b\u524d\u306b\u30c7\u30d5\u30a9\u30eb\u30c8\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u3092\u30e1\u30e2\u3063\u3066\u304a\u304f\u3053\u3068\u3002\u79c1\u306fdefault\u3092\u6d88\u3055\u305a\u3068\u3082\u76ee\u6a19\u306f\u9054\u6210\u3067\u304d\u305f\u3002<br \/>\nroute delete default<\/p>\n<h3>\u5907\u4efd\u547d\u4ee4\u793a\u4f8b<\/h3>\n<pre class=\"post-pre\"><code>route add default gw 192.168.1.1 dev enp7s0\r\n<\/code><\/pre>\n<p>192.168.1.1\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u30b2\u30fc\u30c8\u30a6\u30a7\u30a4\u3001enp7s0\u304c\u901a\u5e38\u4f7f\u3063\u3066\u3044\u308b\u6709\u7ddaLAN\u30c7\u30d0\u30a4\u30b9\u540d\u3002<\/p>\n<h3>\nIP\u78ba\u8a8d<\/h3>\n<\/p>\n<h3>\u8bf7\u53c2\u8003<\/h3>\n<p>\u8fd9\u4e2a\u5f15\u7528\u51e0\u4e4e\u662f\u4ece\u8fd9\u4e2a\u7f51\u7ad9\u4e0a\u62ff\u6765\u7684\uff1ahttp:\/\/rauq04.blogspot.com\/2014\/02\/linux-softether-vpn-client-vpngate.html<\/p>\n<h4>\nVPN Gate<\/h4>\n<p>VPN Gate \u53ef\u4ee5\u8f6c\u8ff0\u4e3a &#8220;\u865a\u62df\u4e13\u7528\u7f51\u7edc\u7f51\u5173&#8221;\u3002<\/p>\n<h3>\u8f6fEther \u4e0b\u8f7d<\/h3>\n<p>\u4e0b\u8f7d\u8f6fEther<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u51c6\u5907\u4e8b\u9879 \u7531\u4e8e\u6ca1\u6709net-tools\u5b89\u88c5\uff0c\u9700\u8981\u8fdb\u884c\u5b89\u88c5\u3002 apt install net-tools \u9009\u62e9VP [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-27843","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528Ubuntu\u8fde\u63a5\u5230VPN\u7f51\u5173 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8e\u4f7f\u7528Ubuntu\u8fde\u63a5\u5230VPN\u7f51\u5173\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528ubuntu\u8fde\u63a5\u5230vpn\u7f51\u5173\u3002-4\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528Ubuntu\u8fde\u63a5\u5230VPN\u7f51\u5173\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8e\u4f7f\u7528Ubuntu\u8fde\u63a5\u5230VPN\u7f51\u5173\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528ubuntu\u8fde\u63a5\u5230vpn\u7f51\u5173\u3002-4\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-19T01:32:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-11T20:55:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657c19f8d0c9c81e0f5aef52\/11-0.png\" \/>\n<meta name=\"author\" content=\"\u79d1, \u96c5\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u79d1, \u96c5\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ubuntu%e8%bf%9e%e6%8e%a5%e5%88%b0vpn%e7%bd%91%e5%85%b3%e3%80%82-4\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ubuntu%e8%bf%9e%e6%8e%a5%e5%88%b0vpn%e7%bd%91%e5%85%b3%e3%80%82-4\/\",\"name\":\"\u4f7f\u7528Ubuntu\u8fde\u63a5\u5230VPN\u7f51\u5173 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2024-02-19T01:32:48+00:00\",\"dateModified\":\"2025-08-11T20:55:58+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a\"},\"description\":\"\u5173\u4e8e\u4f7f\u7528Ubuntu\u8fde\u63a5\u5230VPN\u7f51\u5173\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ubuntu%e8%bf%9e%e6%8e%a5%e5%88%b0vpn%e7%bd%91%e5%85%b3%e3%80%82-4\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ubuntu%e8%bf%9e%e6%8e%a5%e5%88%b0vpn%e7%bd%91%e5%85%b3%e3%80%82-4\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ubuntu%e8%bf%9e%e6%8e%a5%e5%88%b0vpn%e7%bd%91%e5%85%b3%e3%80%82-4\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528Ubuntu\u8fde\u63a5\u5230VPN\u7f51\u5173\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a\",\"name\":\"\u79d1, \u96c5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g\",\"caption\":\"\u79d1, \u96c5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keya\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ubuntu%e8%bf%9e%e6%8e%a5%e5%88%b0vpn%e7%bd%91%e5%85%b3%e3%80%82-4\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528Ubuntu\u8fde\u63a5\u5230VPN\u7f51\u5173 - Blog - Silicon Cloud","description":"\u5173\u4e8e\u4f7f\u7528Ubuntu\u8fde\u63a5\u5230VPN\u7f51\u5173\u7684\u6280\u672f\u6587\u7ae0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528ubuntu\u8fde\u63a5\u5230vpn\u7f51\u5173\u3002-4\/","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528Ubuntu\u8fde\u63a5\u5230VPN\u7f51\u5173","og_description":"\u5173\u4e8e\u4f7f\u7528Ubuntu\u8fde\u63a5\u5230VPN\u7f51\u5173\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u4f7f\u7528ubuntu\u8fde\u63a5\u5230vpn\u7f51\u5173\u3002-4\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2024-02-19T01:32:48+00:00","article_modified_time":"2025-08-11T20:55:58+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657c19f8d0c9c81e0f5aef52\/11-0.png"}],"author":"\u79d1, \u96c5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u79d1, \u96c5","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ubuntu%e8%bf%9e%e6%8e%a5%e5%88%b0vpn%e7%bd%91%e5%85%b3%e3%80%82-4\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ubuntu%e8%bf%9e%e6%8e%a5%e5%88%b0vpn%e7%bd%91%e5%85%b3%e3%80%82-4\/","name":"\u4f7f\u7528Ubuntu\u8fde\u63a5\u5230VPN\u7f51\u5173 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2024-02-19T01:32:48+00:00","dateModified":"2025-08-11T20:55:58+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a"},"description":"\u5173\u4e8e\u4f7f\u7528Ubuntu\u8fde\u63a5\u5230VPN\u7f51\u5173\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ubuntu%e8%bf%9e%e6%8e%a5%e5%88%b0vpn%e7%bd%91%e5%85%b3%e3%80%82-4\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ubuntu%e8%bf%9e%e6%8e%a5%e5%88%b0vpn%e7%bd%91%e5%85%b3%e3%80%82-4\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ubuntu%e8%bf%9e%e6%8e%a5%e5%88%b0vpn%e7%bd%91%e5%85%b3%e3%80%82-4\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528Ubuntu\u8fde\u63a5\u5230VPN\u7f51\u5173"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a","name":"\u79d1, \u96c5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g","caption":"\u79d1, \u96c5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keya\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e4%bd%bf%e7%94%a8ubuntu%e8%bf%9e%e6%8e%a5%e5%88%b0vpn%e7%bd%91%e5%85%b3%e3%80%82-4\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/27843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=27843"}],"version-history":[{"count":1,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/27843\/revisions"}],"predecessor-version":[{"id":81441,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/27843\/revisions\/81441"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=27843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=27843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=27843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}