我试着用Lubuntu个人电脑做一个路由器。我有两个网卡,一个连接到ISP,第二个连接到局域网。我遵循这教程。Dhcp服务器工作正常,我得到ip地址,我可以平外IP,但是我在域解决上有问题。没有一个域是可访问的。我错过了什么?
通过dhcp从我的ISP获得的所有网络参数。我没有绑定-dns服务器,我不需要它。在作为路由器的pc上,一切都很好。dns转发到Lan pc的问题。
我在windows-lan桌面ipconfig /all上所做的所有测试显示:
Connection-specific DNS Suffix . : example.org
Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller
Physical Address. . . . . . . . . : 74-D4-35-43-53-4B
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 10.1.10.100(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : Saturday, March 18, 2017 09:01:34
Lease Expires . . . . . . . . . . : Saturday, March 18, 2017 09:16:34
Default Gateway . . . . . . . . . : 10.1.10.1
DHCP Server . . . . . . . . . . . : 10.1.10.1
DNS Servers . . . . . . . . . . . : 10.1.10.1
NetBIOS over Tcpip. . . . . . . . : Enabled数多页/etc/网络/接口-在我的路由器-PC端。评论网关原因,我已经尝试了它和没有,默认情况下,webmin没有创建它。
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo enp2s0 enp3s0
iface lo inet loopback
#WAN
iface enp3s0 inet dhcp
#LAN
iface enp2s0 inet static
address 10.1.10.1
netmask 255.255.255.0
broadcast 10.1.10.255
network 10.1.10.0
#gateway 10.1.10.1
dns-nameservers 10.1.10.1 78.158.0.65
dns-domain 10.1.10.1发布于 2017-03-18 01:11:24
如果你准确地遵循了本教程。该问题与正确解析局域网端设备上的域名(如www.google.com )有关。
首先,根据内部机器是否是linux桌面,检查网络管理器中的设置。否则,如果CLI设备,请检查/etc/network/interfaces文件。
它看起来可能如下所示:
iface eth0 inet static
address 192.168.85.220
mask 255.255.255.0
gateway {ipofpcrouter}
dns-nameservers {ipofpcrouter}验证dns-名称服务器是否指向正确的地址,在您的情况下,您的of路由器地址。
若要验证路由器的ip地址,请放到该设备上的终端并发出命令:
ifconfig -a它应该提供结果本身,验证您的掩码设置正确。
eth0 Link encap:Ethernet HWaddr ac:16:2d:5d:63:7e
inet addr:192.168.85.210 Bcast:192.168.85.255 Mask:255.255.255.0
inet6 addr: fe80::ae16:2dff:fe5d:637e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4022 errors:0 dropped:0 overruns:0 frame:0
TX packets:366 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:253666 (253.6 KB) TX bytes:37170 (37.1 KB)如果值不匹配,则修改客户端设备上的值以进行匹配。您可以通过gui发出ifdown/ifup重新启动接口,或者禁用/可重命名的网络管理器。或者我喜欢做的事,重新启动系统。
对于Network :检查IPv4选项卡,并检查上面描述的设置。
祝好运。
https://askubuntu.com/questions/894145
复制相似问题