查看firewalld的配置文件:
[root@centos8 ~]# cat /etc/firewalld/zones/public.xml
PublicFor use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.
可以在配置文件里修改,然后重新加载firewalld的配置:
[root@centos8 ~]# firewall-cmd --reload
success
修改Nginx的默认站点的TCP端口:
[root@centos8 ~]# vi /etc/nginx/nginx.conf