Does an IP address always have a corresponding domain name/URL? - networking

Apologizes if this is readily available somewhere but I'm not able to find it on google easily.
I'm wondering if an IP address will always have a corresponding domain name/URL. We are looking to remove acceptance of IP addresses and require our clients to pass a domain name instead but wanted to ensure that this is possible.

The answer is No.
An IP with a corresponding domain name/URL is strictly for readability purposes. You can map a particular IP to a domain name using a DNS server but it is entirely optional.
More info

Related

How to determine the IP of the server to which a client is connecting to? Is it possible?

I am now just starting to understand Httpcontexts and server side logic. Total beginner.
I have understood how to read the http requests from a client and get the remote IP etc.
I came across the hostname property.
I believe hostname and domain are completely different.
My undersanding is that stackoverflow is the domain name.
Given its widespread reach, stackoverflow can have multiple servers and hence multiple ip addresses.
So is there a way to determine to which server a client is requesting to in asp.net core 2.0?
You are correct that stackoverflow.com is a domain name. A domain name points to an IP address. That's called DNS. stackoverflow.com points to one single IP address not multiple. There's probably a load balancer at that IP address which then points you to an available server, which is internal you can't see that, but that's another story.
If you ping stackoverflow.com you get:
The whole point of DNS is to not use IP address but a domain name.
I'm not sure why you would want to see the IP. Maybe this stackoverflow question can help: Resolve HostName to IP

Why does the user's IP is a local one when accessing the page using the global URL?

I am logging every user's IP when they access the company's page.
There are two ways to access the page from inside the local network:
http://company/webpage
and
https://webpage.company.com
What bugs me is that even when the users use the https global IP, their accesses are still recorded on database with their IP as 10.50.1.12 or 10.50.1.100.
Does that means that the browser or something else is redirecting the https://webpage.company.com to company/webpage? Or does that mean that I'm using a flawed method to log the users IP?
Another way to ask my question (just to make sure I'm being clear): if I'm accessing my Internet web page from inside the LAN network, am I effectively going outside my network and then back? If not, where am I going wrong with my logging?
Code used to log user's IP:
user.LastIP = HttpContext.Current.Request.UserHostAddress;
I'm curious about this because I want to make sure the users inside the company will access the page using exclusively the LAN Network. The goal is to save bandwidth usage, which is scarce.
Edit:
Pinging the https://webpage.company.com from inside the LAN network will result in a reply from a global IP address like 194.xxx.xxx.xxx. So I'm clearly getting the user's IP wrongly. What would be the ideal way of retrieving the IP from the page accessing entity?
Access to http://company/webpage will result in a DNS lookup of the host name "company". To resolve this, DNS will need a fully qualified domain name (fqdn), so it will add a top level domain (according to the configured search list in the client). In this example, it seems fair to assume that the fqdn will be "company.com". This, in turn, may very well resolve to the same IP address as the "webpage.company.com". You can check this by using dns lookup utilities like 'nslookup' and 'dig', or simply by using 'ping company' and 'ping webpage.company.com'.
The users IP addresses you mention, 10.50.1.12 and 10.50.1.100, seems to be the local IP addresses of the client hosts. I base this assumption on the fact that these IP addresses come from the RFC-1918 address range which is used for internal addresses. My guess is that these are the correct IP addresses, and that your logging works fine.
The users IP address you will log from accessing 'http://company/webpage' and 'https://webpage.company.com' should in most cases be the same. You can see it this way: it doesn't matter what the target URL is, traffic is still coming from the same host, the same IP address.
In any case, you most probably don't need to worry about any traffic leaving your local network.

Free DDNS service

I have got one firewall, with a public IP (dynamic) provided by my ISP.
As the IP is dynamic, I registered a domain in the service NO-IP as not to worry whether the IP changes anymore.
The problem:
Looks like my ISP is also giving a name for that IP, so when I resolve it (standard DNS configured, such 8.8.8.8) it would resolve the name in favour of my ISP.
The key point:
¿Is there any way to "OVERRIDE" the name given by the ISP with the one registered in NO-IP, in order to ALWAYS resolve to the no-ip name?
Thanks!
Whatever you did with NO-IP/DDNS, it will have no effect on Reverse DNS lookup. Reverse DNS is controlled by whoever "owns" the IP address, usually your ISP, so they would have to change the record according to your request (or sub-delegate it to your DNS servers) which they will almost certainly not do since you have dynamic IP address.

how to specify different IP addresses for different users in Tsung

is it possible to specify users IP addresses in Tsung?
Because in Apache logs, the users have the same IP address, the IP of the machine from which testing have been done. I want to specify somehow in Tsung, that it should generate new users with unique identifiers for being possible to distinguish them on Apache logs.
Some ideas?
vhost is only supported by jabber/XMPP plugin not by HTTP or others. Visit http://tsung.erlang-projects.org/user_manual.html#htoc58 to get more.
If you want to specify IP , maybe use more slave in your cluster ? But we can not specify IP per user .

Looking for a list of aliases

All,
I have an IP address and I want to know all aliases within my organization that point to this IP. Is it possible?
For example I know the alias "TESTBOX" points to 119.119.119.119.
How can by just knowing the IP come up with the "TESTBOX" ?
Thanks,
M
Short answer: You can't.
You can try a reverse lookup on the IP address, but that will only show you the address that has been specifically allocated in the reverse DNS to that IP address.
Remember, aliases might exist only as an entry on a single machine's hosts file. They might also exist in a DNS server on the other side of the planet. However, if you're only interested in local DNS aliases, and your DNS servers allow zone transfers, then you can try listing every entry in every domain (eg. with host -l xyzzy.bigcorp.com) and searching the results for the IP address in question.

Resources