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?

開発用Webサーバーをつくる - その1

Posted at

目的

サーバー証明書を自動的に更新できるウェブサーバーをつくる。

環境

  • OS: Rocky Linux release 9.5 (Blue Onyx)
  • IPアドレス: 192.168.56.15
  • FQDN: camel.example.local
  • DNS: 192.168.56.18 cheetah.example.local
  • CA: 192.168.56.16 serval.example.local

基礎設定

IPアドレスとホスト名の設定

console
# nmtui
Edit a connection
enp0s3
    IPv4 CONFIGURATION <Manual>
    Addresses 10.0.2.15/24
    IPv6 CONFIGURATION <Ignore>
enp0s8
    IPv4 CONFIGURATION <Manual>
    Addresses 192.168.56.15/24
    IPv6 CONFIGURATION <Ignore>
Set system hostname
    camel

selinuxの設定

console
# getenforce
Enforcing
# vi /etc/selinux/config
SELINUX=disabled
(ZZ)
# reboot
ログインしなおし
# getenforce
Disabled

SSHDの設定

console
# vi /etc/ssh/sshd_config
Port 22    // コメントを外す
PublickeyAuthentication yes    // コメントを外す
(ZZ)

ユーザー作成

console
# adduser zoo_keeper -g wheel
# passwd zoo_keeper
New password:
Retye new password:
passwd: all authentication tokens updated successfully.

使わないポートを閉じる

console
# firewall-cmd --list-services
cockpit dhcpv6-client ssh
# firewall-cmd --remove-service=cockpit --zone=public --permanent
success
# firewall-cmd --remove-service-dhcpv6-client --zone=public --permanent
success
# firewall-cmd --reload
success
#firewall-cmd --list-services
ssh

再起動

console
# reboot
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?