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

我意思就是类似于DNS劫持

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

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

3个回答

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.

qq_29594393
当作看不见 曹老师,你这有点任性啊, o(*≧▽≦)ツ ~ ┴┴
2 年多之前 回复

那个外国人说的是正面的,但是如果就这一个网站的话就写个后台程序挂着就好了,网站很多的话把客户机的所有网络指向服务器,服务器想干嘛干嘛,但是这个我没搞过,我记得有个例子是在路由上装镜像指向你的电脑,记不太清了,你可以试试

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!