iT邦幫忙

2018 iT 邦幫忙鐵人賽
DAY 8
0
Software Development

Linux從零開始系列 第 8

Linux從零開始(8/30): 固定IP、網卡設定

  • 分享至 

  • twitterImage
  •  

有時侯Malware在虛擬機中跑不起來…
除了可能被認證為邊緣人
也有可能是網路環境問題
需要設幾個IP吻合Malware執行要求…著樣


===確認使用中的網卡資訊===

nmcli dev status

使用中的網卡顯示已連線
https://ithelp.ithome.com.tw/upload/images/20171215/20107398RQBm2ezMPe.jpg

===啟動/關閉網卡---
網路設定檔位置(以CentOS7為例)

停用網卡

nmcli device disconnect 網卡編號

啟用網卡

nmcli device connect 網卡編號

重啟網卡

systemctl restart network.service

===設定固定IP===

方法1. 編輯文檔

vim /etc/sysconfig/netwotk-scripts/ifcfg-網卡代號

https://ithelp.ithome.com.tw/upload/images/20171215/20107398S2CeGtSIrj.jpg

確認IP設置~
IP: 192.168.95.27
子網路遮罩: 255.255.255.0
https://ithelp.ithome.com.tw/upload/images/20171215/20107398ef1GDw1DwX.jpg

方法2. 使用指令

nmcli connection add type ethernet con-name NEW ifname eno16777736 ip4 [new-ip] gw4 [gateway-ip]

重新啟動

nmcli connection up NEW ifname eno16777736

<<<更換主題原文重發>>>
原文https://ithelp.ithome.com.tw/articles/10191686


上一篇
Linux從零開始(7/30): 登錄檔查閱
下一篇
Linux從零開始(9/30): 使用其它身份執行root權限
系列文
Linux從零開始30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言