配置雙網卡IP地址
sudo vim /etc/network/interfaces
打開網絡的配置文件,修改對應的eth0(外網) 與eth1(內網)的內容,格式以下:
auto eth0
iface eth0 inet static
address 124.115.x.x
netmask 255.255.255.0
#broadcast 192.168.16.255
gateway 124.115.x.x
auto eth1
iface eth1 inet static
address 192.168.1.x
netmask 255.255.255.0
#broadcast 192.168.16.255
保存退出後,爲使配置生效
sudo /etc/init.d/networking restart
vim