LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1104|回复: 6

一个小问题 但我弄了半天不会。。

[复制链接]
发表于 2009-7-15 02:30:16 | 显示全部楼层 |阅读模式
我有两台电脑,一台是windows xp,一台是linux suse。还有一个switch,我现在试图用switch把两个机子连起来,构成一个不进入因特网的LAN。


when i connect both linux and windows to the internet,
(我先是将两台机子都连到因特网。)

I use "telnet ***.***.***.**** 5432" on windows platfrm, to connect the linux. (5432 is the service socket database in the linux used to listen)
It works,
and also i can successfully access to postgreSQL database in the linux, through pgAdmin client  in window.

when i connect two as a LAN through the switch without internet.(接着就是实现我的LAN)

i set windows IP as 192.168.0.1
and linux as 192.168.0.2

I can successfully ping each other.
BUT, i CANNOT "telnet 192.168.0.2 5432" from windows to linux.
It seems the socket 5432 is closed in this configuration.

of course that, i also cannot connect the pgAdmin client to the database in linux.


不好意思,打成了英文,因为刚刚发去其他地方发问了,大家将就看一下吧。
发表于 2009-7-15 09:40:30 | 显示全部楼层
1、你接入到因特网的两台机子和你在局域网中的两台机子是不是一样的
不管1是不是一样的
主要看下面的分析
2、首先你可以PING通对方 说明网络是通的 你是否可以试下telnet 192.168.0.2 22 看是否可以成功
3、如果22端口可以成功  那么很可能是Linux的防火墙的原因 你还可以在Linux机器上验证
用netstat -na | grep 5432 看是否有这个端口  再本地telnet 127.0.0.1 5432 看是否可以
可以用iptables -L 来查年防火墙的记录  用iptables -Z 清空下防火墙记录 或者直接关闭
4、如果3还没有成功 那么你反PING下你的windows机器 看是不是网络中有另外一个0.2  
我想应该就这些问题 不会有其它的了
回复 支持 反对

使用道具 举报

发表于 2009-7-15 18:51:51 | 显示全部楼层
楼主是在用PostgreSQL吧?(先挖个坑,吃饭回来再聊)
回复 支持 反对

使用道具 举报

发表于 2009-7-15 21:18:42 | 显示全部楼层
防火墙设置吧……既然能ping通,至少连接没问题。
回复 支持 反对

使用道具 举报

发表于 2009-7-24 16:40:07 | 显示全部楼层
Post by booman;2006512
防火墙设置吧……既然能ping通,至少连接没问题。


可以在YaST里先将防火墙停掉试试,如果可以了,再设置一下/etc/sysconfig/SuSEfirewall2(281行)
FW_SERVICES_EXT_TCP="5432"
试试看吧。
回复 支持 反对

使用道具 举报

发表于 2009-8-5 23:43:44 | 显示全部楼层
联机需要开启samba服务吧?
回复 支持 反对

使用道具 举报

发表于 2009-8-7 10:37:10 | 显示全部楼层
Samba是文件服务协议,若你打算在Windows的机器上操作Linux机器上的文件或目录,可以在Linux机器上通过Samba服务共享目录,这样,Windows用户就能够映射网络驱动器或通过网络存取linux机器上的文件了。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表