0

I've got a machine configured to run a webserver on port 8080. That's all the machine is required to do, but it is possible that the website will be visited by the machine it's self (inside the routers LAN). If i try to visit the routers external IP:8080 I can't access the webserver.

If I connect from the internet it works fine. Likewise if I connect locally to the machine by it's internal IP or 127.0.0.1 It works fine aswell.

I appreciate some routers won't forward ports internally. But what alternatives have I got? I can't set a hosts entry as it's just IPs, no names. But I could assign a domain if required.

Alternatively, is there a way to force a machine to respond to requests for a particular IP without appearing as that IP on the subnet (Don't want to confuse routers etc...)

Win 2k8 server, IIS. Unknown router

Ben Ford
  • 101
  • Do you have an internal DNS server? Or any chance to install one? – Gabriel Talavera Jan 25 '14 at 17:57
  • You can access the site externally using the external ip address. You can access the site internally using the internal ip address. What is the actual problem then? – joeqwerty Jan 25 '14 at 18:04
  • The website contains a flash application that is configured to use services from a particular IP address. I don't see what good an internal DNS server would be? I could assign a subdomain to the ip address and add the same domain in the machine's host file. Or do you mean for other machines on the same subnet accessing it? In which case... yes an internal DNS server would be needed. – Ben Ford Jan 25 '14 at 18:33

2 Answers2

0

you setup your DNS server to send different reply based on the ip issuing the request.

so your DNS would send a private ip of the request chimes from your look an, and the public ip address otherwise. with bind name server you can ascetics this using views:

http://www.cyberciti.biz/faq/linux-unix-bind9-named-configure-views/

http://www.zytrax.com/books/dns/ch7/view.html

alxgomz
  • 1,630
  • 1
  • 11
  • 14
0

You can add the IP you would like the computer to loop back to itself as a secondary IPv4 address in the advanced network adapter settings with a subnet mask of 255.255.255.255.

Secondary IP]1