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-86628

qroberts's questions

Martin Hope
qroberts
Asked: 2022-01-07 06:09:40 +0800 CST

2 个远程站点,2 个不同的子网,具有互连性。如何为两个位置的服务器创建一个子网?

  • 1

当前环境:

我们目前有 2 个远程站点,它们都有自己的 LAN 子网和托管在每个站点上的服务器。目前,每个站点都为客户端和服务器使用 1 个子网。两个站点通过 ISP 提供的 LAN 扩展直接相互连接。两个站点之间存在连接,服务器/客户端都可以相互通信。

问题:

当我们将虚拟服务器从一个站点迁移到另一个站点时,我们必须更改移动的每台服务器的 IP 地址以反映目标子网。我知道 DHCP 可以处理这个问题,但我想保持 IP 地址相同,无论服务器位于哪个站点。这也增加了迁移过程的步骤

是否可以在两个站点上创建一个具有相同子网信息的 VLAN 并将服务器放在该 VLAN 中?我知道如何为单个站点执行此操作,但是如果将 Server1 @ Site 1 (192.168.50.20) 移动到站点 2 会怎样?路由器如何知道将 Server1 的流量路由到哪里?静态路由只是将流量定向到网关,如果有 2 个具有相同网络配置的子网,如果该网关网络中不存在尝试路由流量的 IP,路由器如何知道将流量路由到哪里?

我们在每个站点使用 FortiGate 51E,在每个站点使用 FortiSwitch 248D。两种环境都有 ESXi 6.7 服务器。

下面是我想要的环境图片。

在此处输入图像描述

routing networking vlan static-routes fortigate
  • 1 个回答
  • 113 Views
Martin Hope
qroberts
Asked: 2021-12-10 07:55:46 +0800 CST

Nagios - “错误:无法打开配置目录”但权限正确且 selinux 允许

  • 0

尝试设置一个单独的目录来存储我的 nagios 配置文件,当我尝试验证配置时,我收到以下错误。

错误:无法打开配置目录“/usr/local/nagios/etc/objects/corp/contacts.cfg”进行读取。

我相信权限是正确的,并且我在许可模式下拥有 selinux。

[root@NAGSRV objects]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.4.6
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2020-04-28
License: GPL

Website: https://www.nagios.org
Reading configuration data...
   Read main config file okay...
Error: Could not open config directory '/usr/local/nagios/etc/objects/corp/contacts.cfg' for reading.
Error: Invalid max_check_attempts value for host 'localhost'
Error: Could not register host (config file '/usr/local/nagios/etc/objects/localhost.cfg', starting on line 21)
   Error processing object config files!


***> One or more problems was encountered while processing the config files...

     Check your configuration file(s) to ensure that they contain valid
     directives and data definitions.  If you are upgrading from a previous
     version of Nagios, you should be aware that some variables/definitions
     may have been removed or modified in this version.  Make sure to read
     the HTML documentation regarding the config files, as well as the
     'Whats New' section to find out what has changed.

权限:

[root@NAGSRV objects]# ls -ld *
-rwxr-xr-x. 1 nagios nagcmd  6747 Dec  7 21:06 commands.cfg
-rwxr-xr-x. 1 nagios nagcmd  1794 Dec  7 21:35 contacts.cfg
-rwxr-xr-x. 1 nagios nagcmd  4777 Dec  7 21:06 localhost.cfg
-rwxr-xr-x. 1 nagios nagcmd  3001 Dec  7 21:06 printer.cfg
drwxr-xr-x. 2 nagios nagcmd    99 Dec  9 10:43 corp
-rwxr-xr-x. 1 nagios nagcmd  3484 Dec  7 21:06 switch.cfg
-rwxr-xr-x. 1 nagios nagcmd 12533 Dec  7 21:06 templates.cfg
-rwxr-xr-x. 1 nagios nagcmd  3512 Dec  7 21:06 timeperiods.cfg
-rwxr-xr-x. 1 nagios nagcmd  7630 Dec  9 10:17 windows.cfg

[root@NAGSRV objects]# ls -ld ./corp/*
-rwxr-xr-x. 1 nagios nagcmd  1245 Dec  9 10:43 ./corp/contacts.cfg
-rwxr-xr-x. 1 nagios nagcmd  1124 Dec  9 10:39 ./corp/hostgroups.cfg
-rwxr-xr-x. 1 nagios nagcmd  3809 Dec  9 10:45 ./corp/hosts.cfg
-rwxr-xr-x. 1 nagios nagcmd 10967 Dec  9 10:41 ./corp/hosts-service-template.cfg

团体:

[root@NAGSRV objects]# cat /etc/group | grep nag
nagios:x:1000:
nagcmd:x:1001:apache,nagios

Selinux:

[root@NAGSRV objects]# getenforce
Permissive

nagios.cfg:

# NAGIOS USER
# This determines the effective user that Nagios should run as.
# You can either supply a username or a UID.

nagios_user=nagios



# NAGIOS GROUP
# This determines the effective group that Nagios should run as.
# You can either supply a group name or a GID.

nagios_group=nagcmd

如果我编辑nagios.cfg并从 cfg_dir= 中删除我的目录,我可以验证。

centos nagios
  • 1 个回答
  • 549 Views
Martin Hope
qroberts
Asked: 2012-06-09 09:33:48 +0800 CST

授予 VM 访问主机上物理 NIC 的权限

  • 0

我正在运行带有 2 个虚拟机的 VMware Server 2.0.2。我想与我已成功完成的主机的域/主 NIC 桥接的 VM 之一。我希望其他 VM 只能访问主机上的其他 NIC,该 NIC 直接连接到硬件防火墙/网关,并带有专用于该端口的 DMZ。这样做的目的是让 VM 与域网络隔离,因为它将成为 Web 服务器。我在配置 VM 时遇到问题,因此它只能访问 DMZ 的 NIC。我从我们的提供商那里获得了一个专用 IP 地址,我可以使用它来静态分配主机上的 VM 或 NIC,我希望将 DMZ 分配给该 VM。

还有哪些其他信息对我有帮助?

有没有更实用/更安全的方法来做到这一点?

这是一个图表:网络图

vmware-server networking dmz
  • 1 个回答
  • 2542 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