Get IP address of a kamailio user - kamailio

I have installed a sip kamailio proxy.
I'd like to find the IP address associated with my kamailio (registered) sip users but I can't find where it is stored and how to retreive it.
My guess is to use db_query from SQLOps module but I can't find the right table in my mysql database.
Does someone knows how to do that ?

I finally found that the location table has a "received" column that contains the IP address of a registered user (a regexp is necessary though).

Related

Problem with accurately detecting user's IP address

I have an unforeseen problem, namely I made a chat and it works perfectly.
Now I have a problem with the ip address, namely through user registration I take the ip address. In a PHP web application it's done like this:
$user_ip = $mysqli->real_escape_string($_SERVER['REMOTE_ADDR']);
The problem arises when I changed the name servers (with cloud flare name servers) the ip I have in the database is not the real ip of the user but the ip behind which the ddous guard is hidden (it was used before cloudflare)...
And when I ban a user, every user who has the same ip will get the ban (ddos guard assigned the ip that way) see screen shot:
(removed link ) (this is just example)...
Now i need the best solution to avoid this problem ,for all users i can maybe manual delete ip adresses and to save in database last logged ip adress?
But ho w i can to solve this problem for future...
Thanks in advance

get client ip and client location in symfony2

I need the client IP address to find the client location so that I could list the details of that area to he client. I used this code to find the IP address.
$this->container->get('request')->getClientIp();
But I'm getting the IP as 127.0.0.1.
How can I get the client IP address? Can someone give me a complete working code?
It's 127.0.0.1 because your server is installed on your machine (I guess).
But $request->getClientIp() is the right way to get the user ip.
For the geolocation, I suggest you to take a look at the geocoder library and his bundle.

Get public IP remotely

I'm thinking of a way to find the public IP of router at home, remotely.
For example if I'm in university and I need to connect to a machine in my home network. How can I get the public IP to connect to it?
To get the IP from that machine I can use something like this website - http://api.exip.org/?call=ip
But how can I send it to myself remotely?
One of the ideas is to write some sort of script that will check my email address for incoming messages. So when I need to know the IP, I just send some email to myself with specific text (or subject). When script will find that specific text, it will send the IP to the same email.
Another idea it to write a script that will upload a new file to the server (for example DropBox) every time the public IP is changed.
Or I can combine those two and email new IP every time it changes (not that often, but still it’s a spam).
What other solutions there can be, and how can I implement them (or the one that I have)?
I have Linux/Unix and Windows machines which I can use. I have no problem in writing code in different languages or looking in to any possible approach.
most of home router have dynamic DNS facility , you will find it in your router configuration as DDNS and configuration page you will find list of supported DDNS service ,most popular DDNS service is dyndns.org you have to subscribe there and they will give you tow free subdomain like example.dyndns.org , and after configuring that on your router you can easily from any where ping example.dyndns.org to know your router IP

Finding the IP Address of my system on asp.net page

I need my system IP address. I've used Request.ServerVariables["remote_addr"] but it is being provided IP address of my network(intranet) not my local system ip.
Actually I've set session state off and want to identify the user request. So i want to fetch the system IP not router/network IP.
Please tell me the appropriate solutions.
Request.UserHostAddress.
Try this.
try this
how to get ip address of machine in c#
You should be able to use:
Request.ServerVariables["LOCAL_ADDR"]
As seen on: http://msdn.microsoft.com/en-us/library/ms524602(VS.90).aspx

Find Remote IP using .net

i need to find the remote users ip address using asp.net and also i need clarification whether multiusers have same ip address
thanks
Shakthi
Dim userIP As string = Request.UserHostAddress
Edit Caveat - the below is talking about an internet scenario. On a more limited (intranet) network, you may be able to assume a 1-1 User-IP Address mapping
Multiple users may appear to have the same IP address.
The same user may make two requests in a row from different IP addresses.
Whatever you're trying to do, using the users IP address for anything other than logging is probably pointless.

Resources