Getting client IP Address via reverse proxy

We're using APEX 4.2.1. I've configured APEX to recognise the X-Forwarded-For header so I can use owa_util.get_cgi_env ('X-Forwarded-For') when available to get the IP address of the client. Does APEX provide a safer way to access this header?
In the APEX Instance Security configuration settings you can specify a comma separated list of proxy servers. This works fine for internal APEX logs, but how do I tap into this in my apps?
What I'm looking for is a function that returns the X-Forwarded-For header when the client IP is in the proxy list or otherwise it returns the REMOTE_ADDR header, without having to maintain a list of trusted proxy IP's elsewhere. I don't want the two sources to inadvertently get out of sync.

Also it may not be any use, e.g. if it is a 192.*.*.* or 10.*.*.* address allocated via NAT. For example it may not be unique among all poossible clients. If you need a client identity it is best to generate it yourself.

Similar Messages

  • How to Displaying Employee Photo in ESS Who's Who via Reverse Proxy?

    Dear Gurus,
    I have a bit of problem to displaying employee's photo in ESS Who's Who via Reverse Proxy.
    In my landscape, end-users are only able to reach the Reverse Proxy server, not the actual SAP server itself.
    In Who's Who, when displaying the employee's info, the URI for the photo is generated using the actual SAP server name.
    Illustration:
    - the URI we expect: https://portal.domain.com/sap/bc/contentserver?.....
    - the URI we get: http://r3server.domain.com/sap/bc/contentserver?....
    Does anyone know where/how I can set the URL (hostname and protocol part) to refer to my reverse proxy?
    Or is it because SAP is using an absolute path rather than the relative one?
    How do we go about it?
    Thanks in advance.

    Dear Barinbhai,
    How are you? We are fine at here!!!
    Following URL generated thru Portal
    System generated : http://p30app06.ril.com:8000/sap/bc/contentserver/430?get&pVersion=0046&contRep=7N&docId=4D2155EB6C32545BE10000000A42163F&accessMode=r&authId=CN%3DQ10&expiration=20110215052004&secKey=MIIBkwYJKoZIhvcNAQcCoIIBhDCCAYACAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHATGCAV8wggFbAgEBMBMwDjEMMAoGA1UEAxMDUTEwAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xMTAyMTQwNTIwMDRaMCMGCSqGSIb3DQEJBDEWBBTJCER2r9%2BifbQPOtCqJdAoJ99NTzCBpgYFKw4DAhswgZwCQQCJ%2FPuWmHE5m%2Bd1vtX464doAJIsN2SmIpBAUe7jLGtmAD7F6ElSWOtC6uMuXUPisyKr3lRQ6IOC1ZhVPsnnXJsZAhUAtGAwyGWTqdJdd7nwrXKA7T%2B3GVcCQBUQxMBImvHdAsIyF3DmBtPwHcPpyCyBbJ737ivcuw2qjdJeGttSqR8GGuPn0DmzF36%2BUSnLRxZVNPn6nUbnPx0ELjAsAhR7G1vGjngjoll50RhWKcDlBTvVKgIUZ1NlQXMe61LXcqsTGsz7r28Kzh0%3D
    Photo opening directly on following URL:::
    Desired URL : http://ess.ril.com/sap/bc/contentserver/430?get&pVersion=0046&contRep=7N&docId=4D2155EB6C32545BE10000000A42163F&accessMode=r&authId=CN%3DQ10&expiration=20110215052004&secKey=MIIBkwYJKoZIhvcNAQcCoIIBhDCCAYACAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHATGCAV8wggFbAgEBMBMwDjEMMAoGA1UEAxMDUTEwAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0xMTAyMTQwNTIwMDRaMCMGCSqGSIb3DQEJBDEWBBTJCER2r9%2BifbQPOtCqJdAoJ99NTzCBpgYFKw4DAhswgZwCQQCJ%2FPuWmHE5m%2Bd1vtX464doAJIsN2SmIpBAUe7jLGtmAD7F6ElSWOtC6uMuXUPisyKr3lRQ6IOC1ZhVPsnnXJsZAhUAtGAwyGWTqdJdd7nwrXKA7T%2B3GVcCQBUQxMBImvHdAsIyF3DmBtPwHcPpyCyBbJ737ivcuw2qjdJeGttSqR8GGuPn0DmzF36%2BUSnLRxZVNPn6nUbnPx0ELjAsAhR7G1vGjngjoll50RhWKcDlBTvVKgIUZ1NlQXMe61LXcqsTGsz7r28Kzh0%3D
    Pls sugget..
    Hitesh Khatri
    SAP -HR
    RIL - Navi Mumbai....

  • How can I get Client IP Address in oracle?senthil

    How can I get Client IP Address in oracle?senthil

    Hi,
    Following query can help you to get the Client IP Address.
    select sys_context('userenv','ip_address') from dual;
    Thanks,

  • How can I get client IP address in portlet (servlet) ?

    How can I get client IP address in portlet (servlet) ?
    request.getRemoteAddr() return server IP.
    May be I must use Portal API, which extend Servlet classes, but I can't find this.
    Can any help me?

    Hi,
    Following query can help you to get the Client IP Address.
    select sys_context('userenv','ip_address') from dual;
    Thanks,

  • How to get Client IP address in oracle apps. Are there any API's.

    hi,
    I have one query
    ->How to get Client IP address in oracle apps. Are there any API's.
    regards,
    krishna

    Hi,
    this is very usefull
    however are this data stored on the db or is only a temporary view?
    I would like to have to keep track of all client connected.
    Thanx a lot

  • How to i get client IP address of a system on Oracle E-biz

    We are trying to extend our audit to getting the client IP address of a system on Oracle E-biz. This is to track down some users trying to perform a fraudulent act. Anybody has an idea. Maybe there are some scripts i need to run.

    Hi user;
    Please check:
    How to get Client IP address in oracle apps. Are there any API's.
    Re: How to get Client IP address in oracle apps. Are there any API's.
    Hope it helps
    Regard
    Helios

  • Cannot access the content producer portal via reverse proxy

    Hi all,
    I hope my post is in the right forum
    We have an FPN environment using RRA with our EP (NW 7.0 SPS18) as the consumer and our BI portal (NW 7.0 SPS18) as the content producer.  The consumer is registered with the producer using HTTP protocol.  Everything works as expected.
    We're trying to implement an Apache reverse proxy for our FPN with SSL termination so that we can access the portals from the Internet with HTTPS protocol while keeping HTTP protocol for the internal users.
    Through the reverse proxy, we can access the consumer portal and we can access the producer portal directly without any problem.  The only problem is that, if we logged onto the consumer via the reverse proxy, we cannot access the content from the producer.  We'd get the browser security warning message
    "Although this page is encrypted.  The information you have entered will be sent over an unencrypted connection. ..."
    When we hit the Continue button, we'd get the eror 404 Not Found - The request resource does not exist.
    Our Unix admin tried both Apache and SAP Web Dispatcher but we couldn't get it to work properly.  We went through a lot of blogs and documents and we are at our wits end.  We would greatly appreciate if someone can point out where we should look at.
    Thank you very much in advance.
    Dao

    Hi Kevin,
    Unfortunately, our Unix admin thinks you missed the point because my question was not clear enough
    We do not have problems with the "correct name" in the reverse proxy and our main SSL termination works fine. 
    It's just that the consumer is registered with the producer using HTTP protocol; as a result, the producer's URL link is 'hard-coded' to use HTTP protocol in the consumer portal since we are not using SSL in the internal network.  Hence, we'd like to know if there's any way to change them to HTTPS for the Internet clients while keeping the HTTP protocol for the internal users.
    I hope I made it clearer this time
    Regards,
    Dao

  • Get client ip address from Web Service hosted on OAS 10.1.2

    Hi,
    Can anyone advice how to get the client IP from a web service (java) hosted on Oracle Application Server 10.1.2.
    The below code works if the web service is hosted on Tomcat.
    MessageContext msgCtxt = MessageContext.getCurrentMessageContext();
    String IP = (String)msgCtxt.getProperty("REMOTE_ADDR");
    This code is causes built errors on the OAS 10.1.2 since it needs Axis and many other Jars. I tried to insert the jars needed but unfortunately when i was able to compile it returned a java.lang.NullPointerException.
    Is there a way to get the IP address of the client that calls this web service ?
    Or is there a way to read the SOAP request maybe i can retrieve the client IP from it.
    Thanks for your support,
    regards

    http://forums.sun.com/thread.jspa?threadID=5371892&messageID=10636223
    Thank you!

  • How to use logon group of backend systems via reverse proxy

    Hi
    we have setup EP 6.0 in DMZ2 and connected backend servers in INTERNAL network. We have another firewall for DMZ1. In order to provide access to EP and respective backend systems, we have installed two reverse proxy servers on Apache, one in DMZ1 and another in DMZ2. We could able to reach to the backend system successfully in this setup by using proper rewrite rule for virtual systems in order to connect to multiple systems.
    However we have observed that connection for backend systems is established only to respective CI and not to any of the application server, even though we have created "Load Balancing" systems in EP and used the same logon group of backend systems.
    Kindly suggest us if there is any option using which we can establish connection via Load balancing option in this current setup of ours.
    Thanks
    Pradeep

    Hi Mechael/Dutt
    We r using Integrated ITS in WAS 6.40. and we r maintaing seperate entries for each systems in rewrite rule.
    Thanks
    PRadeep

  • HTTP authentication via reverse proxy

    Hi,
    I've taken a dig around the interface for the 4.0.4 web proxy and in the documentation but haven't come up with much so far.
    What I want to do is configure a reverse proxy so that it feeds the HTTP authentication credentials into the server when we reverse from the proxy to it.
    i.e.
    user --> revproxy --> (http_details) --> webserver
    The user wont enter these, they'll be somehow if possible, be configured into the reverse proxy so it knows what HTTP realm string to match to a target host and feed the credentials into it.
    Is this possible?

    Since it is just a matter of adding Authorization header, it is possible.
    look around for other discussions for adding headers.

  • Getting clients MAC address !!!

    Is there any mechanism in Solaris where we can get the MAC address of an another system
    Which is newly connected to the network (same subnet)
    Situation is : a new system with out OS and its connected to the network, with out going to the console
    of this system how to get the MAC address of it.
    May be its possible may be not, anyway we are doing some testing and we have come across an issue.
    Thank you.
    VCP

    If the system is set to boot from the network, which is the way that a lot of out-of-the-box Sun systems used to be (don't know if they still are), you could at least perform a rudimentary snoop of the network to see if there are any ARP/RARP requests that happen to appear when the system is turned on. You'll be able to see the resulting MAC address in the request. But, again, the system has to be set to boot from the network fr this to work.
    Otherwise, I don't know of any way other than the console itself.

  • How to pass client IP address via CSS with SSL offload?

    Hello,
    We use Cisco CSS 11501S to do the SSL offload of web servers in one-armed mode. So we have to SNAT client IP in order to guaranty correct return path via the CSS. In this case web server can see only the IP address of the VIP used for SNAT. If there is a way to pass customer?s IP to the web server - i.e insert customized HTTP HEADER something like HTTP_REMOTEADDRESS:<IP address of the client> - similar to what is possible with BIG IP device for instance?
    Second question if there is a way to get from the CSS access log data similar to what we have in Apache access.log file to be used by Webalizer or similar application to analyze web traffic.

    Scott,
    if you're not doing src nat, the css will spoof the client ip and therefore, there is no need to save the client ip in the http header.
    Gilles.

  • How to get client Ip address from web service

    Hello folks,
    I am quite new to web service and developing a web service using netbeans6.0 IDE, where i have to know which client called/used the service, After googling i got code snippet like below
    inject a WebServiceContext instance into your WebService class, and use it in each WebMethod to get the current request's MessageContext Map. Get the SERVLET_REQUEST item from that, cast as an HttpServletRequest. From that HttpServletRequest, you can invoke getRemoteAddr() to get the client's IP.
    @WebService
    public class MyService{
    @Resource
    WebServiceContext wsCtxt;
    @WebMethod
    public void myWebMethod(){
    MessageContext msgCtxt = wsCtxt.getMessageContext();
    HttpServletRequest req = (HttpServletRequest)msgCtxt.get(MessageContext.SERVLET_REQUEST);
    String clientIP = req.getRemoteAddr();
    }But it throws error in my PC like
    Service invocation threw an exception with message : null; Refer to the server log for more details
    Exceptions details : java.lang.reflect.InvocationTargetExceptionIs there any way that says client pc ip address using netbeans6.0 Or what went wrong in my code?
    Largely Thanks in advance.
    SRI.

    I am afraid,
    javax.servlet.ServletException: java.lang.reflect.InvocationTargetException
    at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:340)
    at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.invoke(WebServiceTesterServlet.java:121)
    at com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:148)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.enterprise.webservice.monitoring.WebServiceTesterServlet.doPost(WebServiceTesterServlet.java:311) ... 35 more Caused by: javax.xml.ws.soap.SOAPFaultException: java.lang.NullPointerException at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:187) at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:117) at $Proxy102.processMessage999(Unknown Source) ... 40 more Caused by: java.lang.NullPointerException at org.shar.Handle.processMessage999(Handle.java:120) at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361) ... 2 more

  • Getting Client IP address in Webcenter access log files

    In addition to Understanding Webcenter Spaces Access Log File
    I want to trace the IP address of the client machine from where webcenter spaces is being accessed.
    How to capture this?
    Please help.
    -- Navin K

    You can access one of two server logs:
    If you embedded an HTTP Server in front of WebLogic (which is what Oracle recommends), then you have access information in OHS (which is just like Apace).
    If you are using a managed server (or even the admin server) in WebLogic, same thing, different name/place (the http access log).
    same discussions are going on in other thread -
    How to get the IP adress of the user who have accessed Webcenter Spaces ?

  • Get client IP address

    Hi ,
    I need to get IP address of the client(user) not server. I tried with these codes, both these returned IP address of the server but not client. Is there any other way? Please help.
    1)     try{
              InetAddress thisIp =InetAddress.getLocalHost();
              String IPAddress = thisIp.getHostAddress();
              wdContext.currentContextElement().setIp(IPAddress);
         }catch(Exception ee){
    2)
           IWDRequest request = WDProtocolAdapter.getProtocolAdapter() .getRequestObject() ;
         String ip=  request.getClientHostAddress();
    Thanks,
    Jai

    Hi Jai,
    Your #1 method won't work because it gets the localHost which is the app server.
    Your #2 method should work, try this
    String ip = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getClientHostAddress();
    and debug to see what value gets there.
    Hope it helps,
    Dao

Maybe you are looking for