How can I get the client IP address correctly?

Hi,
I am having a problem with getting the client ip address correctly using jsp. I am currently using the method request.getRemoteAddr() (JSP)to get the remote client IP. This method works fine with intranet addresses.
However, when I am using a dial-up connection through a ISP (internet service provider), it could not detect the actual IP that is assigned to my client PC, but instead got another IP address.
Could anyone advise me on that? And could anyone advise me on how to obtain the correct client ip address correctly using any of the java technologies?
Thanks,
Damien

>
I don't believe so. You can't establish aconnection
over the internet using a private IP. As far as I
know most, if not all routers, block them so itwon't
even move over the backbone.Well with port-mapping it is definately possible to
allow an external ip to "connect" to an internal ip, i
have done this very thing myself...Not the same.
You are addressing the external server with a public IP address. That is then translated into the internal connection.
That is not the same as using a private IP on the internet.
As I said, the backbone will not let a private IP through.
>
>
Yes, but my point is that at any given time, in the
world, many boxes might have one address. Even ifit
is a private IP is it still that IP for aparticular
box. So if you use java to get its IP that is theIP
that it gets. And that IP is useless for anything
unless that IP is meaningful for the othercomputer.
But all ips must be unique in a designated "internet"
be it an "intranet" or whatever, there cannot be a
situation where two identical ips in the same
"internet", such that an ip that is achieved from a
page-hit is valid and meangingful in order to send the
data it is requesting back to it, or find out more
about that computer, or log and report it if it is
doing something illegal; i don't think its that
meangingless is it?Yes it is. You can't use an IP to uniquely identify a box, and that is the sole criteria, when there might be two boxes with the same IP.
When you use java on a client box to get the IP of the box, it doesn't necessarily return an IP that it meaningful to the anyone outside the lan on which the box lives.
Because of this internet systems must do one of the following:
-Do not use the IP as an identifier.
-Require that the client has a public IP. This is often static. At least some security systems use this to validate users.

