首页 > 其他 > 详细

CentOS 搭建svn失败,无法连接host解决方法

时间:2015-11-02 01:33:36      阅读:842      评论:0      收藏:0      [点我收藏+]

参考前文 搭建了svn服务,也启动了,但就是在外面连不上。通过telnet 121.40.77.89 3690 命令测试也发现是失败的,因此可能是防火墙屏蔽了,参考修改防火墙规则的文章,发现还是不中,又弄了好大一回终于好了,纪录于此:
1,设置防火墙开放端口:
vi /etc/sysconfig/iptables
然后加上一句:
-A INPUT -m state –state NEW -m tcp -p tcp –dport 3690 -j ACCEPT
之后保存重启iptables:service iptables restart
可以通过iptables -L验证防火墙设置。
但是通过这些步骤可能还是不行,不知道没生效还是咋回事。
2,依次运行:
/sbin/iptables -I INPUT -p tcp –dport 3690 -j ACCEPT
/etc/rc.d/init.d/iptables save
/etc/rc.d/init.d/iptables restart
最后通过:/etc/init.d/iptables status 查看端口是否开放。

最后在外面运行:

yanzi-MacBookPro:~ yanzi$ telnet 121.xx.xx.89 3690
Trying 121.xx.xx.89...
Connected to 121.xx.xx.89.
Escape character is ‘^]‘.
( success ( 2 2 ( ) ( edit-pipeline svndiff1 absent-entries commit-revprops depth log-revprops partial-replay ) ) ) 

OK, 问题解决!

版权声明:本文为博主原创文章,未经博主允许不得转载。

CentOS 搭建svn失败,无法连接host解决方法

原文:http://blog.csdn.net/yanzi1225627/article/details/49565293

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!