解决方法
方法一:
如果更新源使用的是kali官方源
#修改apt更新源
vim /etc/apt/sources.list
#文件内容如下,保存退出
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
#apt update更新时,会显示源不安全,因此下载kali源的数字签名
wget archive.kali.org/archive-key.asc
#安装下载好的数字签名
apt-key add archive-key.asc
方法二:
如果更新源使用的国内源
#修改apt更新源
vim /etc/apt/sources.list
#文件内容如下
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
#进入配置目录
/etc/apt/apt.conf.d
#修改配置前查看属性情况,一般显示如下,该属性值为0,也就是false
#Acquire::AllowInsecureRepositories "0";
apt-config dump | grep Acquire::AllowInsecureRepositories
#修改配置文件
vim 70debconf
#将下述属性进行添加
Acquire::AllowInsecureRepositories "true";
#再次查看属性值
#显示Acquire::AllowInsecureRepositories "true";为正常显示
apt-config dump | grep Acquire::AllowInsecureRepositories
#再次更新时,就会提示错误,但是不会阻拦更新
在推荐个阿里云源
cd /etc/apt
echo "deb http://mirrors.aliyun.com/debian stable main contrib non-free" >> sources.list
echo "deb http://mirrors.aliyun.com/debian stable-updates main contrib non-free" >> sources.list
iptables
22 端口连不上
69 apt-get install iptables-services
70 apt-get install iptables
71 sudo iptables -P INPUT DROP
72 sudo iptables -P OUTPUT ACCEPT
73 sudo iptables -P FORWARD DROP
74 sudo iptables -A INPUT -i lo -j ACCEPT
75 sudo iptables -A OUTPUT -o lo -j ACCEPT
76 sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
然后就可以了
安装arpspoof
58 apt update
59 apt-get install dsniff
60 arpspoof