Edited at

Raspberry PIでVPN

RaspberryPIを工場で採用する事例が増えてきている。

工場用に頑丈な箱をつけて販売していたり、

セキュリティの設定をして運用したりしている。

工場からVPNを通して、管理サーバにデータを送る方法も取る場合がある。


dockerでも同じ作業。

RaspberryPIと同じ作業をdockerでも行い、該当ソフトウェアの機能、設定方法を確認する。


VPN

virtual private network(仮想私設網)


pivpn

Raspberry PiをVPNサーバとする

https://qiita.com/morinokami/items/8b58f210c2bdec2b13cd


Open VPN

Raspberry PiでOpenVPNサーバを構築する

https://qiita.com/moyashimanjyu/items/3ee299acc3081630b1d6

OpenVPNで自宅RaspberryPiサーバを公開

https://qiita.com/akiraak/items/4b28e0288cb440ab5ba0

Raspberry PiをVPNGateプロクシにする(Wifi APルータ)

https://qiita.com/mt08/items/01f57f8a6658922755b3


@nabepy

Raspberry Pi 3をOpenVPNサーバにする(前提環境③)VPNサーバ

https://qiita.com/nabepy/items/aed364531dca9d20a079

Raspberry Pi 3をOpenVPNサーバにする(前提環境③)iPhone VPNクライアント

https://qiita.com/nabepy/items/3e3d79670b9c0d0e1982

iPhoneとVPN接続したりして持ち運んでデモをするRaspberry Pi環境

https://qiita.com/nabepy/items/47704696e41b10d86186


SoftEther

SoftEther VPNを使いRaspberry PiをVPNサーバにする

https://qiita.com/nullsnet/items/0b75cf6328653f14bf38

Raspberry Pi 3 にSoftEther VPNを設定するのに6日間

https://qiita.com/dauuricus/items/8453e70b54ab64f22f2d

Raspberry PiでのVPNサーバ構築

https://qiita.com/tkyonezu/items/00311e2285366984891c

30分あれば出来る、RaspberryPIでVPNサーバー構築(IPSec/L2TP Raspbian編)

https://qiita.com/sumyapp/items/b13542e6d0dae5b2153e

Raspberry Pi3にVPNサーバーとVNCサーバー立ててiPhoneから艦これするまでメモ(その1)

https://qiita.com/r9ff12/items/01806a338958b48cfa91

Raspberry Pi に SoftEther_VPN Client をインストール

https://qiita.com/ekzemplaro/items/57b13994fbd1b5e3c286

Raspberry Pi3(Ubuntu18.04LTS)でSoftEther VPN

https://qiita.com/devzooiiooz/items/44a654b11aa23b5eb2f4

Raspberry PiにSoftether VPNサーバーをセットする

https://qiita.com/dauuricus/items/ea0259d48a63f4d45b39

USB over SoftEtherVPN 〜 手元のRaspberryPIのUSBをクラウドを越えてPCへ接続〜

https://qiita.com/nmatsui/items/ede63f91cb51e12e2f8c

Raspberry PiでSoftEther VPN Serverを動かすhttps://qiita.com/kitashu/items/176e21c1a05bf5c90d09

Raspberry PiにSoftEther VPN Bridgeをインストールして常時VPN接続されたネットワークを作成する

https://qiita.com/kakken1988/items/6e4a4ae0a9cdf49564a3


自己参照(self reference)

SoftEtherを知る

https://qiita.com/kaizen_nagoya/items/7a4062f845ebb2539e25

softether on docker(作業中)

https://qiita.com/kaizen_nagoya/items/fd8778bc768f2be734e2

「ソフトイーサ PacketiX VPN入門」を読む

https://qiita.com/kaizen_nagoya/items/3b1d330b2cddaacfa5b8

softether on docker(centos) 作業中

https://qiita.com/kaizen_nagoya/items/8afc39c6a4b1d17d1f76


巻末付録 docker 作業

OgawaKishinoMBP:Downloads ogawakiyoshi$ docker run -it -p 8080:8080 ubuntu /bin/bash 

