Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

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 1 year has passed since last update.

OpenVPNでのクライアントのIP固定化

Last updated at Posted at 2023-06-27

OpenVPNでクライアントIPを固定化する際に下記記事を参考にした際にnetshでエラーが発生したため改善策をメモ

参考記事

https://qiita.com/11ohina017/items/c286d49519d2ff1fa2b8
https://lab4ict.com/system/archives/4787

原因

ifconfig-pushの2つ目の引数がサブネットマスクを指定しないといけないため

実行環境

  • server
    Ubuntu 20.04.5 LTS
    OpenVPN 2.4.7 x86_64-pc-linux-gnu
  • client
    windows 10 Pro 22H2
    vpnuxClient 3.1.8559.12288

設定内容

  • クライアント別の設定を有効にする
vi /etc/openvpn/server.conf
    #クライアント別設定ディレクトリの指定
    client-config-dir ccd
  • クライアント設定の追加
vi /etc/openvpn/ccd/[クライアント名]
    #固定IPの指定 10.8.0.X 255.255.255.0
    ifconfig-push [割り振りたいIP] [サブネットマスク]

必要であればほかのクライアントも設定を行う

  • サービスの再起動
service openvpn restart
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

Qiita Conference 2025 will be held!: 4/23(wed) - 4/25(Fri)

Qiita Conference is the largest tech conference in Qiita!

Keynote Speaker

ymrl、Masanobu Naruse, Takeshi Kano, Junichi Ito, uhyo, Hiroshi Tokumaru, MinoDriven, Minorun, Hiroyuki Sakuraba, tenntenn, drken, konifar

View event details
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?