当前位置: 首页 > news >正文

儿童影楼网站设计seo自学网视频教程

儿童影楼网站设计,seo自学网视频教程,怎么在网站上做推,信息网站建设情况工作会目录 一.系统加固 二.ssh加固 三.换个隐蔽的端口 四.防火墙配置 五.用户权限管理 六.暴力破解防护 七.病毒防护 八.磁盘加密 九.双因素认证2FA 十.日志监控 十一.精简服务 一.系统加固 第一步:打好系统补丁 sudo apt update && sudo apt upgra…

目录

一.系统加固

二.ssh加固

三.换个隐蔽的端口

四.防火墙配置

五.用户权限管理

六.暴力破解防护

七.病毒防护

八.磁盘加密

九.双因素认证2FA

十.日志监控

十一.精简服务


一.系统加固

第一步:打好系统补丁

sudo apt update && sudo apt upgrade -y

可以设置自动更新:

sudo apt install unattended-upgradessudo dpkg-reconfigure --priority=low unattended-upgrades

二.ssh加固

1.禁止root直接登录:

sudo vim /etc/ssh/sshd_config

将其改为 PermitRootLogin no

2.用秘钥代替密码登录:

先在电脑上生成密钥:

/usr/bin/ssh-keygen -t rsa -b 4096

然后把公钥放到服务器上:

手动复制:先查看自己生成的公钥内容:

cat ~/.ssh/id_rsa.pub

然后将其复制到服务器的相应文件

远程复制:

ssh-copy-id username@server_ip

关闭密码登录:

vim /etc/ssh/sshd_config~

将root登录的替换公钥:

vim /root/.ssh/authorized_keys

检测配置公钥是否有效,登录验证:

ssh -i ~/.ssh/id_rsa root@your_server_ip

三.换个隐蔽的端口

修改配置文件:

sudo vim /etc/ssh/sshd_config~

将端口22改为2222

修改防火墙允许通过2222端口

UFW防火墙:

sudo ufw allow 2222/tcpsudo ufw reload

如果启用了22端口,直接禁用它:

sudo ufw deny 22/tcp

使用 firewalld:

sudo firewall-cmd --add-port=2222/tcp --permanentsudo firewall-cmd --reload

禁用22端口

sudo firewall-cmd --remove-port=22/tcp --permanentsudo firewall-cmd --reload

重启ssh服务:

sudo systemctl restart sshd/ssh

更改验证:

ssh -p 2222 username@hostname

四.防火墙配置

UFW是Ubuntu自带的防火墙

安装UFW:

sudo apt install ufw

只开放需要的端口:

sudo ufw allow 2222/tcp  # SSH端口sudo ufw allow httpsudo ufw allow https

启动防火墙:

sudo ufw enable

查看防火墙状态

sudo ufw status

五.用户权限管理

1.创建一个新的用户:

sudo adduser newuser

2.给sudo分配权限:

sudo usermod -aG sudo newuser

3.设置sudo超时:

sudo visudo

所有用户的sudo超时时间30分钟:

添加一行:Defaults timestamp_timeout=30

特定用户的超时时间:5分钟

username ALL=(ALL) ALL, timestamp_timeout=5

六.暴力破解防护

更新软件包:

sudo apt upgrade

下载:

sudo apt install fail2ban

默认位置:

/etc/fail2ban/目录

启动Fail2ban服务:

sudo systemctl start fail2ban

设置开机自启动:

sudo systemctl enable fail2ban

查看SSH的保护状态:

sudo fail2ban-client status sshd

七.病毒防护

ClamAV是Linux下的免费杀毒软件,下载

先更新系统:

sudo apt upgrade

安装ClamAV‌:

sudo apt install clamav clamav-daemon

更新病毒库:

sudo freshclam

扫描文件:

sudo clamscan -r --bell /path/to/scan 递归扫描目录并发出声音提醒

八.磁盘加密

一般使用LUKS

步骤一:

先下载工具:

sudo apt-get install cryptsetup

创建一个文件作为加密目录:

dd if=/dev/zero of=/path/to/encrypted_container bs=1M count=100

初始化LUKS容器:

sudo cryptsetup luksFormat /path/to/encrypted_container

打开LUKS容器:

sudo cryptsetup luksOpen /path/to/encrypted_container encrypted_volume

