Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

sys_context('USERENV','ip_address') Obtaining IP Address from client

554285Jan 26 2007 — edited Jan 26 2007
I'm developing a web application and I need to get the IP Address of the user to store it in the database.

The following works great when I test is inside the network, but for outside, the application crashes, and I believe is because the DBMS is not able to get through the firewall:

select sys_context('USERENV','ip_address') into ipaddress_in from sys.dual;

select SYS_CONTEXT(UPPER('userenv'), UPPER('ip_address')) ip_address into ipaddress_in from dual;

I tried configuring my firewall, but I'm not sure about the ports. Here is what I know:
Apache is using port 8080 and it is open in the firewall and outsiders can look at the we application. Oracle uses 1521 and it is open (temporaly because I don't like the idea of having the data port open to the public) and still the outside clients are not able to see their IP Address.

Does anyone know about other ports or a reason why this is not working?

Thanks in advance,

Alejandro.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 23 2007
Added on Jan 26 2007
2 comments
1,302 views