473,403 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Remote access from a client on LAN

Hello

I am developing an application that requires PostgreSQL connection, I have installed PostgreSQL on my development machine and using NpgSQL to connect to the database. I am able to connect to the database while the application is running on the development PC, but whenever I am on any other PC on my network I cannot connect the application to the DB server running on another machine. I have been searching for a solution for quite a long time now, but nothing seems to be working.

I have tried editing the config files {pg_hba.conf and postgresql.conf} with the settings described in the following page:

http://www.cyberciti.biz/tips/postgr...onnection.html

pg_hba.conf:
I have inserted the following lines, just underneath the default loopback host string (host all all 27.0.0.0/32 md5):
host all all 192.168.0.0/24 trust

I have also tried a combination of things on the above string such as using md5 instead of trust and providing the actual ip address of the remote machine and so on, but no luck. As usual you would have to make changes to the other config file as well, see below

postgresql.conf:
I have uncommented the listen_addresses='localhost' and changed localhost to '*':
listen_addresses='*'

Nothing seems to be working, I would really appreciate if someone could put me in the right direction. Details on all the boxes are given below:

Developer machine: Windows XP PostgreSQL 8.XX installed
Other PC: Windows XP NO Postgresql installed
Other PC: Vista Home P with NO Postgresql installed

I have tried many things, such as turning the firewall off and so on, but nothing seems to be working.

NOTE: I am able to ping the PC with PostgreSQL installed both with Firewall on and off.

Thanks in advance.
Feb 10 '09 #1
10 12933
rski
700 Expert 512MB
What is the answer when you try to connect to db?
Feb 10 '09 #2
Hello,

Thanks for reading the post, I have managed to find the cause of the problem. Actually it was due to the firewall, although I inserted a rule to allow the Client PC to connect to the PC with the DB Server, but it was missing the port access. Also Windows Firewall was running together with the COMODO Firewall, disabling Windows Firewall and applying the port details to the firewall worked for me.

To help others having similar issues, here are the details I used in the PostgreSQL config file:

pg_hba.conf:
host all all 27.0.0.0/32 md5
host all all 0.0.0.0/0 md5

postgresql.conf:
listen_addresses='*'


and restart the server, simple as that.

Thanks
Feb 12 '09 #3
Hello Mr Harvindersingh,

I feel happy after reading your post. beacuse i m also need to implement the feature "Remote access from a client on LAN". For this i have use search engine for a long time and followed the steps what you have mentioned above. But i did not get any solution. Hope you have succeded on this issue. Please let me know the steps that how can implement this feature. It will be helpful to me.

Many Thanks.
Apr 8 '09 #4
When i am trying to access from other system which is in LAN, i am getting the error like "Server not active" and some times "Received time out". (JBoss is the server i am using for my application which is already in active while getting these errors)
Apr 8 '09 #5
rski
700 Expert 512MB
Can you make a remote connection via psql client? If so it is probably not a postgres problem
Apr 8 '09 #6
When i am trying to access from other system which is in LAN, i am getting the error like "Server not active" and some times "Received time out". (JBoss is the server i am using for my application which is already in active while getting these errors)
Apr 8 '09 #7
rski
700 Expert 512MB
I don't get it. I asked if you can connect with postgres via psql. And you answered about JBoss "JBoss is the server i am using for my application which is already in active while getting these errors".
Can you specify how did you make a conenction?
Apr 8 '09 #8
Hello

Mine was a simple firewall issue, I thought allowing other PCs with their IP address is enough but it also required a rule behind the port number that should be accessible by the DB server. My problem was just because of this, and everything got sorted ofcourse you would need the above settings in the config file of the server to listen for clients on the port.
Apr 8 '09 #9
My problem is also solved with firewall issue. After disable the firewall i got the solution. Thanks for your helpful information.

Did you tried by enable the firewall and add an exception to the database port 5432 in firewall exceptions? I have tried it, but i did not get the result.
Apr 9 '09 #10
Nice to hear that your problem was also solved with disabling firewall. You also need to allow the IP address of the remotely connecting PC in order to allow the access through the firewall. I have mine firewalls up all times just added IP addresses of the remote PCs. the PC with the server should have Port access and all the IP addresses in its firewall and the remotely connecting PCs should also have the IP address of the DB server's PC as well.

Hope this helps, as mine works fine with the above settings, apparently it was working since I installed the server only firewall was messing with my connections and thank god I managed to find it.
Apr 9 '09 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool This article makes a detailed comparison among SourceAnyWhere, SourceOffSite, VSS...
12
by: Mike MacSween | last post by:
Sorry if this is a bit off topic, but I can't seem to find a 'remote control' newsgroup on my news server. And anyway I know Tony has some experience of this. The app is split FE/BE. I'd like...
9
by: D | last post by:
Hi all, I'm investigating a remote access solution for a client. Five employees need to work from home on an Access 2K split db. It's all working well on the LAN, but I wonder what is the best...
1
by: Sald | last post by:
A person I do work for is uses GoToMyPC (http://www.gotomypc.com) for remote access. You use your web browser to connect to another persons PC. I noticed Citrix just purchased the company on...
0
by: bettervssremoting | last post by:
To view the full article, please visit http://www.BetterVssRemoting.com Better VSS Remote Access Tool including SourceOffSite, SourceAnyWhere and VSS Remoting This article makes a detailed...
22
by: Jordan S. | last post by:
SQL Server will be used as the back-end database to a non trivial client application. In question is the choice of client application: I need to be able to speak intelligently about when one...
1
by: TerrenceJ | last post by:
Hi there I've configure our SBS 2003 server to allow remote access and Outlook over internet. The mail works fine, but when I try remote access, I am asked for username and password, which I...
2
by: josephlee | last post by:
Can an Access application running on Terminal Server be accessed by logging in to a remote desktop via a web browser the same as an Access app running on Citrix can be or is it different to that? ...
3
by: Simon Gracias | last post by:
Hi I am newbie,after a lot of research I came to know abt 0000free.com as a free hosting provider which gives free hosting account with remote access to my SQL database, but I have a problem & need...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.