1
1

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 5 years have passed since last update.

vps_memo

Posted at

Qiita試しに備忘録

■ユーザー設定
adduser hoge
passwd hoge
pass_fuga
■sudo設定
visudo
//末尾挿入
hoge ALL=(ALL) ALL
■SSH
vi /etc/ssh/sshd_config
Port 12222
PermitRootLogin no
/etc/init.d/sshd restart
■yumアップ
sudo yum update

■火壁
vim /etc/sysconfig/iptables

//////

*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
:SERVICES - [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -p icmp --icmp-type echo-request -m limit --limit 1/s --limit-burst 4 -j ACCEPT
-A INPUT -p tcp -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p tcp -m state --state NEW -j SERVICES
-A INPUT -p udp --sport 53 -j ACCEPT
-A INPUT -p udp --sport 123 --dport 123 -j ACCEPT
-A SERVICES -p tcp --dport 12222 -j ACCEPT
-A SERVICES -p tcp --dport 80 -j ACCEPT
-A SERVICES -p tcp --dport 443 -j ACCEPT
COMMIT

/////

service iptables restart

■アパッチ
sudo yum install httpd
sudo /etc/rc.d/init.d/httpd start
sudo /sbin/chkconfig httpd on
DocumentRoot "/var/www/html"
■パーミッション
sudo chown hoge /var/www/html

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?