Redirecting dns ip to url locally
If from other server on that network, if is linux os command is host mywebsite.corp.com 172.20.1.1
, I guess that is 172.20.1.1 your DNS server,
you can not resolve logical name to ip address, problem is on record on dns server.
On DNS
server you must have record, mywebsite.corp.com A 172.20.1.96
.
Related videos on Youtube
Jason
Updated on September 18, 2022Comments
-
Jason over 1 year
So I have this ip http://172.20.1.96:8080. I would like to redirect it to something like http://mywebsite.corp.com. I think I changed all the configurations that need to be changed, but I can only get into the website by typing 172.20.1.96:8080, but gets an error saying that its site can't be reached when typed in mywebsite.corp.com. I also mapped IP/hostname in the router.
P.S. I am trying to get it to work internally, no need to make it externally. I can also ping its ip from other server that is in same network, but not by its domain :(
I would really appreciated if someone could help! Thank you!
cat /etc/hosts 127.0.0.1 localhost.localdomain localhost 172.20.1.96 mywebsite.corp.com
hostname mywebsite
cat /etc/resolv.conf # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 172.20.1.1 search localhost search mywebsite.corp.com
-
2707974 about 7 yearsWhat is you dns server? Problem is on record on dns server. On
DNS
server you must have record,mywebsite.corp.com A 172.20.1.96
. Give me output from "other server" on that network, if is linux oshost mywebsite.corp.com 172.20.1.1
I guess that is172.20.1.1
yourDNS
server. -
Jason about 7 yearsIt is 172.20.1.1. Now it is redirected to mywebsite.corp.com. Thank you!
-
Fabby about 7 years@2707974 That comment qualifies as an answer! Please post it as one and drop me a line and I'll come back and upvote!
-
2707974 about 7 yearsYou have answer based on my comment :)
-