LoginSignup
7
7

More than 5 years have passed since last update.

さくらで最初にやること

Posted at

1)Iptables
空っぽなので設定
SSHとHTTPのみ許可、あとはdロップ
/etc/sysconfig/iptables

*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
COMMIT

2)ユーザ作る
useradd sakura
passwd sakura

sudo 設定
%sakura ALL=(ALL) ALL

vi /home/sakura/.ssh/authorized_keys
公開鍵をコピペ

3)SSH設定
vi /etc/ssh/sshd_config
PermitRootLogin no
PasswordAuthentication no

7
7
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
7
7