向当地Netwerk上的ipadress转发Localhost
我已经注册了一个域名,并且在其中制作了一个记录,指向127.0.0.1(又称Localhost)。在这种情况下,我希望能够从与服务器运行的服务器中的机器上使用网站上的工作,但这些服务器不向公共Internet开放。我仍然想使用我的测试子域来访问此网站机器。我可以使用Windows命令将Localhost转发到特定的iPadress,例如Linux具有“ Iptables”?还是可以这样做的程序?最好免费。 我不想将内部iPadress添加到DNS记录中,因为那将是敏感的信息。
I have a domain name registered and i made an A record on it that points to 127.0.0.1 (aka localhost). I want to be able to work on websites in this case from machines that are in the same network as the server its running on but those servers are not open to the public internet. I still want to use my test subdomain to access this website but that would point to the machine im working on at that time so it must forward the requests to an 192.168.. ip adress I have set entered on the machine. Is there a windows command i could use that forwards localhost to a specific ipadress, like linux has 'iptables'? Or a program that could do this? Preferably for free.
I dont want to add my internal ipadress to a dns record because that would be sensitive information.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将条目添加到
/etc/hosts
(linux)或c:\ windows \ system32 \ drives \ etc hosts
(Windows)怎么样?格式为:
< ip地址> < servernname>
,例如:192.168.10.12 www.stackoverflow.com
。完成此操作后,访问
http://www.stackoverflow.com
从hosts
文件进行编辑的机器中最终将被服务器运行在<<代码> 192.168.10.12 。What about adding an entry to
/etc/hosts
(linux) orc:\Windows\System32\Drivers\etc\hosts
(windows) ?The format is:
<ip address> <servernname>
, e.g.:192.168.10.12 www.stackoverflow.com
.Once you did that, accessing
http://www.stackoverflow.com
from the machine where thehosts
file has been edited will end up being served by the server running on192.168.10.12
.