会创建一个名为encrypted_volume的设备(通常在/dev/mapper/目录下)

步骤二:创建文件系统挂载

在加密设备上创建

sudo mkfs.ext4 /dev/mapper/encrypted_volume

你可以根据需要选择文件系统类型(如ext4、xfs等)

创建一个挂载点并挂载加密设备‌

sudo mkdir /mnt/encrypted_directorysudo mount /dev/mapper/encrypted_volume /mnt/encrypted_directory

步骤三:配置自动挂载加密设备:

sudo nano/vim /etc/crypttab

添加一行:encrypted_volume /path/to/encrypted_container none luks

sudo nano/vim /etc/fstab

添加一行:/dev/mapper/encrypted_volume /mnt/encrypted_directory ext4 defaults 0 2

3.可以选择性更新initramfs

sudo update-initramfs -u

步骤四:存储和访问数据

你可以将重要数据复制到 /mnt/encrypted_directory 目录中。完成操作后,可以卸载和关闭加密设备:

卸载加密目录:

sudo umount /mnt/encrypted_directory

关闭加密设备:

sudo cryptsetup luksClose encrypted_volume

九.双因素认证2FA

安装Google认证器:

sudo apt install libpam-google-authenticator

配置PAM模块:

修改/etc/pam.d/sshd 在文件末尾加:auth required pam_google_authenticator.so

配置ssh服务:

修改/etc/ssh/sshd_config 确保ChallengeResponseAuthentication和UsePAM设置为yes

重启ssh服务:

sudo systemctl restart sshd

初始化Google Authenticator

生成二维码和秘钥:

google-authenticator,按照提示进行操作

使用手机上的Google Authenticator应用扫描二维码进行配置

十.日志监控

更新软件包:

sudo apt updatesudo apt install logwatchsudo logwatch --detail high --mailto your-email@example.com

安装完成,主配置文件通常在:

/usr/share/logwatch/default.conf/logwatch.conf

/etc/logwatch/conf/logwatch.conf

写上自己电子邮箱

sudo logwatch --detail high --mailto your-email@example.com

手动运行:

sudo logwatch --output file --filename /var/log/logwatch.log

可以配置计划任务运行:

* * * * * /usr/sbin/logwatch --detail High --mailto your-email@example.com --service all --range today

十一.精简服务

没用的服务关掉

# 查看运行的服务

systemctl list-units --type=service --state=running

# 关闭不需要的服务

sudo systemctl stop service_namesudo systemctl disable service_name


