关于ubuntu控制台开放了所有端口,但是外部主机依然无法访问对应端口服务问题

关闭系统防火墙(没有安装防火墙也要操作,关闭了控制台防火墙,主机默认只能被访问22端口,其他端口仍然闭塞,ubuntu安全策略限制)

我的系统版本:ubuntu22

关闭系统防火墙操作如下:

# 开放所有端口
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -F

# 删除防火墙
apt-get purge netfilter-persistent && reboot
或 rm -rf /etc/iptables && reboot

如果是centos

# 删除多余附件
systemctl stop oracle-cloud-agent
systemctl disable oracle-cloud-agent
systemctl stop oracle-cloud-agent-updater
systemctl disable oracle-cloud-agent-updater

# 关闭防火墙并禁止自启动
systemctl stop firewalld.service
systemctl disable firewalld.service
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值