小编Ser*_*rov的帖子

在旅途中通过 SSH 从酒店连接到服务器真的安全吗?

在旅途中使用 SSH 从酒店连接到服务器真的安全吗?

服务器
- CentOS 7
- 仅通过 RSA 密钥授权 - 密码认证被拒绝
- 非标准端口

工作站
- Ubuntu 14
- 用户密码
- 使用 RSA 密钥的密码(标准方法)

也许将一半的私有 RSA 密钥保留在 USB 记忆棒上是个好主意,并在连接之前自动(通过脚本)将此一半添加到 ~/.ssh/private_key 中?

互联网将通过酒店的 WIFI 或租来的公寓中的电缆进行。

UPD
抱歉一开始不清楚。我在这里的意思是两个方面的安全性:

  1. 通过不受信任的网络仅保证 SSH 连接的安全性。
  2. 具有 SSH 连接所需密钥的计算机的安全性 - 如果被盗,如何保护服务器...

security physical-security

13
推荐指数
3
解决办法
6611
查看次数

nginx - 出于安全原因拒绝除 index.php 之外的所有 *.php 请求

操作系统:CentOS 7
nginx:1.6.2
httpd:apache 2.4.6
cms:Drupal 7

在我的服务器遭到入侵后,我从服务器中删除了所有内容,重新安装了操作系统和软件,并从备份中恢复了数据。现在我以最大安全性方式配置所有服务。

在详细研究访问日志后 - 我决定拒绝任何对 php 文件的请求,除了位于站点文档根目录中的index.php以提高安全性。

Nginx 访问日志内容很多,比如:

azenv2.php
az.php
Run Code Online (Sandbox Code Playgroud)

/*/wp-login.php
/administrator/index.php
/MyAdmin/index.php
Run Code Online (Sandbox Code Playgroud)

第一类 - 后门(其中一个入侵了我的网站,有人从我的服务器发送了大量垃圾邮件)。

第二 - 有人想找到流行的 cms 和实用程序并尝试使用 login@password,例如 admin@123456

我通过拒绝对 php 文件的请求来阻止这两个类别的原因是:

  1. 即使有人会上传 php-shell -也不可能使用它

  2. 所有这些请求都是“不好的”修道院 - 由 nginx 拒绝它们将保护 drupal(httpd+php+mysql) 工作并消耗能量。

我当前对一台虚拟主机的配置:

server {

  listen <server-ip>;
  server_name <site-name>;

  location ~* /sites/default/files/styles/ {
    try_files $uri @imagestyles;
  }

  location @imagestyles {
    proxy_pass http://127.0.0.1:<port>;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    access_log off;
  }

  location …
Run Code Online (Sandbox Code Playgroud)

security php configuration nginx drupal

5
推荐指数
1
解决办法
9707
查看次数

IPtables 全部删除,但 postfix 仍然发送电子邮件

我的 iptables 规则:

# delete all current rules and user chains
iptables -F
iptables -X

# global policy (target by default)
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP

# localhost
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT

# dns -> udp
iptables -A INPUT -i eth0 -p udp --sport 53 -m state --state ESTABLISHED -j ACCEPT
iptables -A OUTPUT -o eth0 -p udp --dport 53 -m state --state …
Run Code Online (Sandbox Code Playgroud)

security postfix iptables

1
推荐指数
1
解决办法
345
查看次数