<?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>pppd &#8211; 記下來</title>
	<atom:link href="https://noter.tw/tag/pppd/feed/" rel="self" type="application/rss+xml" />
	<link>https://noter.tw</link>
	<description>一路上踩到的坑、遇到的問題，一點一滴記下來，希望能幫助到需要的人~</description>
	<lastBuildDate>Wed, 26 Apr 2023 01:37:35 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.3</generator>

<image>
	<url>https://noter.tw/wp-content/uploads/cropped-old-1130742_1920-1-32x32.jpg</url>
	<title>pppd &#8211; 記下來</title>
	<link>https://noter.tw</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Mac OSX 使用 VPN 連線 (pptp)</title>
		<link>https://noter.tw/4624/mac-osx-%e4%bd%bf%e7%94%a8-vpn-%e9%80%a3%e7%b7%9a-pptp/</link>
					<comments>https://noter.tw/4624/mac-osx-%e4%bd%bf%e7%94%a8-vpn-%e9%80%a3%e7%b7%9a-pptp/#comments</comments>
		
		<dc:creator><![CDATA[黃小蛙]]></dc:creator>
		<pubDate>Sat, 13 Apr 2019 06:06:31 +0000</pubDate>
				<category><![CDATA[技術相關]]></category>
		<category><![CDATA[技巧分享]]></category>
		<category><![CDATA[VPN]]></category>
		<category><![CDATA[PPTP]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Mac 小技巧]]></category>
		<category><![CDATA[pppd]]></category>
		<category><![CDATA[2019]]></category>
		<guid isPermaLink="false">https://noter.tw/?p=4624</guid>

					<description><![CDATA[<p>如果你是 Mac 或是 iPhone 的使用者，會發現設定 VPN 連線中沒有 PPTP 的選項可以選，這篇記錄一下怎麼讓 Mac OSX 可以透過一些設定來使用 PPTP 類型的 VPN。（2019&#46;&#46;&#46;</p>
<p>這篇文章 <a rel="nofollow" href="https://noter.tw/4624/mac-osx-%e4%bd%bf%e7%94%a8-vpn-%e9%80%a3%e7%b7%9a-pptp/" data-wpel-link="internal">Mac OSX 使用 VPN 連線 (pptp)</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></description>
										<content:encoded><![CDATA[
<p>如果你是 Mac 或是 iPhone 的使用者，會發現設定 VPN 連線中沒有 PPTP 的選項可以選，這篇記錄一下怎麼讓 Mac OSX 可以透過一些設定來使用 PPTP 類型的 VPN。<mark class="pink-solid">（2019-11-12 更新）Catalina 版本已經移除 pptp 了，會出現錯誤 pppd: Couldn&#8217;t load plugin PPTP.ppp，小蛙目前 google 到的結果顯示貌似只有看到 VPN Tracker 365 支援，但實在太貴下不了手 &#8230;</mark> <a href="https://www.vpntracker.com/us/editions.html" target="_blank" rel="noopener noreferrer nofollow external" data-wpel-link="external" class="wpel-icon-right">價格表<span class="wpel-icon wpel-image wpel-icon-6"></span></a></p>



<span id="more-4624"></span>



<p>小蛙很久以前寫過一篇架設 PPTP VPN 的文章 &#8211; <a rel="noreferrer noopener" aria-label=" (在新分頁中開啟)" href="https://noter.tw/3070/%e9%80%8f%e9%81%8e-pptpd-%e6%9e%b6%e8%a8%ad-vpn/" target="_blank" data-wpel-link="internal">透過 pptpd 架設 VPN</a>，但後來發現沒辦法設定 VPN 連線了，可參考 <a rel="noreferrer noopener nofollow external" aria-label=" (在新分頁中開啟)" href="https://derflounder.wordpress.com/2016/06/25/pptp-vpns-no-longer-supported-by-apples-built-in-vpn-client-on-macos-sierra-and-ios-10/" target="_blank" data-wpel-link="external" class="wpel-icon-right">PPTP VPNs no longer supported by Apple’s built-in VPN client on macOS Sierra and iOS 10<span class="wpel-icon wpel-image wpel-icon-6"></span></a>，上網查了一些文章之後發現其實是可以透過內建的 pppd 服務來進行 PPTP VPN 連線的。</p>



<p>要做到這件事情比想像中的簡單，只要先設定好腳本，再透過 terminal 指令來啟動連線就可以了，立刻開始吧！（原文：<a rel="noreferrer noopener nofollow external" aria-label="PPTP VPN on macOS Sierra (在新分頁中開啟)" href="https://malucelli.net/2017/05/16/pptp-vpn-on-macos-sierra/" target="_blank" data-wpel-link="external" class="wpel-icon-right">PPTP VPN on macOS Sierra<span class="wpel-icon wpel-image wpel-icon-6"></span></a>）</p>



<h2 class="para wp-block-heading">建立連線設定檔</h2>



<p>要使用 VPN 連線必須要先做連線檔設定</p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">sudo vim /etc/ppp/peers/myvpn  (改成自己方便記憶的名字）</pre>



<p>接著可以直接把下面的內容複製起來貼進去</p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">plugin PPTP.ppp
noauth
# logfile /tmp/ppp.log
remoteaddress "連線位置"
user "連線帳號"
password "連線密碼"
redialcount 1
redialtimer 5
idle 1800
# mru 1368
# mtu 1368
receive-all
novj 0:0
ipcp-accept-local
ipcp-accept-remote
# noauth
refuse-eap
refuse-pap
refuse-chap-md5
hide-password
mppe-stateless
mppe-128
# require-mppe-128
looplocal
nodetach
# ms-dns 8.8.8.8
usepeerdns
# ipparam gwvpn
defaultroute
debug</pre>



<p>:wq 存檔出來後，設定就完成了，來連線吧！</p>



<h2 class="para wp-block-heading">連線</h2>



<p>回到 terminal 之後，透過</p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code">sudo pppd call myvpn  # myvpn 是剛剛設定檔的名字</pre>



<p>就會開始進行連線了。</p>



<h2 class="para wp-block-heading">設定 aliases（選用）</h2>



<p>因為小蛙很懶而且很容易忘記，有時候太久沒用就不太記得要怎麼連 VPN，這邊小蛙直接設定成自己容易記憶的方式來連線，將下面內容貼到 ~/.bash_profile 最下面，接著 source ~/.bash_profile。</p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code"># 列出所有可連線的 pptpd vpn
function vpnls(){
        ls /etc/ppp/peers/
}
# 進行連線
function vpn(){
        sudo pppd call $1
}
# 中斷連線
function vpndis(){
        sudo kill $(ps aux | grep pppd | awk '{print $2}')
}</pre>



<p>以後只要這樣做就可以了</p>



<pre class="wp-block-preformatted wp-block-syntaxhighlighter-code"># 查看有哪些連線
$ vpnls
177 myvpn ssf
# 進行連線
$ vpn myvpn
# 中斷連線
$ vpndis</pre>



<p>是不是很簡單呢？只要把 vpnls, vpn xxx, vpndis 改成自己容易記憶的方式，除了可以少打一些字，也不用每次要連線都回想老半天！</p>


<h2 class="para">與 VPN 相關的文章</h2><ul><li><span style="font-size: 1em;"><a href="https://noter.tw/12603/%e9%9b%bb%e7%8e%a9%e8%a6%81%e9%80%9a%e9%97%9c%ef%bc%8c%e5%ae%89%e5%85%a8%e5%85%88%e9%81%8e%e9%97%9c/" data-wpel-link="internal">電玩要通關，安全先過關</a></span></li><li><span style="font-size: 1em;"><a href="https://noter.tw/12024/%e5%a6%82%e4%bd%95%e6%a0%b9%e6%93%9a%e6%82%a8%e7%9a%84%e9%9c%80%e6%b1%82%e9%81%b8%e6%93%87%e6%9c%80%e4%bd%b3-vpn-%e6%8f%90%e4%be%9b%e5%95%86/" data-wpel-link="internal">如何根據您的需求選擇最佳 VPN 提供商?</a></span></li><li><span style="font-size: 1em;"><a href="https://noter.tw/11355/surfshark-vpn-%e7%9a%84-9-%e5%80%8b%e4%bd%bf%e7%94%a8%e6%8a%80%e5%b7%a7/" data-wpel-link="internal">Surfshark VPN 的 9 個使用技巧</a></span></li><li><span style="font-size: 1em;"><a href="https://noter.tw/4552/iphone-vpn-%e9%80%a3%e7%b7%9a%e8%a8%ad%e5%ae%9a-l2tp/" data-wpel-link="internal">iPhone VPN 連線設定 &#8211; L2TP</a></span></li><li><span style="font-size: 1em;"><a href="https://noter.tw/9327/%e8%ae%93%e6%82%a8%e7%9e%ac%e9%96%93%e5%88%87%e6%8f%9b%e5%9c%8b%e5%ae%b6%e7%9a%84-%e5%85%8d%e8%b2%bb-vpn/" data-wpel-link="internal">免費 VPN : Chrome 擴充套件 uVPN、 Windscribe 使用教學</a></span></li><li><span style="font-size: 1em;"><a href="https://noter.tw/4624/mac-osx-%e4%bd%bf%e7%94%a8-vpn-%e9%80%a3%e7%b7%9a-pptp/" data-wpel-link="internal">Mac OSX 使用 VPN 連線 (pptp)</a></span></li><li><span style="font-size: 1em;"><a href="https://noter.tw/4539/windows-vpn-%e8%a8%ad%e5%ae%9a-%e4%bd%bf%e7%94%a8-softether-vpn/" data-wpel-link="internal">Windows VPN 設定 &#8211; 使用 SoftEther VPN</a></span></li><li><span style="font-size: 1em;"><a href="https://noter.tw/4524/softether-vpn-%e6%9e%b6%e8%a8%ad%e8%a8%98%e9%8c%84/" data-wpel-link="internal">SoftEther VPN 架設記錄</a></span></li><li><span style="font-size: 1em;"><a href="https://noter.tw/3309/centos-couldnt-open-the-devppp-device-permission-denied/" data-wpel-link="internal">CentOS &#8211; Couldn&#039;t open the /dev/ppp device: Permission denied</a></span></li><li><span style="font-size: 1em;"><a href="https://noter.tw/3070/%e9%80%8f%e9%81%8e-pptpd-%e6%9e%b6%e8%a8%ad-vpn/" data-wpel-link="internal">透過  pptpd 架設 VPN</a></span></li></ul><p>這篇文章 <a rel="nofollow" href="https://noter.tw/4624/mac-osx-%e4%bd%bf%e7%94%a8-vpn-%e9%80%a3%e7%b7%9a-pptp/" data-wpel-link="internal">Mac OSX 使用 VPN 連線 (pptp)</a> 最早出現於 <a rel="nofollow" href="https://noter.tw" data-wpel-link="internal">記下來</a>。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://noter.tw/4624/mac-osx-%e4%bd%bf%e7%94%a8-vpn-%e9%80%a3%e7%b7%9a-pptp/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
	</channel>
</rss>
