会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Loading
joe-yang
Great works are performed, not by strength, but by perseverance.
博客园
首页
新随笔
联系
订阅
管理
开放 linux 防火墙 端口
想搭个服务器,但外面访问不到,是防火墙的原因,把端口设置一下就行。
1.在/etc/sysconfig/iptables里添加
Code
-
A INPUT
-
m state
--
state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
2.重启iptables
Code
[
root@localhost ~
]
#
/
etc
/
init.d
/
iptables restart
3.看下状态
Code
[
root@localhost ~
]
#
/
etc
/
init.d
/
iptables status
posted @
2008-09-18 09:55
.net's
阅读(
651
) 评论(
1
)
收藏
举报
刷新页面
返回顶部
公告