The loopback network interface网络配置
- kali的作用不多讲 这里进行私有配置
sudo mousepad /etc/network/interfaces
#auto eth0 #iface eth0 inet dhcp auto eth0 iface eth0 inet static address 192.168.0.30 netmask 255.255.255.0 gateway 192.168.0.1
ip划分规则直达
域名解析
sudo mousepad /etc/resolv.conf
nameserver 192.168.0.254 nameserver 114.114.114.114 nameserver 8.8.8.8
or
sudo echo nameserver 8.8.8.8 nameserver 114.114.114.114 >> /etc/resolv.conf
锁定文件
- 修改是即时生效的,下一次解析就会使用配置的dns服务器解析域名
直接修改该文件的话,会在下一次重启时失效。简单的解决办法,锁定文件
sudo chattr +i /etc/resolv.conf
reboot#重启
重启网络服务
sudo /etc/init.d/networking restart # or sudo systemctl restart networking
换源
sudo mousepad /etc/apt/sources.list # See https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/ # deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware # Additional line for source packages # deb-src http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware ## add China # 官方源 # deb http://http.kali.org/kali kali-rolling main non-free contrib # deb-src http://http.kali.org/kali kali-rolling main non-free contrib #根据需要自己选一个,中科大的还可以 #中科大 deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib #阿里云 #deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib #deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib #清华大学 #deb http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free #deb-src https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free #浙大 #deb http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free #deb-src http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free #东软大学 #deb http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib #deb-src http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib #重庆大学 #deb http://http.kali.org/kali kali-rolling main non-free contrib #deb-src http://http.kali.org/kali kali-rolling main non-free contrib