Web Applications Assessment - adaley0518/Tech_Journal GitHub Wiki
VM Setup:
- centOS 7 minimal machines, 10 GB, single file
- Network Adapter: Bridged
- clone VM if needed
- Name 1: Web Server
- Name 2: CA
Apache and HTTPD:
Web Server:
- dhclient
- ip addr
- yum -y install httpd
- firewall-cmd --permanent --add-port=80/tcp
- firewall-cmd --reload
- firewall-cmd --query-port=80/tcp
- systemctl start httpd
HTML Page Creation:
Web Server:
- cd /var/www/html
- vi index.html
- html code
<html>
<head><strong> Amber's Webpage </strong>
<title> SEC260 Assesment </title>
</head>
<br />
<br />
<body>
Assessment webpage, hopefully I pass!
</body>
</html>
- check webpage is working http://IP
Certificate Authority:
CA:
- useradd amber
- passwd amber
- systemctl start sshd
- firewall-cmd --permanent -add-port=22/tcp
- firewall-cmd --reload
- cd /etc/pki/CA
- touch index.txt
- echo 1000 > sesrial
- openssl genrsa -des3 -out private/cakey.pem 2048
- openssl req -new -x509 -days 365 -key private/cakey.pem -out cacert.pem
- organization name: Skiff101
Web Server:
- openssl req -newkey rsa:2048 -keyout websrv.key -out websrv.csr
- fill out cert request: Org name still Skiff101
- scp -c blowfish websrv.csr amebr@ip:~
CA:
- openssl ca -out websrv.crt -infiles websrv.csr
- scp -c blowfish websrv.crt root@ip:~
HTTPS
Web Server:
- cp websrv.crt /etc/pki/tls/certs
- cp /var/www/html/websrv.key /etc/pki/tls/private (or just file)
- yum -y install mod_ssl
- vi /etc/httpd/conf.d/ssl.conf
- change SSLCertificateFile path & SSLCertificateKeyFile path
- firewall-cmd --permanent --add-port=443/tcp
- firewall-cmd --reload
- systemctl restart httpd