关于debian系统网关的设置
1、网关主机设置eth0为外网网卡(1) 修改/etc/network/interfaces文件内容如下:auto lo eth0 eth1iface lo inet loopbackallow-hotplug eth0iface eth0 inet staticaddress 192.168.1.123netmask 255.255.255.0gateway 192.168.1.1当然也可以使用
·
1、网关主机设置
eth0为外网网卡
(1) 修改/etc/network/interfaces文件内容如下:
auto lo eth0 eth1
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.123
netmask 255.255.255.0
gateway 192.168.1.1
当然也可以使用ifconfig进行配置:
$ ifconfig eth0 192.168.1.123 netmask 255.255.255.0
$ route add default gw 192.168.1.1
(2)修改DNS服务器配置文件: /etc/resolv.conf
//具体DNS地址依据ISP提供设置
nameserver 8.8.8.8
nameserver 8.8.4.4 //备用
修改完成后,/etc/init.d/networking restart重新启动。
更多推荐
已为社区贡献1条内容
所有评论(0)