四GG 2017-02-03 16:59 采纳率: 0%
浏览 1085

请问如果在局域网内模拟出个公网?

我意思就是类似于DNS劫持

例如:
局域网两台电脑,一台做服务器,一台做客户机,没有外网。
我希望用客户机打开www.csdn.net时,跳到的是这台服务器里的网站
或者输入一个公网地址,访问的是这台服务器。

不局限网站,客户机的访问方式可能是多种协议的。

  • 写回答

3条回答

  • threenewbee 2017-02-03 17:24
    关注

    I can't type Chinese characters, sorry for that.
    if you have just 2 PCs, the simplest method is modifing your local hosts file

    http://jingyan.baidu.com/article/09ea3ede0600ebc0afde3968.html

    if you have more PCs, you can setup a local DNS server, there are bunch of DNS servers you could choose, for instance, ntbind or bind( on linux)

    http://blog.csdn.net/zhanlanmg/article/details/52822371

    when you hava had a private DNS server, you can let you DHCP server to use that, and all clients will use that automatically.

    then, you can setup you own http server, ftp server and so on, to simulate some websites, ftp servers or others. the only thing you should remember is to put you domain address to the server you built.

    additionlly, you could use special soft-route os for x86 as well, like routeos or hi-spider, they privide an out-of-box solution to meet your requirement.

    评论

报告相同问题?

悬赏问题

  • ¥15 求解 yolo算法问题
  • ¥15 虚拟机打包apk出现错误
  • ¥30 最小化遗憾贪心算法上界
  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