Raspberry Pi
、Linux
、Debian
、VPN
首先你要有的是
建議先更新樹莓派,這步驟各位都是知道的我就點到就好
$ sudo apt update
$ sudo apt upgrade
輸入下方指令開始下載,載入中途就會開始進行設定
$ curl -L https://install.pivpn.io | bash
下載完會自動跳轉畫面,按下<Ok>
Learn More →
提醒接下來設定VPN Server是需要實體IP的。
接下來要設定IP與Gateway,按下<Ok>
Learn More →
先問你是不是現在的網路設定就好?
是就選<Yes>
,繼續往下設定。
不是就選<No>
,就會進入手動設定IP畫面。
Learn More →
Learn More →
Learn More →
Learn More →
Learn More →
Learn More →
Learn More →
跟你說這邊有支援下面兩個VPN協定。
用 空白鍵選完按下 enter
Learn More →
先告訴你預設大概是使用UDP等設定,問你要不要去手動更改設定。
可以接受就按<No>
,要改動就按<Yes>
Learn More →
選擇使用的模型,我選UDP,用 空白鍵選完按下 enter
Learn More →
Learn More →
這邊選擇要使用的DNS Server,若有自己的就選Custom
,這邊選擇Google
。
Learn More →
問你要使用自己的網域嗎?要就按下<Yes>
並輸入自己的網域名稱。
Learn More →
選擇是要自己設定DNS還是使用固定IP自動連線
Learn More →
OpenVPN 2.4有提供較快速的安全機制,有使用到OpenVPN 2.4以上可以按下<Yes>
Learn More →
選擇憑證加密的方式,這邊使用256位元進行加密。
Learn More →
Learn More →
Learn More →
問是不是要啟動自動安全更新,要就選<Yes>
。
接下來等他設定一下
Learn More →
到這邊看到這個就是安裝完成,也已經啟動好了。
完成後會提示你安裝完成,需要重開。
$ pivpn add
enter完就會出下面幾個提問
#設定名稱
Enter a Name for the Client: kagami
#檔案有效期限(以日計算)
How many days should the certificate last? 1080
Enter the password for the client: #輸入密碼
Enter the password again to verify: #再次輸入密碼
若順利的話,接下來應該看得到這一串處理流程。
spawn ./easyrsa build-client-full kagami
Note: using Easy-RSA configuration from: /etc/openvpn/easy-rsa/vars
Using SSL: openssl OpenSSL 1.1.1d 10 Sep 2019
Generating an EC private key
writing new private key to '/etc/openvpn/easy-rsa/pki/easy-rsa-974.rTrkBP/tmp.SHSzYv'
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
-----
Using configuration from /etc/openvpn/easy-rsa/pki/easy-rsa-974.rTrkBP/tmp.rpIc3q
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
commonName :ASN.1 12:'kagami'
Certificate is to be certified until Aug 11 08:04:08 2023 GMT (1080 days)
Write out database with 1 new entries
Data Base Updated
Client's cert found: kagami.crt
Client's Private Key found: kagami.key
CA public Key found: ca.crt
tls Private Key found: ta.key
========================================================
Done! kagami.ovpn successfully created!
kagami.ovpn was copied to:
/home/pi/ovpns
for easy transfer. Please use this profile only on one
device and create additional profiles for other devices.
========================================================
其中要注意的是,完成後會生成一份你設定的名稱.ovpn
檔案提供給OpenVPN使用,位置是/home/pi/ovpns
。
$ pivpn -l
$ pivpn -c
$ pivpn -u
中間會出現一些問答
::: Do you wish to completely remove PiVPN configuration and installed packages from your system? (You will be prompted for each package) [y/n]: y
::: Do you wish to remove dnsutils from your system? [Y/n]: y
::: Do you wish to remove iptables-persistent from your system? [Y/n]: y
::: Do you wish to remove openvpn from your system? [Y/n]: y
::: Do you wish to remove grepcidr from your system? [Y/n]: y
::: Do you wish to remove expect from your system? [Y/n]: y
::: Do you wish to remove unattended-upgrades from your system? [Y/n]: y
移除完會出現下方訊息,會提示需要重啟。
::: Removing VPN configuration files...
:::
::: Removing pivpn system files...
:::
::: Finished removing PiVPN from your system.
::: Reinstall by simpling running
:::
::: curl -L https://install.pivpn.io | bash
:::
::: at any time!
:::
It is strongly recommended to reboot after un-installation.
Would you like to reboot now? [y/n]:
利用
Dec 9, 2023真的是要謝中華電信給了一堆神一般的限制,在與朋友的研究、以及中華電信SSL憑證部門的技術員(5p 2k7ul4ej/ d9 1ul3u;6s84ej/ t/6g qo6xk7ji3cl3ru3wu0 u06ru.45k4ek7)的努力之下,終於把這鬼東西研究好了,寫下這份筆記也是想留給在目前有使用到中華電信發現DNS跳轉無法順利設定的朋友們。
Oct 23, 2023久違復活的Gary說個Hi,鑑於最近主力的筆電開始無法負荷了所以就有了這次計畫,順手做了筆記來放個。當然要先說個,每個電腦與設備環境,產生出來的化學效果(咦?)都不一樣,這邊就給大家做個參考,那就開始囉。 前因 本來要出差可以出國好開心 順勢就準備一筆錢做stand by 然而並沒有,不要瞎掰好嗎 公司加上自己的東西,256GB真的不夠用
Jun 13, 2021機台規格 因為版本有四種,這邊直接附上GITHUB REPO連結 有線連接方法 前置準備 查看sensor版本 在文件中他有說到: T-Wristband has two types of sensors, LSM9DS1 and MPU9250 sensors. How to distinguish the version you bought, please see the upper right part of the board below to distinguish
May 14, 2021or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up