Debian服务器有时候端口会失效,这是因为需要再防火墙打开特定的端口。
查看防火墙状态
iptables -L -n
添加端口
iptables -A INPUT -p tcp --dport /*port*/ -j ACCEPT
删除端口
iptables -D INPUT /*number*/ //iptables -L INPUT中的第几条规则
保存并重启
iptables-save > /etc/iptables.up.rules
/etc/init.d/ssh restart
文章评论
It’s really a great and useful piece of information. I’m glad that you just shared this helpful info with us. Please stay us informed like this. Thanks for sharing.
Wow! Thank you! I constantly needed to write on my website something like that. Can I implement a part of your post to my blog?