Notice
Recent Posts
Recent Comments
Link
«   2024/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Tags
more
Archives
Today
Total
관리 메뉴

클라우드 엔지니어 꿈나무

서버 방화벽 관리 본문

Linux

서버 방화벽 관리

새싹싹이 2023. 10. 19. 15:45

[student@workstation ~]$ ssh student@servera

[student@servera ~]$ su -

[root@servera ~]# dnf install httpd mod_ssl

[root@servera ~]# echo 'I am servera' > /var/www/html/index.html

[root@servera ~]# systemctl enable --now httpd

[root@servera ~]# exit 

[student@servera ~]$ exit

[student@workstation ~]$ curl http://servera.lab.example.com   

[student@workstation ~]$ curl -k http://servera.lab.example.com   => 안전하지 않은 사이트에 curl

[student@workstation ~]$ ssh student@servera

[root@servera ~]# systemctl status firewalld.service

[root@servera ~]# firewall-cmd --get-default-zone 

[root@servera ~]# firewall-cmd --permanent --add-service=https

[root@servera ~]# firewall-cmd --permanent --zone=public --list-all

인터넷창에 httls://servera.lab.example:9090 입력

 

[root@servera ~]# exit

[student@servera ~]$ exit

[student@workstation ~]$ curl http://servera.lab.example.com 

[student@workstation ~]$ curl -k http://servera.lab.example.com