Unable to find image 'ubuntu:latest' locally
latest: Pulling from library/ubuntu
6abc03819f3e: Pull complete
05731e63f211: Pull complete
0bd67c50d6be: Pull complete
Digest: sha256:f08638ec7ddc90065187e7eabdfac3c96e5ff0f6b2f1762cf31a4f49b53000a5
Status: Downloaded newer image for ubuntu:latest
root@70c145ed23f8:/# apt update
Get:1 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:3 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [4168 B]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:5 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [451 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1344 kB]
Get:9 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [5436 B]
Get:10 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [310 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB]
Get:12 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [803 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [7236 B]
Get:15 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1200 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [10.8 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [3671 B]
Get:18 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [942 B]
Fetched 16.2 MB in 8s (2135 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@70c145ed23f8:/# apt upgrade -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
bash debconf
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 738 kB of archives.
After this operation, 1024 B disk space will be freed.
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 bash amd64 4.4.18-2ubuntu1.1 [615 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 debconf all 1.5.66ubuntu1 [124 kB]
Fetched 738 kB in 3s (277 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 4040 files and directories currently installed.)
Preparing to unpack .../bash_4.4.18-2ubuntu1.1_amd64.deb ...
Unpacking bash (4.4.18-2ubuntu1.1) over (4.4.18-2ubuntu1) ...
Setting up bash (4.4.18-2ubuntu1.1) ...
update-alternatives: error: alternative path /usr/share/man/man7/bash-builtins.7.gz doesn't exist
(Reading database ... 4040 files and directories currently installed.)
Preparing to unpack .../debconf_1.5.66ubuntu1_all.deb ...
Unpacking debconf (1.5.66ubuntu1) over (1.5.66) ...
Setting up debconf (1.5.66ubuntu1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
root@70c145ed23f8:/# apt install sudo vim apt-utils wget adduser gpasswd
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gpasswd
root@70c145ed23f8:/# apt install sudo vim apt-utils wget adduser
Reading package lists... Done
Building dependency tree
Reading state information... Done
adduser is already the newest version (3.116ubuntu1).
The following additional packages will be installed:
ca-certificates file libapt-inst2.0 libexpat1 libgpm2 libmagic-mgc libmagic1 libmpdec2 libpsl5 libpython3.6 libpython3.6-minimal libpython3.6-stdlib libreadline7
libsqlite3-0 libssl1.1 mime-support openssl publicsuffix readline-common vim-common vim-runtime xxd xz-utils
Suggested packages:
gpm readline-doc ctags vim-doc vim-scripts
The following NEW packages will be installed:
apt-utils ca-certificates file libapt-inst2.0 libexpat1 libgpm2 libmagic-mgc libmagic1 libmpdec2 libpsl5 libpython3.6 libpython3.6-minimal libpython3.6-stdlib
libreadline7 libsqlite3-0 libssl1.1 mime-support openssl publicsuffix readline-common sudo vim vim-common vim-runtime wget xxd xz-utils
0 upgraded, 27 newly installed, 0 to remove and 0 not upgraded.
Need to get 14.6 MB of archives.
After this operation, 66.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libapt-inst2.0 amd64 1.6.10 [55.6 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 apt-utils amd64 1.6.10 [208 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libssl1.1 amd64 1.1.0g-2ubuntu4.3 [1130 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 openssl amd64 1.1.0g-2ubuntu4.3 [532 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic/main amd64 ca-certificates all 20180409 [151 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmagic-mgc amd64 1:5.32-2ubuntu0.2 [184 kB]
Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libmagic1 amd64 1:5.32-2ubuntu0.2 [68.5 kB]
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 file amd64 1:5.32-2ubuntu0.2 [22.1 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic/main amd64 libexpat1 amd64 2.2.5-3 [80.2 kB]
Get:10 http://archive.ubuntu.com/ubuntu bionic/main amd64 libmpdec2 amd64 2.4.2-1ubuntu1 [84.1 kB]
Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-minimal amd64 3.6.7-1~18.04 [531 kB]
Get:12 http://archive.ubuntu.com/ubuntu bionic/main amd64 mime-support all 3.60ubuntu1 [30.1 kB]
Get:13 http://archive.ubuntu.com/ubuntu bionic/main amd64 readline-common all 7.0-3 [52.9 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic/main amd64 libreadline7 amd64 7.0-3 [124 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic/main amd64 libsqlite3-0 amd64 3.22.0-1 [496 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-stdlib amd64 3.6.7-1~18.04 [1711 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic/main amd64 sudo amd64 1.8.21p2-3ubuntu1 [428 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic/main amd64 xxd amd64 2:8.0.1453-1ubuntu1 [49.2 kB]
Get:19 http://archive.ubuntu.com/ubuntu bionic/main amd64 vim-common all 2:8.0.1453-1ubuntu1 [70.4 kB]
Get:20 http://archive.ubuntu.com/ubuntu bionic/main amd64 xz-utils amd64 5.2.2-1.3 [83.8 kB]
Get:21 http://archive.ubuntu.com/ubuntu bionic/main amd64 libpsl5 amd64 0.19.1-5build1 [41.8 kB]
Get:22 http://archive.ubuntu.com/ubuntu bionic/main amd64 publicsuffix all 20180223.1310-1 [97.6 kB]
Get:23 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 wget amd64 1.19.4-1ubuntu2.2 [316 kB]
Get:24 http://archive.ubuntu.com/ubuntu bionic/main amd64 libgpm2 amd64 1.20.7-5 [15.1 kB]
Get:25 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6 amd64 3.6.7-1~18.04 [1415 kB]
Get:26 http://archive.ubuntu.com/ubuntu bionic/main amd64 vim-runtime all 2:8.0.1453-1ubuntu1 [5437 kB]
Get:27 http://archive.ubuntu.com/ubuntu bionic/main amd64 vim amd64 2:8.0.1453-1ubuntu1 [1152 kB]
Fetched 14.6 MB in 7s (2078 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libapt-inst2.0:amd64.
(Reading database ... 4040 files and directories currently installed.)
Preparing to unpack .../00-libapt-inst2.0_1.6.10_amd64.deb ...
Unpacking libapt-inst2.0:amd64 (1.6.10) ...
Selecting previously unselected package apt-utils.
Preparing to unpack .../01-apt-utils_1.6.10_amd64.deb ...
Unpacking apt-utils (1.6.10) ...
Selecting previously unselected package libssl1.1:amd64.
Preparing to unpack .../02-libssl1.1_1.1.0g-2ubuntu4.3_amd64.deb ...
Unpacking libssl1.1:amd64 (1.1.0g-2ubuntu4.3) ...
Selecting previously unselected package openssl.
Preparing to unpack .../03-openssl_1.1.0g-2ubuntu4.3_amd64.deb ...
Unpacking openssl (1.1.0g-2ubuntu4.3) ...
Selecting previously unselected package ca-certificates.
Preparing to unpack .../04-ca-certificates_20180409_all.deb ...
Unpacking ca-certificates (20180409) ...
Selecting previously unselected package libmagic-mgc.
Preparing to unpack .../05-libmagic-mgc_1%3a5.32-2ubuntu0.2_amd64.deb ...
Unpacking libmagic-mgc (1:5.32-2ubuntu0.2) ...
Selecting previously unselected package libmagic1:amd64.
Preparing to unpack .../06-libmagic1_1%3a5.32-2ubuntu0.2_amd64.deb ...
Unpacking libmagic1:amd64 (1:5.32-2ubuntu0.2) ...
Selecting previously unselected package file.
Preparing to unpack .../07-file_1%3a5.32-2ubuntu0.2_amd64.deb ...
Unpacking file (1:5.32-2ubuntu0.2) ...
Selecting previously unselected package libexpat1:amd64.
Preparing to unpack .../08-libexpat1_2.2.5-3_amd64.deb ...
Unpacking libexpat1:amd64 (2.2.5-3) ...
Selecting previously unselected package libmpdec2:amd64.
Preparing to unpack .../09-libmpdec2_2.4.2-1ubuntu1_amd64.deb ...
Unpacking libmpdec2:amd64 (2.4.2-1ubuntu1) ...
Selecting previously unselected package libpython3.6-minimal:amd64.
Preparing to unpack .../10-libpython3.6-minimal_3.6.7-1~18.04_amd64.deb ...
Unpacking libpython3.6-minimal:amd64 (3.6.7-1~18.04) ...
Selecting previously unselected package mime-support.
Preparing to unpack .../11-mime-support_3.60ubuntu1_all.deb ...
Unpacking mime-support (3.60ubuntu1) ...
Selecting previously unselected package readline-common.
Preparing to unpack .../12-readline-common_7.0-3_all.deb ...
Unpacking readline-common (7.0-3) ...
Selecting previously unselected package libreadline7:amd64.
Preparing to unpack .../13-libreadline7_7.0-3_amd64.deb ...
Unpacking libreadline7:amd64 (7.0-3) ...
Selecting previously unselected package libsqlite3-0:amd64.
Preparing to unpack .../14-libsqlite3-0_3.22.0-1_amd64.deb ...
Unpacking libsqlite3-0:amd64 (3.22.0-1) ...
Selecting previously unselected package libpython3.6-stdlib:amd64.
Preparing to unpack .../15-libpython3.6-stdlib_3.6.7-1~18.04_amd64.deb ...
Unpacking libpython3.6-stdlib:amd64 (3.6.7-1~18.04) ...
Selecting previously unselected package sudo.
Preparing to unpack .../16-sudo_1.8.21p2-3ubuntu1_amd64.deb ...
Unpacking sudo (1.8.21p2-3ubuntu1) ...
Selecting previously unselected package xxd.
Preparing to unpack .../17-xxd_2%3a8.0.1453-1ubuntu1_amd64.deb ...
Unpacking xxd (2:8.0.1453-1ubuntu1) ...
Selecting previously unselected package vim-common.
Preparing to unpack .../18-vim-common_2%3a8.0.1453-1ubuntu1_all.deb ...
Unpacking vim-common (2:8.0.1453-1ubuntu1) ...
Selecting previously unselected package xz-utils.
Preparing to unpack .../19-xz-utils_5.2.2-1.3_amd64.deb ...
Unpacking xz-utils (5.2.2-1.3) ...
Selecting previously unselected package libpsl5:amd64.
Preparing to unpack .../20-libpsl5_0.19.1-5build1_amd64.deb ...
Unpacking libpsl5:amd64 (0.19.1-5build1) ...
Selecting previously unselected package publicsuffix.
Preparing to unpack .../21-publicsuffix_20180223.1310-1_all.deb ...
Unpacking publicsuffix (20180223.1310-1) ...
Selecting previously unselected package wget.
Preparing to unpack .../22-wget_1.19.4-1ubuntu2.2_amd64.deb ...
Unpacking wget (1.19.4-1ubuntu2.2) ...
Selecting previously unselected package libgpm2:amd64.
Preparing to unpack .../23-libgpm2_1.20.7-5_amd64.deb ...
Unpacking libgpm2:amd64 (1.20.7-5) ...
Selecting previously unselected package libpython3.6:amd64.
Preparing to unpack .../24-libpython3.6_3.6.7-1~18.04_amd64.deb ...
Unpacking libpython3.6:amd64 (3.6.7-1~18.04) ...
Selecting previously unselected package vim-runtime.
Preparing to unpack .../25-vim-runtime_2%3a8.0.1453-1ubuntu1_all.deb ...
Adding 'diversion of /usr/share/vim/vim80/doc/help.txt to /usr/share/vim/vim80/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim80/doc/tags to /usr/share/vim/vim80/doc/tags.vim-tiny by vim-runtime'
Unpacking vim-runtime (2:8.0.1453-1ubuntu1) ...
Selecting previously unselected package vim.
Preparing to unpack .../26-vim_2%3a8.0.1453-1ubuntu1_amd64.deb ...
Unpacking vim (2:8.0.1453-1ubuntu1) ...
Setting up readline-common (7.0-3) ...
Setting up libapt-inst2.0:amd64 (1.6.10) ...
Setting up libexpat1:amd64 (2.2.5-3) ...
Setting up mime-support (3.60ubuntu1) ...
Setting up xxd (2:8.0.1453-1ubuntu1) ...
Setting up sudo (1.8.21p2-3ubuntu1) ...
Setting up libgpm2:amd64 (1.20.7-5) ...
Setting up apt-utils (1.6.10) ...
Setting up libreadline7:amd64 (7.0-3) ...
Setting up libpsl5:amd64 (0.19.1-5build1) ...
Setting up libmagic-mgc (1:5.32-2ubuntu0.2) ...
Setting up libmagic1:amd64 (1:5.32-2ubuntu0.2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up publicsuffix (20180223.1310-1) ...
Setting up libssl1.1:amd64 (1.1.0g-2ubuntu4.3) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Setting up xz-utils (5.2.2-1.3) ...
update-alternatives: using /usr/bin/xz to provide /usr/bin/lzma (lzma) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/lzma.1.gz because associated file /usr/share/man/man1/xz.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/unlzma.1.gz because associated file /usr/share/man/man1/unxz.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzcat.1.gz because associated file /usr/share/man/man1/xzcat.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzmore.1.gz because associated file /usr/share/man/man1/xzmore.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzless.1.gz because associated file /usr/share/man/man1/xzless.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzdiff.1.gz because associated file /usr/share/man/man1/xzdiff.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzcmp.1.gz because associated file /usr/share/man/man1/xzcmp.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzgrep.1.gz because associated file /usr/share/man/man1/xzgrep.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzegrep.1.gz because associated file /usr/share/man/man1/xzegrep.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzfgrep.1.gz because associated file /usr/share/man/man1/xzfgrep.1.gz (of link group lzma) doesn't exist
Setting up openssl (1.1.0g-2ubuntu4.3) ...
Setting up wget (1.19.4-1ubuntu2.2) ...
Setting up vim-common (2:8.0.1453-1ubuntu1) ...
Setting up libsqlite3-0:amd64 (3.22.0-1) ...
Setting up vim-runtime (2:8.0.1453-1ubuntu1) ...
Setting up ca-certificates (20180409) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Updating certificates in /etc/ssl/certs...
133 added, 0 removed; done.
Setting up libmpdec2:amd64 (2.4.2-1ubuntu1) ...
Setting up file (1:5.32-2ubuntu0.2) ...
Setting up libpython3.6-minimal:amd64 (3.6.7-1~18.04) ...
Setting up libpython3.6-stdlib:amd64 (3.6.7-1~18.04) ...
Setting up libpython3.6:amd64 (3.6.7-1~18.04) ...
Setting up vim (2:8.0.1453-1ubuntu1) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/fr/man1/vi.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group vi) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/it/man1/vi.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group vi) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/pl/man1/vi.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group vi) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ru/man1/vi.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group vi) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ja/man1/vi.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group vi) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/vi.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group vi) doesn't exist
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/fr/man1/view.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group view) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/it/man1/view.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group view) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/pl/man1/view.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group view) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ru/man1/view.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group view) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ja/man1/view.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group view) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/view.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group view) doesn't exist
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/fr/man1/ex.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group ex) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/it/man1/ex.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group ex) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/pl/man1/ex.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group ex) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ru/man1/ex.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group ex) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ja/man1/ex.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group ex) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/ex.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group ex) doesn't exist
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/fr/man1/editor.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group editor) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/it/man1/editor.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group editor) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/pl/man1/editor.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group editor) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ru/man1/editor.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group editor) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/ja/man1/editor.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group editor) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/editor.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group editor) doesn't exist
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for ca-certificates (20180409) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
root@70c145ed23f8:/# adduser svpn
Adding user `svpn' ...
Adding new group `svpn' (1000) ...
Adding new user `svpn' (1000) with group `svpn' ...
Creating home directory `/home/svpn' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for svpn
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
root@70c145ed23f8:/# gpasswd -a svpn sudo
Adding user svpn to group sudo
root@70c145ed23f8:/# gpasswd -a svpn adm
Adding user svpn to group adm
root@70c145ed23f8:/# gpasswd -a svpn admin
gpasswd: group 'admin' does not exist in /etc/group
root@70c145ed23f8:/# sudo useradd -s /bin/false
Usage: useradd [options] LOGIN
useradd -D
useradd -D [options]

Options:
-b, --base-dir BASE_DIR base directory for the home directory of the
new account
-c, --comment COMMENT GECOS field of the new account
-d, --home-dir HOME_DIR home directory of the new account
-D, --defaults print or change default useradd configuration
-e, --expiredate EXPIRE_DATE expiration date of the new account
-f, --inactive INACTIVE password inactivity period of the new account
-g, --gid GROUP name or ID of the primary group of the new
account
-G, --groups GROUPS list of supplementary groups of the new
account
-h, --help display this help message and exit
-k, --skel SKEL_DIR use this alternative skeleton directory
-K, --key KEY=VALUE override /etc/login.defs defaults
-l, --no-log-init do not add the user to the lastlog and
faillog databases
-m, --create-home create the user's home directory
-M, --no-create-home do not create the user's home directory
-N, --no-user-group do not create a group with the same name as
the user
-o, --non-unique allow to create users with duplicate
(non-unique) UID
-p, --password PASSWORD encrypted password of the new account
-r, --system create a system account
-R, --root CHROOT_DIR directory to chroot into
-s, --shell SHELL login shell of the new account
-u, --uid UID user ID of the new account
-U, --user-group create a group with the same name as the user
-Z, --selinux-user SEUSER use a specific SEUSER for the SELinux user mapping
--extrausers Use the extra users database


文書履歴(document history)

ver. 0.01 初稿 20190523

ver. 0.02 docker追記 20190524



http://b.hatena.ne.jp/guide/bbutton