Kali personal initial configuration

1. Modify the root password

sudo passwd root    

2. Kali is changed to a domestic source

vim /etc/apt/sources.list, comment out the default official source

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
# 更新
apt-get update      
apt upgrade

3. Input method configuration

apt-get install fcitx-pinyin

fcitx-config-gtk3

进入配置后,选择附加组件,拼音基本设置,选择双拼
重启系统

4. Configure a static IP address

vim /etc/network/interfaces

Add as follows

auto eth0                #网卡设备名
iface eth0 inet static   #指定网卡网络方式为静态IP
address 192.168.80.141
netmask 255.255.255.0
gateway 192.168.80.2
dns-nameserver 114.114.114.114

Modify a dns temporary effective file

vim /etc/resolv.conf

nameserverBy default it points to the gateway:192.168.80.2

image-20230819205244697

It needs to be closed before restarting the network service NetworkManager, and the service is prohibited from starting automatically at boot

Note: Close NetworkManagerthe service. This service is a graphical management tool for network services. This service will automatically take over the network service, which may cause the problem that the configuration does not take effect when the network service is restarted.

systemctl stop NetworkManager
systemctl disable NetworkManager

restart network service

systemctl restart networking

5. Firewall

apt-get install ufw 

ufw status #Check the status of the firewall (default inactive)

ufw version #firewall version

ufw enable # start ufw firewall

ufw disable # close ufw firewall

ufw default deny # Default access to all

ufw allow 22/tcp # Open 22/TCP port

ufw allow 53 # Open port 53 (tcp/udp)

ufw deny 3306 # Forbid external access

ufw delete allow 22 #Delete the added rules

ufw allow from 192.168.1.100 # Allow this IP to access all local ports

ufw delete allow from 192.168.1.100 # delete the above rules

ufw status numbered #View rules, display line number

ufw delete 3 # delete the third rule

ufw disable # close ufw

ufw deny 8888 # Forbid access to port 8888

ufw allow proto tcp from 192.168.0.1 to any port 22 # Open port 22 for tcp requests from 192.168.0.1

6. Turn off the automatic lock screen

settingsClick power managerPower Management
insert image description hereinsert image description here

Guess you like

Origin blog.csdn.net/ZhaoSong_/article/details/132384890