To get the IP Address: request.getRemoteAddr()

Dear All,
I need to verify the IP address of any request after an user logs in. Can I use request.getRemoteAddr()? If the user is accessing my web site using dynamic IP address, DHCP etc, will I get a different IP address after a while?
Thanks.
WITH Regards
FP

Or, I should use the following method to get the ip address?
InetAddress localHost = InetAddress.getLocalHost();
hostAddress = localHost.getHostAddress();
System.out.println(hostAddress);

Similar Messages

  • Is it possible to get the ip address of the person who logged in a site

    I need to get the IP address of the person who is browsing, i have tried request.getRemoteAddr() which is giving a firewall ip address but not his local system ip. what is the way to find out the ipaddress? should i use any applets or javascript?

    Any way I got it
    How to get the user ip address of client machine who is behind firewall
    use this code
    request.getHeader("x-forwarded-for");to get the local ip address
    InetAddress localadd = InetAddress.getLocalHost();
    localadd.getHostAddress();to get the external ip
    request.getRemoteAddr()and here are few links which ip address discussions are made
    [link1|http://forum.java.sun.com/thread.jspa?threadID=5155243&messageID=9586796]
    [link2|http://forum.java.sun.com/thread.jspa?threadID=5309344&tstart=0]
    thanks to BalusC and RahulSharna

  • Getting the IP address of the client

    How do I get the IP address of the client that makes a request in the Internet?
    getRemoteAddr() cannot be used since the client may be from a proxyserver or an ISP provider ...
    Can I get some help on this?
    Thanks in advance
    Jai

    I think you cannot get the IP address of the client if he uses a proxy server.
    Hope to hear good news from others.
    Regards.
    Jeffrey

  • Is there any possible ways to get the MAC address?

    Hi guys:
    I am writing servlets on the server side. Is there any possible ways to get the MAC address when a HTTP request come in? Thank you very much for any helps.
    all the best!

    It is usually impossible to get the MAC address of the maker of a HTTP request in any programming language or system.
    At best, you can get the MAC of the closest intervening router, firewall, whatever.
    Are you sure you mean the MAC address? MAC looks like this: 8:ab:f0:0:71:bb:90 (Ethernet), or 01-23-45-67-89-ab (Token Ring), etc, depending on your network type.
    In contrast, an IP address looks like this: 209.249.116.195. If you want the IP address, check out the javadoc for HttpServletRequest and ServletRequest. Caveat: load balancers, web caches, proxy servers, etc will mask the "true" peer's address. Don't do anything silly like try to use the IP address for security or authentication.

  • Whenever I update my iPhone software, it asks me to sign in to iCloud with an old email address.  My other devices all have the correct address.  How can I get the correct address for my iPhone?  The only Apple ID that works for logging in is my new one.

    Whenever I update my iPhone software, it asks me to sign in to iCloud with an old email address.  My other devices all have the correct address.  How can I get the correct address for my iPhone?  The only Apple ID that works for logging in is my new one.

    To change the iCloud ID you have to go to Settings>iCloud, tap Delete Account, provide the password for the old ID when prompted to turn off Find My iPhone (if you're using iOS 7), then sign back in with the ID you wish to use.  If you don't know the password for your old ID, or if it isn't accepted, go to https//appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Tap edit next to the primary email account, tap Edit, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device, even though it prompts you for the password for your old account ID. Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https//appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • How can I get the MAC address of my Apple TV?

    How can I get the MAC address of my Apple TV? I currently do not have an HDMI device to connect it to, and the MAC is not listed on the box or the Apple TV itself.
    (to answer the obvious, I am trying to pair it with an iPad, and I need to register the Apple TV for the network so the two can see each other)

    As long as I know java doesn't have support to work on link-layer, only internet and transport layers. You may write simple native code. On windows, IP Helper functions, like SendARP allow you to pass an IP address and get the hardware address. You store the hardware address on your database/file and later, when that machine is off, you send a frame to the address you stored previous.
    [http://msdn.microsoft.com/en-us/library/aa366071(VS.85).aspx]
    I haven't seen it on Linux, but if you need help let me know I'll check the Linux API's too.

  • Can I get the IP address of my stolen iPad through find my iPad?

    Hi. My iPad was very recently stolen when my house was burglarized. I have find my iPad turned on and marked the device as lost. Earlier, the iPad was located and the general location was sent to me. Unfortunately, the person who stole it turned it back off as soon as they saw that it was remotely locked (this is a huge problem to me, as a remotely locked device shouldn't be able to be so easily switched off). I told the police where it was located, but it wasn't on long enough to give me an exact location. So, they will not issue a warrant because it could be in one of about 4-5 houses.
    Does anyone know of a way I can get the ip address that was used when the device reported it's location via find my iPad? If I have that, then we can get a warrant and get the police to look for it. It seems like this should be available, as the device was marked as lost under find my iPad. I just can't seem to find the info anywhere on the site.
    If you have any advice, please help.

    You don't need to know the remote IP if you have your PPP setup correctly. Check this site out.
    http://www.stokely.com/unix.serial.port.resources/index.html

  • How to get the Delivery address for PO

    I have a problem.
    I am working on a SAP Script , which is for PO(Zmedruck_po) , which is a copy of
    MEDRUCK.
    I am asked to print the delivery adress in a window .
    The scenario is like this .
    In ME23N , under item details , there is a tab called DELIVERY ADDRESS
    this has option to enter the adress details or a delivery number in the  address text box .
    If the address number is present i have to print that address , else i have to print the address which is entered in the delivery address tab.
    If the delivey address number is there i have no problem in printing it ,But if address number is not there ,I need to know how to get the delivery address,
    is it the plant address, company code address ... ?
    I debuged ,but could not find out.
    Can anyone help please .

    Hi,
    try using the below method:
    Goto TWLAD table with storage location (EKPO-LGORT) as key to get address number (ADDRNUMBER).  then goto ADRC table to get the address of the delivery
    Regards
    Shiva

  • How to get the Url(address) of Next Page in Sequence of Pages in OAF

    Dear All,
    My requirement is to get the next page Url dynamically .
    i have created 2 pages ,first page have button to navigate to the next page ,when i click on first page button ,
    i want to store the url of the next page in column of the database table.
    This is urgent requirement .
    Please suggest .
    Thanks
    Maheswara Raju

    > Is there any way to get the memory address of a
    variable (like int ,float and all) in java.
    No. Chances are excellent that there's a way to do what you want without needing the variable's address, however.
    ~

  • How to get the MAC address of the additional 10G NIC with ILO command line

    how to get the MAC address of the additional 10G NIC with ILO command line?
    thanks.
    This question was solved.
    View Solution.

    Hi Bruce,
    Out from what I can find on this network card is it not possible to get the mac address without a OS. I would recommend you to get/burn a Linux/Ubuntu live CD/DVD and run a Ifconfig in there.
    Hope it helps you.
    Best regards
    Zincas
    I work on behalf of HP

  • How to get the IP address of printer USB attached to Time Capsule?

    I'm trying to work a printing problem with my HP7310 Officejet and VMware's Fusion 2.0.3. I'm on Mac OS 10.5.5.
    One of the first diagnostic steps for Fusion is to ping the IP address printer. If I open the Print & Fax dialog from System Preferences I can see the name of my printer, let's say it's called "foo bar". I then open a bash terminal and type: ping "foo bar", but get an "unknown host" message.
    I can ping the Time Capsule itself by getting the IP address from Airport Utility. The printer "foo bar" shows properly in the Airport Utility Printers dialog.
    Anyone have any suggestions?

    If you open AirPort Utility > Manual Setup > Advanced > Logs & Statistics > DHCP clients, a list of the devices will be displayed with their IP addresses. Make note of these.
    You will have to get the IP for your printer by process of elimination. Go to
    System Preferences > Network to see your ethernet and wireless connections and associated IPs. You should be able to narrow the list down to identify your printer.

  • Can I get the Mac address in Audit logs of Active directory server for the user's machine which connect to the network/Domain

    Hello All,
    I am trying to get the information of all the user's who connect to our Domain network by signing in using the domain account. For this I am using the Windows audit group policies ( I am not sure of there is any other way). I can see when the user tries
    to login to the network there is a audit event created on the AD/DC server. I can see the Kerberos authentication and logon/logoff events in the audit events under event viewer.  
              However the info which is being populated in these events include :- Hostname, IP address, Username and so on... But I can't see the MAC address of the user machine/system. Is there any way I can
    get the Mac address of the endpoint system as its one of the important criteria for our project.
    Any inputs on this would be appreciated, incase if there is any other way other than group policies please suggest.
    Thanks,
    Kavish

    > include :- Hostname, IP address, Username and so on... But I can't see
    > the MAC address of the user machine/system. Is there any way I can get
    > the Mac address of the endpoint system as its one of the important
    > criteria for our project.
    If you use DHCP, you can query the DHCP server. There's no builtin
    method to get the MAC address directly.
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • How to get the MAC address of a PXI in a dll

    Hi,
    I am looking for a way to get the MAC address of a PXI RT controller. I know that there is a VI to do this, but I am looking for a solution for a dll (C-Code).
    I use the "Call library node" to call this dll and want to make sure that it is only used on a specific PXI.
    Since the VI provides the functionality, I am wondering if it is also available to be called from C-Code?
    Thank you,
    Christian
    Solved!
    Go to Solution.

    ChristianEC wrote:
    Hi,
    I am looking for a way to get the MAC address of a PXI RT controller. I know that there is a VI to do this, but I am looking for a solution for a dll (C-Code).
    I use the "Call library node" to call this dll and want to make sure that it is only used on a specific PXI.
    Since the VI provides the functionality, I am wondering if it is also available to be called from C-Code?
    Thank you,
    Christian
    If it is available in LabVIEW it is probably available in CVI, which you could then build into a DLL (if there isn't one available already).
    CLA, LabVIEW Versions 2010-2013

  • How to get the MAC address of  other hosts in local net

    1. Is there any kerner or user function to get the MAC address of other hosts in local net?
    2. ire_route_lookup() can only lookup MAC in routing table(arp -a),Is there any way to enable it to find out all MAC of hosts in the local net?
    Best Regards
    Hann

    ChristianEC wrote:
    Hi,
    I am looking for a way to get the MAC address of a PXI RT controller. I know that there is a VI to do this, but I am looking for a solution for a dll (C-Code).
    I use the "Call library node" to call this dll and want to make sure that it is only used on a specific PXI.
    Since the VI provides the functionality, I am wondering if it is also available to be called from C-Code?
    Thank you,
    Christian
    If it is available in LabVIEW it is probably available in CVI, which you could then build into a DLL (if there isn't one available already).
    CLA, LabVIEW Versions 2010-2013

  • How to get the IP address of smtp server?

    For A record in DNS, we can use Java API InetAddress.getHostAddress() to get the IP address.
    But for mx record, how to get the IPaddress?

    If you know the hostname of the MX record (eg. mail.somehost.com), you can still use the InetAddress.getByName(hostname).getAddress()
    If you don't know the specific host name you can do a DNS lookup directly:
            String host="somehost.com";
            DirContext ictx = new InitialDirContext();
            Attributes attrs = ictx.getAttributes("dns:/" + host, new String[]{"MX"});This will give you a javax.naming.directory.Attributes object from which you can...
    Attribute att = attrs.get ("MX");This will give you all the MX records for the domain. To get the IP address of the MX hosts, you need to parse the record String returned. Usually something like:
    somehost.com       MX preference = 10, mail exchanger = mail.somehost.comParse out the mail.somehost.com and use:
        String mailhost = <Parse MX record here>
        InetAddress host = InetAddress.getByName(mailhost);

Maybe you are looking for

  • CUPS - Conferencing profil problem

    Hello, I've a little problem with a CUPS 8.6, so, when I create my conferencing profil i put my name, the description and the primary conferencing server. This is work perfectly, but when i want to add one user in the conferencing profil, I click on

  • Mail Crashes after 10.9.2 Update

    Hello, I just installed an update for Mavericks, and now, my mail program crashes everytime I try to open it.  Does anyone else have the same issue, and if so,   what can I do to resolve it?  A brief log of the crash report is listed below. Thank you

  • INTERMITTENT SPEED UP AND SLOW DOWN ON SAFARI URL

    First, I apologize if this question has already been asked (answered), but I'm not about to spend the time to read 541 pagest to find out. My basic question has to do with the inordinate length of time it takes to download (if that's the proper term)

  • Add Subject Areas after production

    We are implementing Oracle BI Apps for customer who initially requires only Financials Analytics. Now he want to add Procurement and Spend Analytics and Supply Chain Analytics. Anybody knows how to include new subject areas in a ETL extraction withou

  • Priority 1 Workitem: Pop Up to be blocked

    Hi all.   I have a std task with priorty 1. A user who is getting the pop up does not want them. He wants the workitem minus the pop up. Is  that possible ? if yes how? And its interesting to know that some of the recievers of the same workitem (basi