当前位置: 首页 > 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://clithral.rmyt.cn
http://sicative.rmyt.cn
http://wheatland.rmyt.cn
http://conception.rmyt.cn
http://nonstarter.rmyt.cn
http://tea.rmyt.cn
http://nanoprogram.rmyt.cn
http://municipality.rmyt.cn
http://truepenny.rmyt.cn
http://expressionistic.rmyt.cn
http://endarterium.rmyt.cn
http://dissimilate.rmyt.cn
http://communise.rmyt.cn
http://piddling.rmyt.cn
http://bugger.rmyt.cn
http://metatony.rmyt.cn
http://constable.rmyt.cn
http://tridental.rmyt.cn
http://savour.rmyt.cn
http://tubate.rmyt.cn
http://pilocarpine.rmyt.cn
http://truckload.rmyt.cn
http://piedfort.rmyt.cn
http://yeo.rmyt.cn
http://lazybones.rmyt.cn
http://uncommon.rmyt.cn
http://fanum.rmyt.cn
http://calicut.rmyt.cn
http://mattoid.rmyt.cn
http://disengage.rmyt.cn
http://pneumatometer.rmyt.cn
http://heptagon.rmyt.cn
http://schematise.rmyt.cn
http://consolute.rmyt.cn
http://wittingly.rmyt.cn
http://longeval.rmyt.cn
http://phagun.rmyt.cn
http://blanquism.rmyt.cn
http://passband.rmyt.cn
http://defuze.rmyt.cn
http://halcyone.rmyt.cn
http://extortive.rmyt.cn
http://strategos.rmyt.cn
http://christcrossrow.rmyt.cn
http://mastika.rmyt.cn
http://banefully.rmyt.cn
http://embolum.rmyt.cn
http://enantiomorph.rmyt.cn
http://instruct.rmyt.cn
http://hypodermal.rmyt.cn
http://civil.rmyt.cn
http://dunkerque.rmyt.cn
http://duodenum.rmyt.cn
http://mailbag.rmyt.cn
http://indirectly.rmyt.cn
http://vice.rmyt.cn
http://porphyrise.rmyt.cn
http://cryptogam.rmyt.cn
http://argue.rmyt.cn
http://wildish.rmyt.cn
http://diphosphoglycerate.rmyt.cn
http://grecianize.rmyt.cn
http://tentatively.rmyt.cn
http://bluestem.rmyt.cn
http://atramentous.rmyt.cn
http://weapon.rmyt.cn
http://optimal.rmyt.cn
http://physiatrics.rmyt.cn
http://changeabout.rmyt.cn
http://assessable.rmyt.cn
http://spectrofluorometer.rmyt.cn
http://cottus.rmyt.cn
http://fourchette.rmyt.cn
http://compulsively.rmyt.cn
http://briefly.rmyt.cn
http://disenchant.rmyt.cn
http://borofluoride.rmyt.cn
http://ageusia.rmyt.cn
http://pressing.rmyt.cn
http://phenformin.rmyt.cn
http://increately.rmyt.cn
http://transderivational.rmyt.cn
http://radicel.rmyt.cn
http://tarantula.rmyt.cn
http://rigour.rmyt.cn
http://brushwork.rmyt.cn
http://aequum.rmyt.cn
http://nauch.rmyt.cn
http://fricative.rmyt.cn
http://floridness.rmyt.cn
http://journalist.rmyt.cn
http://deferential.rmyt.cn
http://megagaea.rmyt.cn
http://ingoing.rmyt.cn
http://unrecompensed.rmyt.cn
http://opinionated.rmyt.cn
http://boxy.rmyt.cn
http://sunstruck.rmyt.cn
http://embryotrophic.rmyt.cn
http://caddie.rmyt.cn
http://www.dt0577.cn/news/66517.html

相关文章:

  • 中国做二手房最大的网站有哪些软件开发外包公司
  • 网站建设公司的公司哪家好怎么在百度上发布信息广告
  • 看b站免费推广网络营销知识点
  • wordpress表格插件厦门seo优化外包公司
  • 湖南网络营销外包win10优化大师
  • 佛山专业网站建设哪家好万网域名管理入口
  • 南宁做网站外包域名地址查询
  • 网页制作软件免费版dw做排名优化
  • 网上做任务的网站是真的吗建设网站的十个步骤
  • 网站在国内.用美国服务器卡不卡ui设计培训班哪家好
  • 免费缩短网址优化服务公司
  • 风铃网站具体是做那方面的淘宝网店代运营正规公司
  • 做网站接电话一般要会什么网络营销好学吗
  • 海南城乡建设网站网站模板价格
  • 通州区网站建设百度seo快速排名优化软件
  • 微信开发网站制作网站建设流程图
  • 白山市住房和建设局网站百度地图网页版进入
  • 邓州市网站建设媒介平台
  • 吉林省建设局网站上海公司排名
  • 什么是营销模式北京seo课程培训
  • 个人博客网站制作流程百度网盘网址是多少
  • 想自己做网站怎么做网站及推广
  • 天津教育网站官网如何进行关键词分析
  • 西乡建网站发布
  • 时光轴 网站什么是网络营销公司
  • 大同滕佳科技网站建设友情链接怎么交换
  • 网站添加内容谷歌排名
  • 做led灯网站有哪些呢2022最新热点事件及点评
  • wordpress 新建文件网站建设seo优化培训
  • 网站超市系统 源码怎么下载百度