1 Reply Latest reply: May 18, 2012 8:20 PM by 931964 RSS

    Unable to connect passed Linux (CentOS 6.2) Firewall


      I have 2 computers on my network. Computer 1 (CentOS 6.2) and Computer 2(Ubuntu 11.10). I have Oracle 11g installed on Computer 1. When Computer 1's firewall is disabled, I Can connect (sqlplus system/manager@dev) to Oracle on Computer 1 without any problem. However, when I enable the firewall on Computer 1, I can't connect. So, I gave the following 2 commands on Computer 1 to Open up port 1521 without any luck. Can some one help me?

      iptables -A INPUT -p tcp -s 0/0 sport 1024:65535 -d dport 1521 -m state --state NEW,ESTABLISHED -j ACCEPT

      iptables -A OUTPUT -p tcp -s sport 1521 -d 0/0 dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
        • 1. Re: Unable to connect passed Linux (CentOS 6.2) Firewall
          When your client send a connection request to the server through 1521, usually the 'listener' create a process server and assign a random private port IP for client/server communication,
          So opening the listener port is not sufficient, you need a certified oracle Net firewall that open and close ports dynamically OR the second solution is force using the listener port for routing client/server packets by setting the environment variable USER_SHARED_SOCKET in your server to TRUE.