#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    2
    Rep Power
    0

    Inet_client_addr() and strange result


    Hi guys...

    I use inet_client_addr() funkction to get IP address that current session comes from, but the result surprises me.

    I'm connecting from machine 192.168.1.100 to postgres server 192.168.1.200.
    inet_client_addr() function gives me back 192.168.1.1 (addrres of my router) instead of 192.168.1.100.

    Do I do something wrong? Maybe this is some kind of bug? How to get result that I need - mean address IP of current session?

    regards
    Mario
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    2
    Rep Power
    0
    I found answer. I have port forwarding and for my convenience I've connected to the server from outside (with outside address).

    thanks

IMN logo majestic logo threadwatch logo seochat tools logo