-2

i'm searching 2 days for this question, and i can't resolv this.

I have a debian, BIND9 server running, so i create a zone for example www.somewebsite.com and point the domain to my server /var/www/site. the domain somewebsite.com have an external IP like 200.200.200.200, when i create a zone for this domain, i use my server ip, but when i use the dns on my pc, and ping www.somewebsite.com ,sure, it's return my server ip,

i would like to know, it's possible point the "external ip" of www.somewebsite.com to my server, so when im using the dns on pc and ping www.somewebsite.com, returns the real ip 200.200.200.200, and dont show my server ip? resolving the ip on my server?

Thank's

  • IP MY SERVER: 100.100.100.100 IP somewebsite.com: 200.200.200.200 i created a zone somewebsite.com on my server, with A record to 100.100.100, ok, its working, when i access somewebsite.com trought dns using other pc, i go to somewebsite with ip 100.100.100.100. But i need to point the A record to 200.200.200.200, so when clients request for somewebsite.com be redirected to my server but with ip 200.200.200.200, i want my server supose to have this ip on localhost or something like it – Fred Leuic Feb 28 '13 at 18:40

1 Answers1

0

I'm not sure if you're hosting your own name server or if you're talking about managing an internal DNS server. Regardless, the answer is the same. Create an A record for www.somethingweb.com and point it to your public IP.

Note: depending on your routing on your network, you may not be hitting the server when you ping or try to access it via browser; especially if you are behind a router. You will need to open your firewall and forward port 80 to your web server as well.

CIA
  • 1,604
  • 2
  • 13
  • 32
  • hi, thanks for reply. I'm managing an dns server. If i create an A Record for www.someweb.com to point to my server ip example 11.11.11.11, when i'm using my own dns, and ping www.someweb.com will show my server ip 11.11.11.11 . I would like i'ts return 200.200.200.200 (the real www.someweb.com ip). I want to create A Record for www.someweb.com and POINT to real ip 200.200.200.200, i need some route code, im trying with rinetd, to redirect my clients traffic queries of the real ip to my server. – Fred Leuic Feb 27 '13 at 13:48
  • dnsmasq can do the trick? – Fred Leuic Feb 27 '13 at 15:10
  • If you have your DNS A record for www.somethingweb.com set to 200.200.200.200, when you ping www.somethingweb.com, it will ping 200.200.200.200. It doesn't make sense to set it to 11.11.11.11 if you want it to point to 200.200.200.200. Are you wanting the DNS A record for www.somethingweb.com to point to 11.11.11.11, but when people ping www.somethingweb.com, 200.200.200.200 responds? That's not how DNS is meant to work... – CIA Feb 27 '13 at 17:54
  • If you want to keep the A record pointed to 11.11.11.11, so all public users who ping www.somethingweb.com get 11.11.11.11, but for whatever reason you want to ping 200.200.200.200 instead from only your computer, you can edit your host file for you computer and make a manual entry there. On Linux: `/etc/hosts`. On Windows: `c:\windows\system32\drivers\etc\hosts`. – CIA Feb 27 '13 at 17:59
  • I cant edit host pc by pc, there's a lot of pcs... i need route the query's traffic under 200.200.200.200 to local, like creating a fake local interface with this ip, or something, because the clients ask to my dns the ip of somedomain.com and i want return the real ip, but route users to my server. – Fred Leuic Feb 27 '13 at 19:08
  • Oh. You're just trying to obfuscate the server's address. You can use iptables to forward the ping to the address you want. Try something like: `iptables -t nat -A PREROUTING -p ICMP -j DNAT --to-destination 200.200.200.200` – CIA Feb 27 '13 at 19:28
  • hi, thanks, but isn't working . i need fake the external ip on localhost, to clients using my dns.. be on my server when access the external ip – Fred Leuic Feb 28 '13 at 14:11