AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-545118

beard black's questions

Martin Hope
beard black
Asked: 2020-08-21 22:51:07 +0800 CST

iptables NAT 是 Policy Accept 一个安全漏洞吗?

  • 2

我正在强化我的 vps 服务器,最近我看到所有策略在 Nat Table都是开放的(接受)。我在互联网上搜索并没有发现任何关于保护 nat 表的信息。这是否是一个安全漏洞?这里的输出:

Chain PREROUTING (policy ACCEPT 21038 packets, 1097K bytes)
 pkts bytes target     prot opt in     out     source               destination                                                 

Chain INPUT (policy ACCEPT 9 packets, 1088 bytes)
 pkts bytes target     prot opt in     out     source               destination                                                 

Chain OUTPUT (policy ACCEPT 187 packets, 14396 bytes)
 pkts bytes target     prot opt in     out     source               destination                                                 

Chain POSTROUTING (policy ACCEPT 48 packets, 3767 bytes)
 pkts bytes target     prot opt in     out     source               destination                                                 
  523  140K MASQUERADE  all  --  *      eth0    0.0.0.0/0            0.0.0.0/0   

感谢我的每一次帮助

亲切的问候黑胡子

firewall linux security nat iptables
  • 1 个回答
  • 886 Views
Martin Hope
beard black
Asked: 2020-03-27 06:14:43 +0800 CST

smartctl 硬盘检查不显示属性

  • 1

今天我在我的 linux 服务器上安装了应用程序 smartmontools,在测试了我的 hardrive (raid1) 之后,他没有显示属性。命令后

smartctl -a /dev/nvme0n1 

,我得到的结果没有关于硬盘的属性:

=== START OF INFORMATION SECTION ===
Model Number:                       SAMSUNG MZQLB960HAJR-00007
Serial Number:                      S437NE0M802932
Firmware Version:                   EDA5202Q
PCI Vendor/Subsystem ID:            0x144d
IEEE OUI Identifier:                0x002538
Total NVM Capacity:                 960,197,124,096 [960 GB]
Unallocated NVM Capacity:           0
Controller ID:                      4
Number of Namespaces:               1
Namespace 1 Size/Capacity:          960,197,124,096 [960 GB]
Namespace 1 Utilization:            194,981,310,464 [194 GB]
Namespace 1 Formatted LBA Size:     512
Local Time is:                      Thu Mar 26 15:08:55 2020 CET
Firmware Updates (0x17):            3 Slots, Slot 1 R/O, no Reset required
Optional Admin Commands (0x000f):   Security Format Frmw_DL NS_Mngmt
Optional NVM Commands (0x001f):     Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat
Maximum Data Transfer Size:         512 Pages
Warning  Comp. Temp. Threshold:     87 Celsius
Critical Comp. Temp. Threshold:     88 Celsius
Namespace 1 Features (0x02):        NA_Fields

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +    10.60W       -        -    0  0  0  0        0       0

Supported LBA Sizes (NSID 0x1)
Id Fmt  Data  Metadt  Rel_Perf
 0 +     512       0         0
 1 -    4096       0         0

=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

SMART/Health Information (NVMe Log 0x02, NSID 0x1)
Critical Warning:                   0x00
Temperature:                        43 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%
Percentage Used:                    0%
Data Units Read:                    11,731,065 [6.00 TB]
Data Units Written:                 5,120,885 [2.62 TB]
Host Read Commands:                 2,507,634,522
Host Write Commands:                57,970,936
Controller Busy Time:               434
Power Cycles:                       47
Power On Hours:                     3,520
Unsafe Shutdowns:                   3
Media and Data Integrity Errors:    0
Error Information Log Entries:      1
Warning  Comp. Temperature Time:    0
Critical Comp. Temperature Time:    0
Temperature Sensor 1:               43 Celsius
Temperature Sensor 2:               47 Celsius
Temperature Sensor 3:               55 Celsius

Error Information (NVMe Log 0x01, max 64 entries)
No Errors Logged

我该怎么办,还是制造商的原因?

对于任何帮助,我很感激。

