転載・引用について

ユーザ用ツール

サイト用ツール


networkapp:pfsense:openvpn

pfSenseでOpenVPN

幾つかの理由で、pfSenseを用いてOpenVPN接続を設定しなければならなくなったので、そのメモ。

  • 今回はBridgeモードで動かしたいので、Tapを利用する設定でいく。
  • Security的に弱いのは承知の上で、認証を個人証明書ではなくPassword Authenticationにする

以下にやったことを記載する。

  1. pfSenseにlogin
  2. System→Package→Avail Package
    • OpenVPN Client Export Utilityを突っ込む
  3. 証明書を作成
    • System→Cert Manager→CAタブ
      • 「+」をクリック
      • Descriptive Name 何か良い名前をつける
      • Method Create internal Certificate Authority
      • Key length 4096
      • Digest Algorithm SHA512
      • Lifetime 730 (2年)
      • Distinguished name それぞれ必要な情報を入れる
    • System→Cert Manager→Certificatesタブ
      • 「+」をクリック
      • Method Create and internal Certificate
      • Descriptive name 良い名前を入れる
      • Key Length 4096
      • Digest Algorithm SHA512
      • Certificate Type Server Certificate
      • Lifetime 730 (2年)
      • Distinguished name それぞれ必要な情報を入れる
    • System→Cert Manager→Certificate Revocationタブ
      • Method Create an internal Certificate Revocation List
      • Descriptive name 良い名前を入れる
  4. OpenVPN 設定
    • VPN→OpenVPN→Server
    • 「+」をクリック
    • General Information
      • Server Mode: Remote Access(User Auth)
      • Protocol UDP(TCPでも良いが、UDPの方が性能がよさそう
      • Device Mode tap
      • Interface WAN (Global Addressが付いているI/F)
      • Description 適切なものを記載する
    • Cryptographic Settings
      • Peer Certificate Authority 上記で作成したものを選ぶ
      • Peer Certificate Revocation List 上記で作成したものを選ぶ
      • Server Certificate 上記で作成したものを選ぶ
      • DH Parameters Length 4096
      • Encryption Algorithm AES-256-CBC
      • Auth Digest Algorithm SHA512
      • Hardware Crypto BSD cryptodev Engine
        • (CPUがAES-NI機能を持ち、かつ利用できる場合)
    • Tunnel Settings
      • Bridge DHCP Check
      • Bridge Interface LAN等
      • Server Bridge DHCP Start 割り当てアドレス(開始)
      • Concurrent connections 同時接続数
      • Compression Enable with Adaptive Compression
    • Client Settings
      • Dynamic IP Check
      • Address Pool UnCheck
      • DNS Default Domain 必要に応じて設定
      • DNS Servers 必要なDNS Serverを設定
  5. Firewall Ruleの作成
    • Firewalls→Rules→WANタブ
    • 「+」をクリック
    • Action Pass
    • Interface WAN
    • TCP/IP Version IPv4+IPv6
    • Protocol TCP/UDP
      • (VPN→OpenVPN→Server→General Information→Protocolで設定したもの)
    • Source any
    • Destination WAN Address
    • Destination port range OpenVPN(1194)
    • Description 適切なものを記載する
  6. OpenVPN用I/Fを作成
    • Interface→Assign
    • 「+」
    • ovpnsの適切なものを選択し「+」
    • 作成されたI/Fを選択
    • Enable Interface Check
    • Description 適切なものを記載
  7. Bridgeを作成
    • Interface→Assign→Bridgeタブ
    • 「+」
    • 必要なI/Fを選択(二つ) 上記で作成したI/FとVPNでの接続先I/F(LANなど)を選ぶ
    • Description 適切なものを記載する
  8. OpenVPNの設定はこれで終了
  9. VPN Client用の設定ファイルを取得する
    • VPN→OpenVPN→Client Exportタブ
    • 情報が正しいことを確認
    • Client Install Package 必要なLinkから設定ファイルを取得
      • Tunnel Brick用はStandard Configurations→ArchiveでOK
  10. 取得した設定をVPN Clientに設定する
    • Tunnel Brickの場合には、単純に*.ovpnをダブルクリックするだけ

これで通信できればOK

このウェブサイトはクッキーを使用しています。 Webサイトを使用することで、あなたはあなたのコンピュータにクッキーを保存することに同意します。 また、あなたはあなたが私たちのプライバシーポリシーを読んで理解したことを認めます。 同意しない場合はウェブサイトを離れてください。クッキーに関する詳細情報
networkapp/pfsense/openvpn.txt · 最終更新: 2016/02/22 19:39 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki