0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Raspberry Pi を L2TP VPN に接続する

Posted at

在宅勤務などのオンライン化のために Raspberry Pi を L2TP VPN で接続したいと思ったのだがなかなか難しかったので参考になればということで記録を残します。
Linuxでの L2TP VPN への接続は strongswan などを用いて IPSec接続するような接続設定をすることもできるようだが、これだと単なるクライアント接続なのに Windows などと比べてあまりにも難しい接続方法になってしまう。そのため、試行錯誤の結果ネットワーク接続設定管理を Network Manager に変更して、Network Manager の L2TP VPN クライアントで接続することにした。

前提

  1. Windows や macOS で接続できる L2TP VPN への接続性
  2. Raspberry Pi (RaspbianOS Buster)

設定

  1. Network Manager のインストール
sudo apt-get update; sudo apt-get upgrade; sudo apt-get install network-manager network-manager-gnome network-manager-l2tp network-manager-l2tp-gnome libreswan 2. Network Manager の設定 - /etc/NetworkManager/NetworkManager.conf managed=true 3. dhcpcd の設定解除 - /etc/network/interfaces にある Network Manager が管理するインターフェースの記述を削除 (en0,wlan0 などを削除する.削除することでdhclientによる設定がされなくなる.) 1. 再起動 4. Network Manager で接続設定 - sudo nmtui でVPNの接続設定をする - メニューにシステムトレイ(nm-applet)を追加する

利用

  1.  VPN接続のアクティベーション
    • sudo nmtui してVPN接続をアクティベーション

残課題

  1. tui からしか接続できないのはなんとかならないのか。
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?