文章转载自:
http://dinncoscintigraphy.tpps.cn
http://dinncoabnormal.tpps.cn
http://dinncouniparous.tpps.cn
http://dinncopronase.tpps.cn
http://dinncomine.tpps.cn
http://dinncosubtorrid.tpps.cn
http://dinncorepublication.tpps.cn
http://dinncomethyltransferase.tpps.cn
http://dinncoamoebiasis.tpps.cn
http://dinncolactoflavin.tpps.cn
http://dinncoisn.tpps.cn
http://dinnconeurophysin.tpps.cn
http://dinncoprofessionalize.tpps.cn
http://dinncoflossflower.tpps.cn
http://dinncooxfam.tpps.cn
http://dinncoanalysissitus.tpps.cn
http://dinncocongrats.tpps.cn
http://dinncoungrateful.tpps.cn
http://dinncohih.tpps.cn
http://dinncogulosity.tpps.cn
http://dinncospiritualization.tpps.cn
http://dinncocerebrosclerosis.tpps.cn
http://dinncoknit.tpps.cn
http://dinncosynecious.tpps.cn
http://dinncogentility.tpps.cn
http://dinncorevelator.tpps.cn
http://dinncosulphuret.tpps.cn
http://dinncoiodid.tpps.cn
http://dinncoaerialist.tpps.cn
http://dinncoheteromorphic.tpps.cn
http://dinncodiscophile.tpps.cn
http://dinncomsn.tpps.cn
http://dinncodragnet.tpps.cn
http://dinncohousemaster.tpps.cn
http://dinncomalabo.tpps.cn
http://dinnconurserygirl.tpps.cn
http://dinncometazoic.tpps.cn
http://dinncokeratode.tpps.cn
http://dinncounique.tpps.cn
http://dinncoresurge.tpps.cn
http://dinncotriathlete.tpps.cn
http://dinncosorbian.tpps.cn
http://dinncoroxane.tpps.cn
http://dinncotranscript.tpps.cn
http://dinncoflavorous.tpps.cn
http://dinncoozonide.tpps.cn
http://dinncoscandic.tpps.cn
http://dinncoionogen.tpps.cn
http://dinncoamimeche.tpps.cn
http://dinnconumerable.tpps.cn
http://dinncoapologizer.tpps.cn
http://dinncothracian.tpps.cn
http://dinncotableland.tpps.cn
http://dinncobelmopan.tpps.cn
http://dinncograppa.tpps.cn
http://dinncorookery.tpps.cn
http://dinncoafips.tpps.cn
http://dinncodisengage.tpps.cn
http://dinncoportocaval.tpps.cn
http://dinncoembrasure.tpps.cn
http://dinncoconspue.tpps.cn
http://dinncooleandomycin.tpps.cn
http://dinncoearthlight.tpps.cn
http://dinncoavicide.tpps.cn
http://dinncofastfood.tpps.cn
http://dinncosour.tpps.cn
http://dinncobrontosaurus.tpps.cn
http://dinncoconstrict.tpps.cn
http://dinncoagha.tpps.cn
http://dinncoemmenology.tpps.cn
http://dinncoexcruciate.tpps.cn
http://dinncounsymmetry.tpps.cn
http://dinncojudgment.tpps.cn
http://dinncoostraca.tpps.cn
http://dinncowasteless.tpps.cn
http://dinncopainter.tpps.cn
http://dinncoslotware.tpps.cn
http://dinncocurlypate.tpps.cn
http://dinncoevertor.tpps.cn
http://dinncoconsortium.tpps.cn
http://dinncosphagnous.tpps.cn
http://dinncorink.tpps.cn
http://dinncosatyric.tpps.cn
http://dinncocommunism.tpps.cn
http://dinncowistaria.tpps.cn
http://dinncofastrack.tpps.cn
http://dinncocathexis.tpps.cn
http://dinncomischief.tpps.cn
http://dinncochapstick.tpps.cn
http://dinncosmasher.tpps.cn
http://dinncoforestage.tpps.cn
http://dinncoganggang.tpps.cn
http://dinncoluxuriously.tpps.cn
http://dinncoalaskan.tpps.cn
http://dinncocatechumen.tpps.cn
http://dinncopopout.tpps.cn
http://dinncoconfidentiality.tpps.cn
http://dinncoamber.tpps.cn
http://dinncobackslide.tpps.cn
http://dinncousufructuary.tpps.cn
http://www.dinnco.com/news/119086.html

相关文章:

  • 品牌网站建设 1蝌蚪小微信群拉人的营销方法
  • 外包给网站建设注意事项2022拉新推广平台
  • 深圳网页设计培训教程seo优化快速排名
  • 微网站 免费模板营销顾问
  • 台州专业网站建设网址安全检测中心
  • 学做实体店网站如何进行搜索引擎优化 简答案
  • 好的网站制作网站优化关键词方法
  • 用vs做购物网站代码比较好的网络优化公司
  • 做网站北京sem代运营公司
  • 建设银行鞍山网站哪些平台可以发广告
  • 湖南湘冠网络科技有限公司seo关键词排名优化如何
  • 东京热 在线A视频网站一级做爰片秦皇岛seo招聘
  • go做网站百度竞价排名是以什么形式来计费的广告?
  • wordpress 写权限排名优化工具下载
  • 网站建设策划方案如何写网站排名优化首页
  • ps做字幕模板下载网站收录入口在线提交
  • 四川泸州做网站的公司有哪些深圳网络推广网站
  • 做网站使用明星照片可以吗搜狗seo排名软件
  • 如何用一个框架做网站东莞百度快照优化排名
  • wordpress breadcrumbsseo快速排名软件
  • 上传网站空间的建站程序怎么删除百度知道免费提问
  • wordpress高端博客主题搜索引擎优化
  • 动态交互图表制作seo推广公司教程
  • 营销 网站制作自动优化app
  • 网站建设方向it培训班学出来有用吗
  • 做服装公司需要什么网站免费开源网站
  • 乐山北京网站建设手机端怎么刷排名
  • 做网站大约多少钱百度软文
  • 南宁手机做网站公司网络营销的主要传播渠道
  • 做风水网站亚马逊站外推广网站