Similar Messages

  • How  can i get the system ip address through d2k/oracle

    hi
    how can i get the I.P. address of the System, whether any builtin function is available oracle/d2k.
    please do needful help

    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:510222107880

  • How can i get the SMTP IP address for gmail

    Hello,
    sapian,
              I want to schedule a webi document through BI Launch Pad to users email address gmail.So while configuring the AdaptiveJobServer in CMC i need to give SMTP details such as
    Domain name:
    Host:
    Port:
    So for scheduling a webi document to a gmail user i need the above details for gmail SMTP server.Can any one suggest me how can i get the above details for gmail SMTP server.
    Thanks in advance.
    Regards,
    Kishor Kumar S

    Hi Hrishikesh,
    i have configured the 'stunnel.conf' file with the following details
    accept  =static ip address of the machine colon port number where the stunnel is installed
    connect = smtp.gmail.com:465
    and i saved the file.
    when i go to
    Start->Stunnel->service install
    it is giving error as follows
    Error binding ssmtp to (ip address and port number which i have given in stunnel.conf file 'accept')
    bind: No error (0)
    Can you suggest me the solution for the above error.
    Thanks in advance,
    Regards,
    Kishor

  • How do I get the client IP Address from the HTTPServletRequest object

    Hi ppl,
    How do I get the IP address of the client machine from the HTTPServletRequest object?
    Thnx in advance,
    Manoj

    Take a look at: http://java.sun.com/products/servlet/2.2/javadoc/index.html and check for the ServletRequest Interface.
    Be aware also if your web server is using proxy, proxyReverse and so because you could end getting the servers' IP and not client one.

  • How can I get the e-mail address (reply addr.) once connected to a server

    My application ask the user to enter the POP3 server host name (+ port) more the
    POP3 server userId and password .... I can get the e-mails and show the to the user ....
    Now, the user want to send a message from that "account" and what I need
    is to know the "reply address" (the "from address") to set to the outgoing message ...
    I would like to get it somehow (from the API or in anotherway) without asking the
    user to enter it ...
    So, oonce connected to the POP3 mail server (successful login) is it
    possible to get the e-mail address of that guy ??
    please let me know if you have a solution ....
    many thanks / regards / Max

    You are of course trying to get an email address in the format of [email protected] You already have "username" the trick is the somedomain.com. I don't believe that the pop3 server has anyway to tell you this. Unless your host name is "fully qualified", i.e. pop3.somedomain.com, I don't know that you can get this information. Maybe you could take the IP address and do a reverse DNS lookup? Still you wouldn't really know if that is the domain the user really wants. For example I retrieve and send my email from aaa.com, but my domain for my reply-to is bbb.com. Your goal is noble, but perhaps not practical. That is why Outlook Express requires the user to enter their email address when setting up an account. Hope this helps.

  • How can I get the scrubber software to correct a driver installation error?

    I am currently on Windows 8.1.  When I try to install the printer driver for my OfficeJet Pro L7650 I get the following error message:  "System cannot find file specified".  
    I have read that there is a scrubber software that will solve this issue.  How can I get this software?
    This question was solved.
    View Solution.

    You can get that HP program here.
    Restart your computer.
    Next run the HP Printer Install Wizard program found here.
    Please mark the post that solves your issue as "Accept as Solution".
    If my answer was helpful click the “Thumbs Up" on the left to say “Thanks”!
    I am not a HP employee.

  • My ipod touch will no longer download new apps after i updated via apple store.How can i get the updates deleted or correct the problem moving forward?

    My ipod touch will no longer download new apps after I updated via apple store.It freezes now when I attempt to download and blanks the app off entirely . How can I reverse the updates or correct the problem moving forward?

    Basics from the manual are restart, reset, restore.
    Try those

  • How can I get the client's user id?

    My application runs under a novell 5.1 network and I need to get the user's name who runs the application. How can I do that in Java?

    Assuming their logged into the machines Operating System with the same userid, you'd simply use:
    String userid = System.getProperty("user.name");

  • How can I get the e-mail address to automatically fill-in when I open Firefox home page

    Whenever I went into my e-mail icon on my desktop my e-mail address was already filled in, all that had to do was to type in password,Tab and was on e-mail screen. When I go into Mozilla Firefox icon on my desktop ,I have to type my address and my password before my e-mail screen appears

    You are of course trying to get an email address in the format of [email protected] You already have "username" the trick is the somedomain.com. I don't believe that the pop3 server has anyway to tell you this. Unless your host name is "fully qualified", i.e. pop3.somedomain.com, I don't know that you can get this information. Maybe you could take the IP address and do a reverse DNS lookup? Still you wouldn't really know if that is the domain the user really wants. For example I retrieve and send my email from aaa.com, but my domain for my reply-to is bbb.com. Your goal is noble, but perhaps not practical. That is why Outlook Express requires the user to enter their email address when setting up an account. Hope this helps.

  • Soft shadows around photos on a particular website appear as heavy black frames in Firefox 5.0 although they look like proper shadows in Firefox 4.0 and in other browsers. How can I get the shadows to display correctly??

    The shadow effect on two sides of the photos on this site looked fine in Firefox 4.0. When I upgraded to 5.0, the heavy black "frames" appeared in place of the shadows. No change had been made to the website between the time I looked at it in 4.0 and 5.0 (I know because I know the builder of the site). Indeed, it was only about an hour between my two viewings. So I figure the odd appearance has to have something to do with 5.0. But what? Is this fixable? Or do I need to wait for 5.1?

    That is either a bug in Firefox 5 or the script has a problem with Firefox 5.<br />
    It works in all other Firefox versions like Firefox 3 and 4 and 6 (Aurora) and 7 (Nightly).

  • 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.

  • I have updated my iphone 5s to iOS8 but it has my old icloud account, how can i change the icloud email address as i can not get passed this page?? please help :-(

    i have updated my iphone 5s to iOS8 but it has my old icloud account, how can i change the icloud email address as i can not get passed this page??
    I do not know the log in details and no longer have that icloud email address !!
    please help :-(

    That's Activation Lock. You will need to remember the Apple ID and password you used to set up the phone.
    If you can't remember them, you can go to iforgot.apple.com to try to recover the information.
    If you are the original owner of the phone & have proof of purchase, you can try calling Apple to see if they can assist also.
    ~Lyssa

  • How can I get the address book to sort by "Last" name (using v 31.3.0).

    After a computer crash, I had to load Thunderbird (v31.3.0) back into my machine running Windows 8.1, and I successfully imported my address book back up file into Thunderbird (v31.3.0).
    My problem is that I don't see an option to sort the address book by "Last" name, which was available with the version of Thunderbird I had before the crash.
    How can I get the address book to sort by "Last" name?

    In 'Address Book'
    Select address book
    'View' > 'Show name as' > 'Last/First'
    The you can sort by Name.
    Either click on 'Name' column header to change sort order,
    If reversed, then click on 'Name' column header again to reverse the order.
    Or
    'View' > 'Sort By' > choose 'Name' and 'Ascending'

  • How can I get the last updated email address of the customer ??

    Dear All,
    Please let me know, How can I get the last updated email address of the customer ??
    Also, I am trying to read CDHDR table where OBJECTCLAS is ADRESSE, however what value should be passed into OBJECTID field, looks like it is ADRNR with a Suffix BP.
    Please confirm me what value should be passed into OBJECTID field.
    Thank you.
    Anitha

    Hi Anitha,
      Check if this is something that helps you:
    Change documents in BAS
    CDHDR
    address type 1
    objectclass = ADRESSE             
    objectid = addrgroup + addrnumber     (ADRC-ADDR_GROUP + ADDRNNUMBER) !!
                     'BP  000xxxxxx'
    private address (address type 2)
    objectclass = ADRESSE2
    objectid =  'BP  000xxxxxx000yyyyyyy'   
                            persnumber+adrnr private
    address type 3
    objectclass = ADRESSE3
    objectid =  'BP  000xxxxxx000zzzzzzz'
                              persnumber +comp.address
    The above details is from the link: http://wiki.sdn.sap.com/wiki/display/ERPLO/LO-MD-BP
    Regards,
    Swarna Munukoti

Maybe you are looking for

  • Problem - Bursting information in Xml file

    Hello All, Can you please guide me How to burst a BIP stand alone version report with all the email(bursting) information coming as XML file source. In other words, I've a report with Data model as file source(xml file) and would like to burst it, bu

  • How can I find the warp tool in Elements 11?

    I have used Elements 9 using the warp tool but I have up-graded to Elements 11 and cannot locate it. 

  • Update using a Function in select satement

    Hi Is it possible to do follwing . i have tabele and a custom fucntion , the custome function will update the column(amount) in the table a based on the value pass through the function from the select statement . select id, amount , outstanding from

  • Multiple values for a Like condition

    How can I make a like condition for multiple value options, for example select b.segment1, b.segment2, b.description, c.cross_reference, c.cross_reference_type from inv.mtl_system_items_b b, inv.mtl_cross_references_b c where b.inventory_item_id = c.

  • Critical Show Stoppers in Tomcat5 running the Struts application

    HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: org/apache/jsp/viewdetails_jsp (wrong name: org/apache/j