dns static ip name

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 ?

What do you mean by “see 10.0.0.200 and not Office.Server”? Where do you see it?

If I take my computer and connect to the network
then enter 10.0.0.200 - I don’t need to see it change to Office.Server?

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.

I will explain to you my problem now
If I enter Office.Server in the browser I get “Error 404: Not Found”
but if I enter 10.0.0.200 it’s working

how could it be?
my device get the IP from the router (he has DHCP server on it)- x86 v6.36
what am I missing ???

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.

the server is a ubuntu computer that running tomcat server on it
now what?

office.server.
(include the trailing dot)

Or resolve it to be in the same domain as the DNS suffix being assigned by DHCP.

If my computer’s domain is example.com - and I just type:
myserver

Then my computer is going to assume that I mean “myserver.example.com” and try to locate THAT address, and not just “myserver”

So be sure to resolve the FQDN (fully-qualified domain name) in your DNS, and NOT just the hostname.

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.

OK

Thanks ,