Enabling TCP port on Solaris 10
Hi
I am having difficulty allowing a remote machine to connect to a PostgreSQL server running on a Solaris 10 x64 machine. I have edited the /etc/services to open the port and the protocol, and I have manually started the Postgre server, so I should be able to telnet to the port from the remote machine, but no luck. I keep on getting a error saying that the port is closed on the server. When I am on the server, I can telnet to the port and connect, but from a remote server, no luck. Is there anyone that can help me with this?
Kind Regards
[563 byte] By [
mvm1] at [2007-11-26 8:28:57]

# 1
Hello.
>> I have edited the /etc/services ...
This will have no effect. The /etc/services file is there to map names to port numbers (e.g. "telnet myserver myport" will be mapped to "telnet myserver 1234"). It has no effect on opening the port itself.
There may be two reasons why you cannot access the service from a remote computer:
a) The port is only bound on localhost:
Type netstat -a -f inet |grep LISTEN |more
You will see a list of all open TCP ports.
An entry that begins with something like "*.12345" means: Port 12345 is open. An entry that begins with "localhost.12345" means: Port 12345 is open for connections coming from localhost only. For connections from other computers the port is closed.
In this case you will have no chance. You may write a special C server program that tunnels connections.
(Just for info: "hostname_or_ip_address.12345" would mean: All computers that see us as hostname_or_ip_address can connect. Other computers - e.g. at the second network card or even "localhost" - cannot connect.)
b) You have a firewall active that blocks the access to the port.
Martin
# 2
Martin
Sorry for only getting back now, but I almost gave up on this problem, as I posted it on another forum, and no one ever came back to me. I was on the ferge of throwing out Solaris, when I saw you reply. Thank you for the info, yes it says localhost next to the port. So, then I presume that there is some sort of firewall active on the system. I am sure you know my next question then, where can I find more info on the Solaris firewall?
Thanks once again for the info, it helped a lot...
Kind Regards
Manie
mvm1 at 2007-7-6 21:46:52 >

# 3
>Thank you
> for the info, yes it says localhost next to the port.
> So, then I presume that there is some sort of
> firewall active on the system.
No. It's how the program has requested to open the port.This would be something the application is doing, not the OS.
Perhaps it has a setting to control this behavior.
--
Darren
# 4
I have checked the IP Filter setting with ndd and Solaris reports that this is disabled, so it seems as if Darren could have some point here. I will check PostgreSQL application and see if there is anything that will prevent remote machines from connecting to the application. Thanks Darren.
Kind Regard
Manie
mvm1 at 2007-7-6 21:46:52 >

# 5
Thanks you guys, I eventually got this to work. Darren you were right, it was related to the application, the application started up with only local host connections, after changing the main config file to include all interfaces, I was able to connect from remote machines to the SOlaris box. So, in short all I had to do was to edit the /etc/services file and startup the application allowing connection from remote machines and all was well.
Thanks once again for your assistance...
Kind Regards
Manie
mvm1 at 2007-7-6 21:46:52 >
