VirtualBox中安裝Ubuntu Server本機網絡配置

1,首先在虛擬機當中開啓第二塊網卡,並且使用bridge方式連接

2,/etc/network/interfaces中添加
# eth1
auto eth1
iface eth1 inet static
address 192.168.1.101
netmask 255.255.255.0
broadcast 192.168.1.255

3,在/etc/resolv.conf添加
nameserver 8.8.8.8
nameserver 192.168.1.1

4,sudo /etc/init.d/networking restart 重啓網絡之後,從windows ping 192.168.1.101就可以ping通了,服務器開了 ssh 的話,windows就可以用ssh登陸了
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章