Skip to content

对外开放端口

sh
# 设置默认策略为 ACCEPT 并清空规则
sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT
sudo iptables -F
# 保存防火墙规则
sudo netfilter-persistent save
sh
# 停止并禁用不必要的服务
sudo systemctl stop oracle-cloud-agent
sudo systemctl disable oracle-cloud-agent
sudo systemctl stop oracle-cloud-agent-updater
sudo systemctl disable oracle-cloud-agent-updater

# 停止并禁用防火墙
sudo systemctl stop firewalld.service
sudo systemctl disable firewalld.service