X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 4CF94D1B45A for ; Fri, 12 Dec 2003 20:48:21 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 91705-04 for ; Fri, 12 Dec 2003 16:47:51 -0400 (AST) Received: from gk-us2.michelin.com (unknown [156.65.14.19]) by svr1.postgresql.org (Postfix) with ESMTP id 77CFFD1DB34 for ; Fri, 12 Dec 2003 16:47:48 -0400 (AST) Received: from ONCMH1.onc.michelin.com (unverified) by gk-us2.michelin.com (Content Technologies SMTPRS 4.3.10) with ESMTP id for ; Fri, 12 Dec 2003 15:42:03 -0500 Received: from oncmtap1.onc.michelin.com by oncmh1.onc.michelin.com with ESMTP for pgsql-odbc@postgresql.org; Fri, 12 Dec 2003 15:45:08 -0500 Received: from oncems01.onc.michelin.com ([156.65.125.150]) by oncmtap1.onc.michelin.com (Netscape Messaging Server 4.15) with ESMTP id HPSV3O00.4AU for ; Fri, 12 Dec 2003 15:47:48 -0500 Received: from us.michelin.com (unverified) by oncems01.onc.michelin.com (Content Technologies SMTPRS 4.2.5) with ESMTP id for ; Fri, 12 Dec 2003 15:47:48 -0500 Message-Id: <3FDA296F.83305998@us.michelin.com> Date: Fri, 12 Dec 2003 15:47:43 -0500 From: "Greg Campbell" X-Mailer: Mozilla 4.77 [en]C-CCK-MCD (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: "pgsql-odbc@postgresql.org" Subject: Port blocked by iptables firewall Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.9 tagged_above=0.0 required=5.0 tests=BAYES_30, HOT_NASTY, RCVD_IN_RFCI, TO_ADDRESS_EQ_REAL, USER_AGENT_MOZILLA_XM X-Spam-Level: X-Archive-Number: 200312/37 X-Sequence-Number: 3575 I just installed a new Red Hat 9 server with PostgreSQL 7.2-3. After enabling tcpip_sockets (true) in postgresql.conf and restarting the postmaster, I was not able to connect to the server remotely, apparently because the port (5432) was not being responded to. Using a working server I would use #psql -h hostname -d my_db_name -U my_username The response was could not connect to the server: connection refused Is the server running on host xxx.xxx.xxx.xxx and accepting TCP/IP connections on port 5432? Yes the server was running. I could use it via localhost. I even used #nmap -sT -O localhost where the port showed open. I found RH9 seems to have upgrade its security using iptables instead of ipchains -- and the default security level (high) was keeping me out. I did not want to completely drop my security level (a test of dropping it to medium and using configure opened too much stuff). The trick seems to be to either use lokkit (gnone-lokkit in GUI) or hand code iptables rules. The lokkit utilities are making changes to the /etc/sysconfig/iptables file, which in-turn work with the firewall to intercept packets as they going to or coming from NICs. Hand coding iptables rules is not recommended for newbies. The man iptables and iptables --help are essential. There are some helpful links at www.redhat.com/support/resources/networking/firewall.htm iptables --list, is a pretty safe start I just used lokkit and chose Customize. I included 5432 in the optional ports area. I had not seen any posting on this topic, so I thought I'd share.