Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Getting wrong client IP address

  1. #1
    Junior Member
    Join Date
    Feb 2022
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Getting wrong client IP address

    I am facing one issue. I need client IP address for keeping logs. I used request.getRemoteAddr() for capturing IP address. But I am getting some other IP address instead of exact one.

    For an example my IP is 10.100.168.2 , but I am getting 10.102.107.9 like this . I checked with network team they are saying its firewall (WAF) address. How can I get actual client IP instead of WAF server address?

  2. #2
    Member Helium c2's Avatar
    Join Date
    Nov 2023
    Location
    Kekaha, Kaua'i
    Posts
    111
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default Re: Getting wrong client IP address

    good point. Are they accepting you as a client? Then you'll able to get the correct address. If they are giving you some other IP address, it's probably some host similar to the host you are trying to compile. Are you building your own computer using the Java Development Kit? And JRE.

Similar Threads

  1. my encrypting simple client to server program unable to get the key from client
    By Paytheprice in forum What's Wrong With My Code?
    Replies: 11
    Last Post: February 3rd, 2013, 07:15 AM
  2. Replies: 3
    Last Post: December 2nd, 2012, 11:18 PM
  3. Replies: 0
    Last Post: May 31st, 2012, 05:35 PM
  4. what's wrong with my code ? " server client socket
    By Wish.. in forum What's Wrong With My Code?
    Replies: 3
    Last Post: April 27th, 2012, 01:33 PM
  5. I need client IP address from Public IP server
    By packiaraj in forum JavaServer Pages: JSP & JSTL
    Replies: 7
    Last Post: February 16th, 2012, 07:47 AM