亲切的问候

黑胡子

hardware hard-drive linux ubuntu monitoring
  • 1 个回答
  • 273 Views
Martin Hope
beard black
Asked: 2020-03-08 04:45:42 +0800 CST

cronjob 每 4 周一次,不执行

  • 0

我在我的 Ubuntu 无头服务器 18.04 上使用 cron,但以下 cron 未执行:

30 13 * * 6 test $((10#$(date +%W)%4)) -eq 1 && /bin/bash /backup/test.sh

我在shell中测试了命令:

test $((10#$(date +%W)%4)) -eq 1 && /bin/bash /backup/test.sh

它工作正常,但如果它在 cron 中,它不会执行它。

linux ubuntu bash cron shell
  • 2 个回答
  • 1547 Views
Martin Hope
beard black
Asked: 2020-02-21 03:24:40 +0800 CST

echo 命令,需要替换

  • 0

我编写了一个备份日志脚本并在 echo 中有 2 个变量,但仍然无法正常工作。

我的命令:

echo " DB-Size $(du -hs /backup/db/db_$(date +%F).sql " >> /backup/backup.log

在我的 echo 语句中,我有命令变量,在命令变量中有另一个变量。我需要改变什么。对于每一个帮助,我很感激。

亲切的问候

黑胡子

linux scripting ubuntu bash shell
  • 2 个回答
  • 50 Views
Martin Hope
beard black
Asked: 2020-02-18 00:35:13 +0800 CST

按照 tomcat, security 的手册以非 root 用户身份启动 tomcat

  • 0

我阅读了tomcat apache的手册,他们告诉以非root身份运行tomcat,但我应该给root所有权,并且组tomcat应该只有读取权限。只给我组tomcat读取权限,我怎样才能以非root身份启动服务?这不是矛盾吗?

资源:

Tomcat should not be run under the root user. Create a dedicated user for the 
Tomcat process and provide that user with the minimum necessary permissions 
for the operating system. For example, it should not be possible to log on 
remotely using the Tomcat user.
aking the Tomcat instances at the ASF as an example (where auto-deployment is 
disabled and web applications are deployed as exploded directories), the 
standard configuration is to have all Tomcat files owned by root with group 
Tomcat and whilst owner has read/write privileges, group only has read and 
world has no permissions. The exceptions are the logs, temp and work 
directory that are owned by the Tomcat user rather than root.

我目前以 tomcat 的身份运行该服务,权限为 750 和文件夹 /tomcat 的所有权 tomcat:tomcat 。

tomcat linux ubuntu security
  • 1 个回答
  • 2884 Views
Martin Hope
beard black
Asked: 2020-02-01 15:58:50 +0800 CST

删除文件夹 /usr/lib/systemd/system 现在的后果

  • 0

上次我删除 /usr/lib/systemd/system 中的文件夹系统。我不知道如何,但是 ubuntu 服务器 18.04 的文件夹系统有多重要?我应该期待什么后果?

亲切的问候,

黑胡子

linux ubuntu systemd ubuntu-18.04 iusr
  • 3 个回答
  • 974 Views
Martin Hope
beard black
Asked: 2020-01-30 01:27:38 +0800 CST

为了什么需要我为mysql之类的服务最大打开文件

  • 0

为什么我需要max_open_files来提供像 mysql 这样的服务?我正在使用一个 tomcat istance,只有 tomcat 服务可以访问我的 mysql 数据库。对于我的 tomcat istance 20 用户可以访问它们。是不是说mysql的max_open_files的limit 1就够了,因为只有tomcat访问mysql?

如果一些专家能给我一两个例子,我会很高兴。

亲切的问候

linux ubuntu mysql service ulimit
  • 1 个回答
  • 56 Views
Martin Hope
beard black
Asked: 2020-01-25 10:29:01 +0800 CST

反向代理 - 了解代理通行证 - apache mod_proxy

  • 0

我在我的 linux 服务器上运行 tomcat,我想为此使用反向代理。在阅读了 apacha 中 mod_proxy 的手册后,我并没有真正理解 proxypass 中的 /path 。

我举一个小例子。我的 tomcat 的目录是 /tomcat/webapp。那么下面的配置正确吗?:

<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
ProxyRequests Off
ProxyPass /tomcat/webapp         http://127.0.0.1:8080
ProxyPassReverse /tomcat/webapp  http://127.0.0.1:8080
</VirtualHost> 

我会很感激,我有经验的人可以帮助我。

tomcat ubuntu apache-2.2 reverse-proxy proxypass
  • 1 个回答
  • 825 Views
Martin Hope
beard black
Asked: 2020-01-25 08:21:19 +0800 CST

本地 webapplication 的反向代理,iptables 必须打开哪个端口?

  • 1

我想为我的 tomcat 应用程序使用反向代理(nginx 或 apache)。我想将端口 80,443 从反向代理重定向到 tomcat 端口 8080、8443。设置反向代理后,必须为入站和出站打开哪个端口?

那正确吗 ?iptables inbound : 打开端口 80, 443 iptables outbound: 打开端口 8080,8443

亲切的问候

黑胡子

linux networking port iptables reverse-proxy
  • 1 个回答
  • 995 Views
Martin Hope
beard black
Asked: 2020-01-24 04:05:34 +0800 CST

在同一台服务器上运行tomcat,apache作为反向代理,mysql是否稳定?

  • 0

我从主机运行专用的 ubuntu 服务器,有足够的内核 (12) 和大量的内存 64 GB (ECC)。我实际上在生产环境中运行 tomcat 和 mysql 服务,但我仍然想要我的 tomcat 的反向代理。在同一台服务器上使用所有 3 个服务是否推荐或稳定?我以后会因为我的意图而遇到麻烦或问题吗?

我很感激任何帮助

黑胡子

tomcat linux ubuntu mysql apache-2.2
  • 1 个回答
  • 76 Views
Martin Hope
beard black
Asked: 2020-01-23 05:52:11 +0800 CST

端口重定向 443 到 8443 不适用于我的 tomcat 实例

  • 0

我在专用主机服务器上使用 ubuntu 无头服务器 18.04。主机有外部防火墙,我在其中打开了端口 8443,443 (tcp)。在我使用 iptables 的 ubuntu 服务器上,我使用表 nat 将端口 443 重定向到 8443。

iptables -A PREROUTING -t nat -p tcp --dport 443 -j REDIRECT --to-ports 8443

我还打开了入站和出站端口 443 和 8443。

我仍然可以使用 example.com:8443 访问 tomcat 实例并且没有问题,但 example.com 没有响应。查看 iptables 我没有看到任何丢弃数据包。在我的 tomcat 上,我没有更改 server.xml。连接器听 8443。我不知道,问题出在哪里?我希望一些专家可以帮助我解决这个问题。

亲切的问候

黑胡子

linux
  • 2 个回答
  • 4335 Views
Martin Hope
beard black
Asked: 2020-01-08 11:37:31 +0800 CST

iptables-丢包理解

  • 0

今天我阅读了下面的 iptables-dropped 数据包日志,但我并不真正理解这个日志。我希望有人能帮助我。

我只打开了一个入站 SSH 端口 2221,对于我的传出流量,我打开了 DNS 端口 53 作为协议 UDP。

 iptables-dropped: IN= OUT=eno1 SRC=myserver.ip DST=179.124.36.195 LEN=88 TOS=0x00 PREC=0xC0 TTL=64 ID=42743 PROTO=ICMP TYPE=3 CODE=3 [SRC=179.124.36.195 DST=myserver.ip LEN=60 TOS=0x00 PREC=0x00 TTL=53 ID=58511 DF PROTO=TCP SPT=57351 DPT=2221 WINDOW=29200 RES=0x00 SYN URGP=0 ]

看完日志,我问自己,“他(攻击者)怎么会尝试一个ICMP请求,这是否意味着我的服务器被入侵了?

然后我阅读了括号,我们看到有人尝试登录 SSH 端口。

一滴但2个不同的日志消息?

ssh
  • 1 个回答
  • 204 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve