我在deepin服务器版本,如何添加新的端口
Tofloor
poster avatar
channel
deepin
2017-03-29 00:10
Author
我安装了deepin web版,在上面安装了redis,现在想开通6379端口。sudo service iptables stop 也无济于事。我现在该怎么做了

Reply Favorite View the author
All Replies
avatar
shenlan
deepin
2017-03-29 00:51
#1
deepin web版 是什么鬼?

不管是那个版本,安装好redis
后先检查服务进程 ps -aux |grep redis 是否存在,
然后再用 netstat -nat  查看是否占用 6379 端口
最后 在确认防火墙是都默认封禁,如果是deepin-server 版本,可以参考修改 /var/lib/iptables/iptables-rules
在这行后 -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
添加        -A INPUT -p tcp -m state --state NEW -m tcp --dport 6379 -j ACCEPT
执行命令 service iptables restart 重启 iptables 服务
使用iptable-save 来确认 规则已经添加进去了
Reply View the author