๐ป Linux
-
# DB์ web ๋ถ๋ฆฌ ๊ตฌ์ถ # ์๋ฒ ๊ตฌ์ถ CentOS7 First vmware # ๋ธ๋ฆฟ์ง ์ค์ centos newwork Adapter - nat์์ bridged๋ก ๋ณ๊ฒฝ vim /etc/sysconfig/network-scripts/ifcfg-ens33 BOOTPROTO="static" IPADDR=192.168.0.41 NETMASK=255.255.255.0 GATEWAY=192.168.0.1 DNS1=8.8.8.8 systemctl restart network # httpd, php, mariadb, mariadb-server, php-mysqlnd ์ค์น yum -y install httpd php mariadb mariadb-server php-mysqlnd systemctl restart ht..
CentOS7 ์น ์๋ฒ์ DB์๋ฒ ๋ฐ๋ก ๊ตฌ์ถ ํ ์ฐ๋# DB์ web ๋ถ๋ฆฌ ๊ตฌ์ถ # ์๋ฒ ๊ตฌ์ถ CentOS7 First vmware # ๋ธ๋ฆฟ์ง ์ค์ centos newwork Adapter - nat์์ bridged๋ก ๋ณ๊ฒฝ vim /etc/sysconfig/network-scripts/ifcfg-ens33 BOOTPROTO="static" IPADDR=192.168.0.41 NETMASK=255.255.255.0 GATEWAY=192.168.0.1 DNS1=8.8.8.8 systemctl restart network # httpd, php, mariadb, mariadb-server, php-mysqlnd ์ค์น yum -y install httpd php mariadb mariadb-server php-mysqlnd systemctl restart ht..
2022.04.20 -
Apache ๋ฒ์ vim /etc/httpd/conf/httpd.conf > # ServerSignature Off MaxRequestWorkers 500 # ๋์ ์ ์์ ์ ์ ํ (DDOS๋ง๊ธฐ) MaxKeepAliveRequests 500 # ํ ์ ์ ์ ์์ฒญ ์ ์ ํ TimeOut 300 # 5๋ถ๋์ ์ฌ์ฉํ์ง ์์ผ๋ฉด ์ธ์ ๋๊ธฐ DDOS ๋ง๋ ๋ชจ๋ yum -y install epel-release yum -y install mod_evasive vim /etc/httpd/conf.d/mod_evasive.conf systemctl restart httpd DDOS ๊ณต๊ฒฉ systemctl stop firewalld setenforce 0 yum -y install epel-release yum -y ins..
CentOS7 DDOS ๊ณต๊ฒฉ ๋ฐ ๋ฐฉ์ดApache ๋ฒ์ vim /etc/httpd/conf/httpd.conf > # ServerSignature Off MaxRequestWorkers 500 # ๋์ ์ ์์ ์ ์ ํ (DDOS๋ง๊ธฐ) MaxKeepAliveRequests 500 # ํ ์ ์ ์ ์์ฒญ ์ ์ ํ TimeOut 300 # 5๋ถ๋์ ์ฌ์ฉํ์ง ์์ผ๋ฉด ์ธ์ ๋๊ธฐ DDOS ๋ง๋ ๋ชจ๋ yum -y install epel-release yum -y install mod_evasive vim /etc/httpd/conf.d/mod_evasive.conf systemctl restart httpd DDOS ๊ณต๊ฒฉ systemctl stop firewalld setenforce 0 yum -y install epel-release yum -y ins..
2022.04.20 -
Apache๋ฅผ Https๋ก ๋ณด์ # ์ธ์ฆ์ ๋ฃ์ ํ์ผ๋ก ์ด๋ cd /etc/pki/tls/certs/ # ํค ์์ฑ openssl genrsa -out http.key 2048 # csr ํ์ผ ์์ฑ openssl req -new -key http.key -out http.csr # crt ํ์ผ ์์ฑ openssl x509 -req -days 365 -in http.csr -signkey http.key -out http.crt # sslํ์ผ ์ค์น yum -y install mod_ssl # ssl ์ค์ ํ์ผ ์์ vim /etc/httpd/conf.d/ssl.conf # Server Certificate: 96 # Point SSLCertificateFile at a PEM encoded certifica..
CentOS7 HTTPS ๋ณด์Apache๋ฅผ Https๋ก ๋ณด์ # ์ธ์ฆ์ ๋ฃ์ ํ์ผ๋ก ์ด๋ cd /etc/pki/tls/certs/ # ํค ์์ฑ openssl genrsa -out http.key 2048 # csr ํ์ผ ์์ฑ openssl req -new -key http.key -out http.csr # crt ํ์ผ ์์ฑ openssl x509 -req -days 365 -in http.csr -signkey http.key -out http.crt # sslํ์ผ ์ค์น yum -y install mod_ssl # ssl ์ค์ ํ์ผ ์์ vim /etc/httpd/conf.d/ssl.conf # Server Certificate: 96 # Point SSLCertificateFile at a PEM encoded certifica..
2022.04.20 -
Python ์น ๊ตฌ์ถ yum -y install python cd /var/www/cgi-bin # ์ํ์น ์ค์ ํ์ผ vim /etc/httpd/conf/httpd.conf 302๋ฒ์งธ ์ค #AddHandler cgi-script .cgi .py systemctl restart httpd cd /var/www/cgi-bin vim first.py #!/usr/bin/env python print "Content-type: text/html\\n\\n" print "\\n" print " " print "Python Test Page in [Benmin.com]()" print "\\n\\n" chmod 707 first.py cd /var/www Tomcat ์น ๊ตฌ์ถ yum -y install tomcat..
CentOS7 python,tomcat ์น ๊ตฌ์ถPython ์น ๊ตฌ์ถ yum -y install python cd /var/www/cgi-bin # ์ํ์น ์ค์ ํ์ผ vim /etc/httpd/conf/httpd.conf 302๋ฒ์งธ ์ค #AddHandler cgi-script .cgi .py systemctl restart httpd cd /var/www/cgi-bin vim first.py #!/usr/bin/env python print "Content-type: text/html\\n\\n" print "\\n" print " " print "Python Test Page in [Benmin.com]()" print "\\n\\n" chmod 707 first.py cd /var/www Tomcat ์น ๊ตฌ์ถ yum -y install tomcat..
2022.04.20 -
Centos7 Bridge Open ๋คํธ์ํฌ ์ด๋ํฐ > ๋ธ๋ฆฟ์ง๋ก ๋ณ๊ฒฝ # ๊ธฐ์กด์ ์๋ ๋คํธ์ํฌ ์ด๋ํฐ ์ญ์ # ๋คํธ์ํฌ ํ์ธ vim /etc/sysconfig/network-scripts/ifcfg-ens33 IPADDR=192.168.0.41 NETMASK=255.255.255.0 GATEWAY=192.168.0.1 DNS1=8.8.8.8 yum -y install httpd systemctl restart httpd systemctl enable httpd cd /var/www/html/ vim index.html > chaen Third systemctl stop firewalld setenforce 0 systemctl restart network Ubuntu Bridge Open ๋คํธ์ํฌ ์ด๋ํฐ..
CentOS7 , Ubuntu Bridge ์ค์ Centos7 Bridge Open ๋คํธ์ํฌ ์ด๋ํฐ > ๋ธ๋ฆฟ์ง๋ก ๋ณ๊ฒฝ # ๊ธฐ์กด์ ์๋ ๋คํธ์ํฌ ์ด๋ํฐ ์ญ์ # ๋คํธ์ํฌ ํ์ธ vim /etc/sysconfig/network-scripts/ifcfg-ens33 IPADDR=192.168.0.41 NETMASK=255.255.255.0 GATEWAY=192.168.0.1 DNS1=8.8.8.8 yum -y install httpd systemctl restart httpd systemctl enable httpd cd /var/www/html/ vim index.html > chaen Third systemctl stop firewalld setenforce 0 systemctl restart network Ubuntu Bridge Open ๋คํธ์ํฌ ์ด๋ํฐ..
2022.04.20 -
๐ก ํฌํธ ์ค์บ๋ netstat -natlp | grep httpd ๐ก ํ๊ฐ์ง ํฌํธ ์ค์บ๋ lsof -i tcp:80 #http 443 #https ๐ก ๋ฒ์ ํ์ธ httpd -v # ์ํ์น ์๋ฒ ์์ vim /etc/httpd/conf/httpd.conf > Order allow, deny >Allow from all >deny from 192.168.120. # ํด๋น ip ๋ฒคํ๊ธฐ vim index.html # window ๋ฐฉํ๋ฒฝ firewall.cpl > ๊ณ ๊ธ ์ค์ > ์ธ๋ฐ์ด๋ ๊ท์น > ๊ฐ์ WEB > ํ๋กํ ์ฝ ๋ฐ ํฌํธ > ๋ก์ปฌ ํฌํธ 10080, 10081๋ก ์ค์ # ํฌํธ ์ค์ Virtual Network Editor - NAT Settings - Host port 10080/10081 IP 192.16..
CentOS7 Digest,Basic ์ํธํ๐ก ํฌํธ ์ค์บ๋ netstat -natlp | grep httpd ๐ก ํ๊ฐ์ง ํฌํธ ์ค์บ๋ lsof -i tcp:80 #http 443 #https ๐ก ๋ฒ์ ํ์ธ httpd -v # ์ํ์น ์๋ฒ ์์ vim /etc/httpd/conf/httpd.conf > Order allow, deny >Allow from all >deny from 192.168.120. # ํด๋น ip ๋ฒคํ๊ธฐ vim index.html # window ๋ฐฉํ๋ฒฝ firewall.cpl > ๊ณ ๊ธ ์ค์ > ์ธ๋ฐ์ด๋ ๊ท์น > ๊ฐ์ WEB > ํ๋กํ ์ฝ ๋ฐ ํฌํธ > ๋ก์ปฌ ํฌํธ 10080, 10081๋ก ์ค์ # ํฌํธ ์ค์ Virtual Network Editor - NAT Settings - Host port 10080/10081 IP 192.16..
2022.04.20