码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-11-02 01:34:18      阅读:310      评论:0      收藏:0      [点我收藏+]

标签:centos   svn   防火墙   telnet   

参考前文 搭建了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解决方法

标签:centos   svn   防火墙   telnet   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!