Hello,
I have a wireless router that connected to my office server (so users can get files )
the WiFi is 192.168.1.x/24
the ethernet is 10.0.0.1/24
everything is working and I have access to the files - great
I don’t want the users to know the IP of the server
so I have try to add static DNS , I did this :
add address=10.0.0.200 name=Office.Server ttl=5s
but i still see 10.0.0.200 and not Office.Server
why is it?
did I forget something ?
No, you enter “Office.Server” (because you don’t want users to know the address, remember?). It gets resolved to 10.0.0.200, connection will go there, but you will still see the name. Resolution from address to name works for reverse (PTR) records and you can see it e.g. with traceroute. If you enter address as destination, it will also show you the name.
Of course I assume that by “don’t want the users to know the IP of the server” you mean “don’t want the users to have to remember the IP”, because you can’t really hide it and let them connect to it at the same time.
It’s because http servers can provide multiple different websites on one address (virtual hosting). When client connects to server, it sends hostname as part of request. It depends on server configuration, what happens when the hostname is unknown to it. In your case, you have two different names (“10.0.0.200” and “Office.Server”), so it is possible to get two different results. I don’t know what kind of http server you have, so I can’t tell you anything specific, but it’s definitely server’s config you need to look at.
Since the hostname already resolves to something, it’s probably ok. But yeah, it can’t hurt to verify (e.g. using ping) if it’s really 10.0.0.200.
Regarding Tomcat server, all I know about it is that it’s something with Java. I’m not a fan myself, so I don’t have any experience with that. I think (but I’m not sure) it’s based on Apache httpd. If so, you may try to look in config files and search for blocks an in there for ServerName (primary hostname) or ServerAlias (optional additional hostnames, can be repeated as many times as needed; you’d add “ServerAlias office.server”). But it’s also possible that this part is correct and it’s the application which refuses to work with unknown hostname, but I wouldn’t be able to help with that.