IP Address of Client Machine

I want to get the ip_address of
Client Machine in IAS environment.
Any ideas or suggessions

Though you have many ways to get the IP of the Client Machine, it
al depends on the exact requirement. To name a few,
1>You could write a Java servlet or JSP and call 'getRemoteHost'
on requet object.
2>Call or use 'REMOTE_HOST' in any CGI prog.
HTH !
Mithun T Dhar

Similar Messages

  • How to get MAC address from client machine ?

    Hi dear,
    We are implementing security measures for a banking system, so it is required that we track the MAC address of the registered clients along with other parameters. How do we get the MAC address from client machine using ADF or running scripts in client side?
    thanks all

    Hi,
    Welcome to OTN.
    Your question has nothing to do with ADF as such. Googling would give you plenty of such topics.
    -Arun

  • Provide alternative for Active X objects in Firefox to get client information. As I have to fetch MAC Address of client machine at login.

    As I have to fetch MAC Address of client machine at login, this is possible using ActiveX objects in IE but how it can be achieved using Javascript in Firefox browser. Plz reply.............................

    You would need the user to install some kind of add-on in order to do this. Or you could explore whether it's possible in Flash or Java (but I'd be surprised if it is).

  • How to pick wireless physical address of client machine

    Dear memebers,
    Using the follwoing tutorail, I have picked the network card address ( MAC Address ).
    [forms java beans|http://forms.pjc.bean.over-blog.com/article-15985856.html]
    but this code dont' display / return the MAC address of wireless network card.
    the java code is here:
    package oracle.forms.fd;
    import java.net.InetAddress;
    import java.io.InputStream;
    import java.io.BufferedInputStream;
    import java.io.IOException;
    import java.text.ParseException;
    import java.util.StringTokenizer;
    import oracle.forms.ui.VBean;
    import oracle.forms.handler.IHandler;
    import oracle.forms.properties.ID;
         * A Java Bean that returns Client machine info
         * code found on the java forum
         * http://forum.java.sun.com/thread.jspa?threadID=655913
         * @author Francois Degrelle (wrapper)
         * @version 1.1
    public final class ClientInfos extends VBean {
        private static final ID GETINFOS  = ID.registerProperty("GET_CLIENT_INFOS");
        private static final ID GETINFO   = ID.registerProperty("GET_CLIENT_INFO");
        private static final ID Operating = ID.registerProperty("OPERATING");
        private static final ID architecture = ID.registerProperty("ARCHITECTURE");
        private static final ID osVersion = ID.registerProperty("OSVERSION");
        private static final ID IP = ID.registerProperty("IP");
        private static final ID MAC = ID.registerProperty("MAC");
        private static final ID javaVersion = ID.registerProperty("JAVAVERSION");
        private static final ID javaVendor = ID.registerProperty("JAVAVENDOR");
        private static final ID javaVendorUrl = ID.registerProperty("JAVAVENDORURL");
        private static final ID javaHome = ID.registerProperty("JAVAHOME");
        private static final ID javaVmSpecificationVersion = ID.registerProperty("JAVAVMSPECIFICATIONVERSION");
        private static final ID javaVmSpecificationVendor = ID.registerProperty("JAVAVMSPECIFICATIONVENDOR");
        private static final ID javaVmSpecificationName = ID.registerProperty("JAVAVMSPECIFICATIONNAME");
        private static final ID userName = ID.registerProperty("USERNAME");
        private static final ID userHome = ID.registerProperty("USERHOME");
              private     String sInfos = "";
              private     String sOperating = "";
              private     String sarchitecture = "";
              private     String sosVersion = "";
              private     String sIP = "";
              private     String sMAC = "";
              private     String sjavaVersion = "";
              private     String sjavaVendor = "";
              private     String sjavaVendorUrl = "";
              private     String sjavaHome = "";
              private     String sjavaVmSpecificationVersion = "";
              private     String sjavaVmSpecificationVendor = "";
              private     String sjavaVmSpecificationName = "";
              private     String suserName = "";
              private     String suserHome = "";
        private boolean bInit = false ;
        public void init(IHandler handler)
          super.init(handler);
               try {
                  sOperating = System.getProperty("os.name");
                  sarchitecture = System.getProperty("os.arch");
                  sosVersion = System.getProperty("os.version");
                  sIP = InetAddress.getLocalHost().getHostAddress();
                  sMAC = getMacAddress();
                  sjavaVersion = System.getProperty("java.version");
                  sjavaVendor = System.getProperty("java.vendor");
                  sjavaVendorUrl = System.getProperty("java.vendor.url");
                  sjavaHome = System.getProperty("java.home");
                  sjavaVmSpecificationVersion = System.getProperty("java.vm.specification.version");
                  sjavaVmSpecificationVendor = System.getProperty("java.vm.specification.vendor");
                  sjavaVmSpecificationName = System.getProperty("java.vm.specification.name");     
                  suserName = System.getProperty("user.name");
                  suserHome = System.getProperty("user.home");          
                } catch(Throwable t) {
                  t.printStackTrace();
          public Object getProperty(ID pId)
             if(pId == GETINFOS)
                sInfos = "Operating System:" + sOperating ;
                sInfos += "\nOperating system architecture:" + sarchitecture ;
                sInfos += "\nOperating system version:" + sosVersion ;
                sInfos += "\nIP/Localhost:" + sIP ;
                sInfos += "\nMAC Address:" + sMAC ;
                sInfos += "\nJava Version:" + sjavaVersion ;
                sInfos += "\nJava Vendor:" + sjavaVendor ;
                sInfos += "\nJava vendor URL:" + sjavaVendorUrl ;
                sInfos += "\nJava installation directory:" + sjavaHome ;
                sInfos += "\nJava Virtual Machine specification version:" + sjavaVmSpecificationVersion;
                sInfos += "\nJava Virtual Machine specification vendor:" + sjavaVmSpecificationVendor;
                sInfos += "\nJava Virtual Machine specification name:" + sjavaVmSpecificationName;     
                sInfos += "\nUser Name:" + suserName;
                sInfos += "\nUser's home directory:" + suserHome ;
                return sInfos ;
            else if(pId == Operating) return sOperating;  
            else if(pId == architecture) return sarchitecture ; 
            else if(pId == osVersion) return sosVersion ;
            else if(pId == IP) return sIP ;
            else if(pId == MAC) return sMAC ; 
            else if(pId == javaVersion) return sjavaVersion ;  
            else if(pId == javaVendor) return sjavaVendor ;  
            else if(pId == javaVendorUrl) return sjavaVendorUrl ;   
            else if(pId == javaHome) return sjavaHome ;   
            else if(pId == javaVmSpecificationVersion) return sjavaVmSpecificationVersion ; 
            else if(pId == javaVmSpecificationVendor) return sjavaVmSpecificationVendor ;   
            else if(pId == javaVmSpecificationName) return sjavaVmSpecificationName ; 
            else if(pId == userName) return suserName ; 
            else if(pId == userHome) return suserHome ;
             return super.getProperty(pId);
      private final static String getMacAddress() throws IOException {
              String os = System.getProperty("os.name");
              try {
                   if(os.startsWith("Windows")) {
                        return windowsParseMacAddress(windowsRunIpConfigCommand());
                   } else if(os.startsWith("Linux")) {
                        return linuxParseMacAddress(linuxRunIfConfigCommand());
                   } else {
                        throw new IOException("unknown operating system: " + os);
              } catch(ParseException ex) {
                   ex.printStackTrace();
                   throw new IOException(ex.getMessage());
          * Linux stuff
         private final static String linuxParseMacAddress(String ipConfigResponse) throws ParseException {
              String localHost = null;
              try {
                   localHost = InetAddress.getLocalHost().getHostAddress();
              } catch(java.net.UnknownHostException ex) {
                   ex.printStackTrace();
                   throw new ParseException(ex.getMessage(), 0);
              StringTokenizer tokenizer = new StringTokenizer(ipConfigResponse, "\n");
              String lastMacAddress = null;
              while(tokenizer.hasMoreTokens()) {
                   String line = tokenizer.nextToken().trim();
                   boolean containsLocalHost = line.indexOf(localHost) >= 0;
                   // see if line contains IP address
                   if(containsLocalHost && lastMacAddress != null) {
                        return lastMacAddress;
                   // see if line contains MAC address
                   int macAddressPosition = line.indexOf("HWaddr");
                   if(macAddressPosition <= 0) continue;
                   String macAddressCandidate = line.substring(macAddressPosition + 6).trim();
                   if(linuxIsMacAddress(macAddressCandidate)) {
                        lastMacAddress = macAddressCandidate;
                        continue;
              ParseException ex = new ParseException
                   ("cannot read MAC address for " + localHost + " from [" + ipConfigResponse + "]", 0);
              ex.printStackTrace();
              throw ex;
         private final static boolean linuxIsMacAddress(String macAddressCandidate) {
              // TODO: use a smart regular expression
              if(macAddressCandidate.length() != 17) return false;
              return true;
         private final static String linuxRunIfConfigCommand() throws IOException {
              Process p = Runtime.getRuntime().exec("ifconfig");
              InputStream stdoutStream = new BufferedInputStream(p.getInputStream());
              StringBuffer buffer= new StringBuffer();
              for (;;) {
                   int c = stdoutStream.read();
                   if (c == -1) break;
                   buffer.append((char)c);
              String outputText = buffer.toString();
              stdoutStream.close();
              return outputText;
          * Windows stuff
         private final static String windowsParseMacAddress(String ipConfigResponse) throws ParseException {
              String localHost = null;
              try {
                   localHost = InetAddress.getLocalHost().getHostAddress();
              } catch(java.net.UnknownHostException ex) {
                   ex.printStackTrace();
                   throw new ParseException(ex.getMessage(), 0);
              StringTokenizer tokenizer = new StringTokenizer(ipConfigResponse, "\n");
              String lastMacAddress = null;
              while(tokenizer.hasMoreTokens()) {
                   String line = tokenizer.nextToken().trim();
                   // see if line contains IP address
                   if(line.endsWith(localHost) && lastMacAddress != null) {
                        return lastMacAddress;
                   // see if line contains MAC address
                   int macAddressPosition = line.indexOf(":");
                   if(macAddressPosition <= 0) continue;
                   String macAddressCandidate = line.substring(macAddressPosition + 1).trim();
                   if(windowsIsMacAddress(macAddressCandidate)) {
                        lastMacAddress = macAddressCandidate;
                        continue;
              ParseException ex = new ParseException("cannot read MAC address from [" + ipConfigResponse + "]", 0);
              ex.printStackTrace();
              throw ex;
         private final static boolean windowsIsMacAddress(String macAddressCandidate) {
              // TODO: use a smart regular expression
              if(macAddressCandidate.length() != 17) return false;
              return true;
         private final static String windowsRunIpConfigCommand() throws IOException {
              Process p = Runtime.getRuntime().exec("ipconfig /all");
              InputStream stdoutStream = new BufferedInputStream(p.getInputStream());
              StringBuffer buffer= new StringBuffer();
              for (;;) {
                   int c = stdoutStream.read();
                   if (c == -1) break;
                   buffer.append((char)c);
              String outputText = buffer.toString();
              stdoutStream.close();
              return outputText;
    how to pick the wireless physical address?
    Regards:

    Hi !
    our request object, which is available to all the jsp pages can access ip address and host name of client through these calls.
    request.getRemoteAddr()
    request.getRemoteHost()
    Interface "ServletRequest"
    getRemoteAddr ----
    public java.lang.String getRemoteAddr()
    Returns the Internet Protocol (IP) address of the client that sent the request. For HTTP servlets, same as the value of the CGI variable REMOTE_ADDR.
    Returns:
    a String containing the IP address of the client that sent the request
    getRemoteHost
    public java.lang.String getRemoteHost()
    Returns the fully qualified name of the client that sent the request. If the engine cannot or chooses not to resolve the hostname (to improve performance), this method returns the dotted-string form of the IP address. For HTTP servlets, same as the value of the CGI variable REMOTE_HOST.
    Returns:
    a String containing the fully qualified name of the client
    All the Best!
    (Simmy)

  • Get ip address of client machine and server

    Respected experts,
    I want to get ip address of the client machin and server machine.
    Which method should i use for getting this.

    drvijayy2k2 wrote:
    hi
    i am not sure
    but try request / servletrequest -> getRemoteHost() and getLocalHost()There isn't any getLocalHost() method for HTTPServletRequest. And in anycase, the getXXXHost() methods would return the hostname. You'll only get an IP address if the name cannot be resolved.
    @OP:
    [getRemoteAddr()|http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html#getRemoteAddr()] - be warned that this may be the IP address of the last proxy in the chain
    [getLocalAddr()|http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html#getLocalAddr()] - this is the address of the interface that the request came in on, so for a server with multiple NICs, you will only be getting one possible IP address.

  • How to check client machine IP address or Machine name

    I'm trying to check the client machine's IP address to restrict the unauthorised login in unassigned workstation. Any body know how to get the IP address of client machine? Is there any built in function to get it. I'll appreciate if you could send me email. Thanks.

    Hi,
    with the following statement you can get your pc's machine name:
    SELECT UPPER(USERENV('TERMINAL'))
    FROM DUAL;
    Be careful that, if you are dealing with a web envinronment, the outcome will be the Forms Server machine name.
    Regards,
    Marco

  • How to capture the IP address of the client Machine.

    HI...
    I want to capture the ip address of the client machine and store it in a field.
    My client wants to capture the ip address so that he can easily trace out from
    which client system particular work is done.
    if there any pre defined function or syntax is there to get the IP address...
    with cheers
    sprity....

    Hi.....
    i have a attached the web_util.pll n web_util.olb and run the form...
    it is still staying web_util.clientinfo is not declared....
    i want to know where to attach the olb thru subclass...
    i tried in attaching the text item(ip_addr) property.After clicking the subclass it show the we_util.olb.
    but there is no value for in it for both object n property.
    i think if i get info on this then my work is done....
    anyone throw a light on my doubt...........
    with cheers
    sprity...

  • Logging query with information about ip client machine address

    Halo,
    One of our most important requirements is logging user query (physical to database and logical) with following informations:
    - USER
    - SQL QUERY TEXT (logical/physical)
    - DATE and TIME executing query
    - IP ADDRESS client machine (or name of client machine) (this is very important information)
    We have following configuration:
    - BI Server with Presentation Servicess on one machine (AIX)
    - Web server on second machine (BEA Weblogic 9)
    I've tested [USAGE_TRACKING] mechanism but thera are three problems with it:
    1. in S_NQ_ACCT in field NODE_ID is always written the same information: name of Web Server - WebLogic
    2. in S_NQ_ACCT are storages only logical queries.
    3. Length of field QUERY_TEXT is 1024. I'm sure that in many cases it'll be to short.
    I've tested USER_LOG too (that logs to NQQuery.log file) but there are also some problems:
    1. there is no information about ip client machine but is information about physical and logical queries and other necessary informations
    2. oracle recommends turn off this mechanism on production system.
    I've tested PRESENTATION SERVICESS log (it is configured at logconfig.xml file)
    1. In file is information about ip client machine
    2. In file are written only logical queries (this is big problem we also need physical queries)
    Do you have some idea how to resolve my problem?
    Regards

    hi, you can use the sys_context function, like this:
    select sys_context('userenv','current_user'),
         sys_context('userenv','os_user'),
         sys_context('userenv','host'),
         sys_context('userenv','ip_address'),
         sys_context('userenv','instance'),
         sys_context('userenv','sessionid'),
         sys_context('userenv','terminal')
    from dual;
    Is this what you 're looking for?

  • MAC address of DB or Client machine

    Dear,
    Can U please tell me how to get MAC address of Database or Client Machine via PL/SQL or routine used in PL/SQL envoirment.
    Thanks
    FAHAD AZIZ KHAN

    To get the MAC the simplest way would be to issue a HOST or CLIENT_HOST command to run ipconfig /all, redirecting the result of that to a file and then use the relevant TEXT_IO to read the output and pull out the Physical Address line.
    You'll just have to be careful on machines with multiple adaptors or virtual adaptors (such as VPN drivers) to pick the right one.

  • How to get the IP address of the Client machine???

    Hi All,
    I am trying to get the IP address of the Client machine and using the code
    SELECT SYS_CONTEXT('USERENV','IP_ADDRESS') FROM DUAL;
    but this query only return server ip address but i want Client machine IP .
    How can I get that. Please help.

    SowmyRaj wrote:
    Hi All,
    I am trying to get the IP address of the Client machine and using the code
    SELECT SYS_CONTEXT('USERENV','IP_ADDRESS') FROM DUAL;
    but this query only return server ip address but i want Client machine IP .
    How can I get that. Please help.Which client's IP addess?
    SYS_CONTEXT('USERENV','IP_ADDRESS') should give you the IP address of the machine from which the client is connected. So you are running sqlplus from Server?
    To check other session's information, you can check V$SESSION view.

  • IP address of the client machine ???

    I want to know how to get the IP address of the user who has logged in from a client machine through Oracle forms. Does anyone how to get it from Oracle forms.
    In fact i tried Sys_context (function) which returned the IP address of the client machine through SQL plus.
    Select SYS_CONTEXT('USERENV','IP_ADDRESS') From Dual;
    For testing sake, created a custom server side function using sys_context. From Oracle forms called the sever side custom function. During run time (from client machine), i got the IP address of the server (application server/DB server/forms server all in one NT box),not the IP address of the client machine.
    Any ideas, welcome.
    Thanks in advance
    Sai
    [email protected]
    null

    SowmyRaj wrote:
    Hi All,
    I am trying to get the IP address of the Client machine and using the code
    SELECT SYS_CONTEXT('USERENV','IP_ADDRESS') FROM DUAL;
    but this query only return server ip address but i want Client machine IP .
    How can I get that. Please help.Which client's IP addess?
    SYS_CONTEXT('USERENV','IP_ADDRESS') should give you the IP address of the machine from which the client is connected. So you are running sqlplus from Server?
    To check other session's information, you can check V$SESSION view.

  • Client machine requires "hosts file" include IP-address of server machine??

    Hi. all.
    I am using real IP address in tnsnames.ora at client machines.
    The client machine(windows)'s hosts file should have ip-address of server machine?
    Without hosts file(ip-address of server), tnsping is always OK, but
    sqlplus returns error from time to time.
    With hosts file(ip-address of server), sqlplus returns no error.
    The database is 2-node RAC database on windows2003.
    Thanks in advance.
    Best Regards.

    If you've got server side load balancing then the clients can get a redirect to one of your RAC nodes when it tries to connect. This redirect will be to a host name (at least thats what I get with our RAC nodes) - so you will definitely need the to be able to resolve the RAC node names. Resolution through the local hosts file or DNS doesn't really matter.
    Ahmed

  • How to get client machine name and IP address

    Hi,
    In my office I have one SERVER which has FORMS & Report Server installed and all the clients are accessing that application thru the following URL :
    http://OraServer:8889/forms/frmservlet
    to get the machine name I have read into a global variable like this
    SELECT USERENV('TERMINAL' ) into :global.clientname FROM DUAL;
    but obviously all the time its returning the SERVER machine name...not the name where client is accessing the program....so how can I get the client machine name..
    thanks

    Hi Frank,
    Well I am using Developer Suite 10g Release (10.1.2.0.2) ..I've gone thru the link what you have sent me and noticed that whatever updations of conf file or classpath its already there so i guess needn't to modify cause I think my release 10.1.2.0.2 has did already as webutils been bundled with it.
    Well What i did is to double click on ATTACH LIBRARY and browse the location to find webutil.pll and finally attached it...even though its showing me all the procedures like clientinfo and others...
    on my block's canvas I've put a button and used this trigger to get client info function like this.
    when-button-pressed trigger of INFOBUTTON
    DECLARE
    o_clientinfo varchar2(50) := Webutil_clientinfo.GET_HOST_NAME ;
    begin
    message(o_clientinfo);
    end;
    but when I am trying to open this form its simply not showing up..strange thing is that there is no error as well...so plz kindly guide me how to get clientinfo hostname or ipaddress using that library function.
    thanks

  • How to find out a file from client machine

    hi all,
    I want to read a file from client machine, like a outlook express file in which all the address are saved, using servlet. Initially i do not know the file path for that file, How i can read that file.
    plz help me
    thanx in advace
    Manish

    You have 2 possibilities. First, you might be able to mount the client's disk drive at the server; the servlet can then access that drive directly. Second, install a client program on the client machine and communicate with that program, and have it do the search (or whatever).
    Outside of Java, there are remote-access programs - like PCAnyWhere.

  • We have created shared folder on multiple client machine in domain environment on different 2 OS like-XP,Vista, etc. from some day's When we facing problem when we are access from host name that shared folder is accessible but same time same computer when

    Hello All,
    we have created shared folder on multiple client machine in domain environment on different 2 OS like-XP,Vista, etc.
    from some day's When we facing problem when we are access from host name that shared folder is accessible but same time same computer when we are trying to access the share folder with IP it asking for credentials i have type again and again
    correct credential but unable to access that. If i re-share the folder then we are access it but when we are restarted the system then same problem is occurring.
    I have checked IP,DNS,Gateway and more each & everything is well.
    Pls suggest us.
    Pankaj Kumar

    Hi,
    According to your description, my understanding is that the same shared folder can be accessed by name, but can’t be accessed be IP address and asks for credentials.
    Please try to enable the option below on the device which has shared folder:
    Besides, check the Advanced Shring settings of shared folder and confrim that if there is any limitation settings.
    Best Regards,
    Eve Wang
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

Maybe you are looking for