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

map7's questions

Martin Hope
map7
Asked: 2021-11-04 20:26:19 +0800 CST

Windows Server 2019 为某些用户通过 VPN 访问共享

  • 0

我正在使用 Windows Server 2019 并已将 OpenVPN 2.5.4 客户端设置为服务,以启动 VPN 链接回到我在另一个位置的 pfSense 盒子。问题是只有一些 Windows Server 用户可以访问 VPN 另一端的 Debian 机器上的 Samba 共享。

如果我以用户 A 的身份登录,他们可以在 \192.168.0.4 看到映射的驱动器,但用户 B 不能。但是,用户 B 可以 ping 192.168.0.4 机器。

对于这两个测试,我使用相同的凭据通过 VPN 连接。

VPN 在 Windows Server 启动并连接时启动。

它适用于用户 A 和管理员。尝试在资源管理器中访问 \192.168.0.4 时,我为用户 B 收到的错误消息是;

  Windows cannot access \\192.168.0.4\data
  Check the spelling of the name. Otherwise, there might be a problem with your network. To
  try to identify and resolve network problems, click Diagnose.

我尝试将用户 B 设置为管理员,重新启动并再次登录,但没有奏效。感觉像是权限问题。我第一次尝试以用户 A 的身份访问 Samba 共享时,它提示我输入凭据,但它不会为用户 B 执行此操作。

更新:更多细节

我的共享在使用 Samba 4.9.5 的 Debian 10 机器上,我在 smb.conf 中定义了“数据”共享,如下所示;

[data]
    path = /media/data
    read only = No
    guest ok = Yes

我通过安装在 Windows Server 上的 OpenVPN 客户端(OpenVPN 服务器在 pfSense 机器上运行)从我的 Windows Server 2019 VM 连接,以便我可以连接到我的 Debian 机器。Debian 机器和 pfSense 防火墙位于办公室,而 Windows Server 是位于不同位置的 VPS 提供商的 VM。

在 Windows 服务器上,我可以以“用户 A”的身份登录并通过 Windows 文件管理器连接到 Debian 盒子,然后我可以连接到“数据”共享。如果我以用户 B 身份登录,但我收到错误消息。

我的办公室局域网在 192.168.0.x(包括 pfSense 和 Debian 盒子),现场有一些遗留系统很难更改其静态地址。Window Server 2019 VM 在 10.0.192.x 上运行,VPN(客户端)在 10.0.8.x 上设置,VPN(服务器)在 192.168.0.x 网络上。

用户 A 和 B 都在 Windows Server 上。

用户 A 可以看到 192.168.0.4 上的挂载点和 HTTP 访问。用户 B 看不到挂载点,但可以访问http://192.168.0.4。

更新:用户 B 启动 VPN

当我在 Windows 服务器上停止 OpenVPN 客户端服务并手动启动与用户 B 的 VPN 链接时,它连接到 VPN,但在通过 Windows 资源管理器//192.168.0.4/data 查看共享时仍然出现错误。

但是,使用用户 A 手动启动 VPN,然后通过 Windows 资源管理器连接到 //192.168.0.4/data 对这个用户有效。

在我看来,用户 B 通过 VPN 或其他方式访问远程共享时仍然存在权限问题。

vpn samba windows-server-2019
  • 1 个回答
  • 254 Views
Martin Hope
map7
Asked: 2018-08-20 23:16:10 +0800 CST

在 Debian Jessie 下使用 HP 1920G 交换机设置 802.3ad 绑定

  • 3

我有一个 Debian Jessie 服务器,带有两个 Intel i350 板载 1Gbps NIC,我想使用 802.3ad 协议将它们桥接到我的 HP 1920G 48 端口托管交换机。

这是我正在运行的内核

~ % uname -a
Linux ltsp 4.9.0-0.bpo.3-amd64 #1 SMP Debian 4.9.30-2+deb9u5~bpo8+1 (2017-09-28) x86_64 GNU/Linux

我已经为 802.3ad 设置了交换机的 LACP 端口 3 和 4,但是当我尝试连接我的绑定网络时,它抱怨“端口配置不适合连接”。 HP 1920 LACP 配置

在我的 /etc/modules 我有

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

loop
vhost_net
bonding

我已经安装了 ifenslave

sudo apt install ifenslave-2.6

这是 /etc/network/interfaces 文件

auto lo
iface lo inet loopback

# bond0 is the bonding NIC and can be used like any other normal NIC.
# bond0 is configured using static network information.
auto bond0
iface bond0 inet static
    address 192.168.200.5
    gateway 192.168.200.1
    netmask 255.255.255.0
    dns-nameservers 8.8.8.8
    dns-search lan
    # Use IEEE 802.3ad LACP bonding protocol
    bond-mode 4
    bond-miimon 100
    bond-slaves none

#eth2 is manually configured, and slave to the “bond0” bonded NIC
allow_hotplug eth2
auto eth2
iface eth2 inet manual
      bond-master bond0
      bond-primary eth2

#eth3 ditto, thus creating a 2-link bond.
allow_hotplug eth3
auto eth3
iface eth3 inet manual
      bond-master bond0

这给出了输出

~ % cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

802.3ad info
LACP rate: slow
Min links: 0
Aggregator selection policy (ad_select): stable

Slave Interface: eth2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:25:90:e6:e9:67
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: none
Partner Churn State: churned
Actor Churned Count: 0
Partner Churned Count: 1

Slave Interface: eth3
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:25:90:e6:e9:66
Slave queue ID: 0
Aggregator ID: 2
Actor Churn State: churned
Partner Churn State: churned
Actor Churned Count: 1
Partner Churned Count: 1

这行不通。我无法在 192.168.200.5 上 ping 这台机器。我在这里想念什么?

2018 年 8 月 23 日更新

尝试在模块文件中设置绑定属性。

编辑 /etc/modules

bonding mode=4 miimon=100 lacp_rate=1

2018 年 8 月 28 日更新:来自 HP 交换机的更多信息

在 HP 命令行中显示当前配置给了我这个输出;

<HP 1920G Switch>display current-configuration
#
 version 5.20.99, Release 1106
#
 sysname HP 1920G Switch
#
 undo voice vlan mac-address 0003-6b00-0000
 undo voice vlan mac-address 00e0-7500-0000
 voice vlan mac-address 0004-1300-0000 mask ffff-ff00-0000 description SNOM phone
 voice vlan mac-address 0004-f200-0000 mask ffff-ff00-0000 description PolycomVVX phone
 undo voice vlan security enable
#
 domain default enable system
#
 ipv6
#
 telnet server enable
#
 lldp compliance cdp
#
 password-recovery enable
#
vlan 1
 description Data
#               
vlan 300
 description Voice_Polycom
#
domain system
 access-limit disable
 state active
 idle-cut disable
 self-service-url disable
#
user-group system
 group-attribute allow-guest
#
local-user admin
 password cipher <snip>
 authorization-attribute level 3
 service-type ssh telnet terminal
 service-type web
#
 stp mode rstp
 stp enable
#
interface Bridge-Aggregation1
 link-aggregation mode dynamic
#
interface NULL0
#
interface Vlan-interface1
 ip address dhcp-alloc
#
#
interface GigabitEthernet1/0/1
 description firewall
 port link-type trunk
 port trunk permit vlan 1 300
 port auto-power-down
 poe enable
 stp edged-port enable
#
interface GigabitEthernet1/0/2
 description LTSP
 port auto-power-down
 poe enable
 stp edged-port enable
#
interface GigabitEthernet1/0/3
 description Workstation_Phone_Prn_Scan
 port link-type trunk
 port trunk permit vlan 1
 port auto-power-down
 poe enable
 stp edged-port enable
 lldp compliance admin-status cdp txrx
 port link-aggregation group 1
#
interface GigabitEthernet1/0/4
 description Workstation_Phone_Prn_Scan
 port link-type trunk
 port trunk permit vlan 1
 port auto-power-down
 poe enable
 stp edged-port enable
 lldp compliance admin-status cdp txrx
 port link-aggregation group 1
#
interface GigabitEthernet1/0/5
 description Workstation_Phone_Prn_Scan
 port link-type trunk
 port trunk permit vlan 1
 voice vlan 300 enable
 port auto-power-down
 poe enable
 stp edged-port enable
 lldp compliance admin-status cdp txrx

GigabitEthernet1/0/3 和 GigabitEthernet1/0/4 是我要绑定的端口。您可以看到它们是链接聚合组的一部分。

更新:查看日志文件

要检查日志文件,我必须通过 Web 后端“设备 - > syslog”执行此操作,在我的测试绑定机器上重新启动网络后,我得到了这四行;

Aug 28 10:59:06:287 2018    IFNET   Error   LINK_UPDOWN GigabitEthernet1/0/4 link status is UP.
Aug 28 10:58:56:005 2018    IFNET   Error   LINK_UPDOWN GigabitEthernet1/0/3 link status is UP.
Aug 28 10:58:43:066 2018    IFNET   Error   LINK_UPDOWN GigabitEthernet1/0/3 link status is DOWN.
Aug 28 10:58:33:338 2018    IFNET   Error   LINK_UPDOWN GigabitEthernet1/0/4 link status is DOWN.
networking
  • 1 个回答
  • 3180 Views
Martin Hope
map7
Asked: 2014-02-24 15:40:37 +0800 CST

LVM 上的 ext4_orphan_cleanup 错误

  • 1

我在 RAID 1 上运行带有 Debian 7.2 的服务器,上面有两个带有 LVM 的驱动器,并且我不断在我的系统日志中收到这些消息。我应该担心吗?这是一个错误吗?它会删除什么?

Feb 23 23:00:05 ltsp kernel: [312745.708283] EXT4-fs (dm-2): orphan cleanup on readonly fs
Feb 23 23:00:05 ltsp kernel: [312745.708795] EXT4-fs (dm-2): ext4_orphan_cleanup: deleting unreferenced inode 785414
Feb 23 23:00:05 ltsp kernel: [312745.709705] EXT4-fs (dm-2): ext4_orphan_cleanup: deleting unreferenced inode 261919
Feb 23 23:00:05 ltsp kernel: [312745.714217] EXT4-fs (dm-2): ext4_orphan_cleanup: deleting unreferenced inode 1702834
Feb 23 23:00:05 ltsp kernel: [312745.716226] EXT4-fs (dm-2): ext4_orphan_cleanup: deleting unreferenced inode 414859
Feb 23 23:00:05 ltsp kernel: [312745.716246] EXT4-fs (dm-2): ext4_orphan_cleanup: deleting unreferenced inode 414716
Feb 23 23:00:05 ltsp kernel: [312745.716978] EXT4-fs (dm-2): ext4_orphan_cleanup: deleting unreferenced inode 405397

这发生在我拍摄快照并删除它的时候,这些是删除快照时的正常消息吗?

linux
  • 1 个回答
  • 1399 Views
Martin Hope
map7
Asked: 2013-10-31 15:13:07 +0800 CST

安装了 acpi 的 KVM 来宾不会关闭

  • 1

我已经安装了 KVM,并在我的 Debian 7.1 主机上运行,​​其中有两个 Debian 7.1 来宾和一些 Windows XP 来宾。当我使用命令 'virsh shutdown' 关闭或点击 virt-manager 中的关闭按钮时,Debian 来宾进入 pmsuspended 状态。

我可以正确关闭的唯一方法是通过 ssh 连接到这些客人并输入“shutdown -h now”命令。

在两个 debian 客户机上,我都安装并运行了这些软件包:

ii  acpi                                  1.6-1                              amd64        displays information on ACPI devices
ii  acpi-fakekey                          0.140-5                            amd64        tool to generate fake key events
ii  acpi-support                          0.140-5                            all          scripts for handling many ACPI events
ii  acpi-support-base                     0.140-5                            all          scripts for handling base ACPI events such as the power button
ii  acpid                                 1:2.0.16-1+deb7u1                  amd64        Advanced Configuration and Power Interface event daemon

这是我的 acpid 在我的 debian 客户机上的事件:

:/etc/acpi/events$ cat powerbtn-acpi-support 
event=button[ /]power
action=/etc/acpi/powerbtn-acpi-support.sh

/etc/acpi/powerbtn-acpi-support.sh

#!/bin/sh

# This script initiates a shutdown when the power putton has been
# pressed. Loosely based on the sample that ships with the acpid package.
# If the acpid sample is present as a real config file (as it was in earlier
# versions of acpid), we skip this script. (Purging and reinstalling acpid
# resolves this situation, or simply deleting /etc/acpi/events/powerbtn.)

if [ -f /etc/acpi/events/powerbtn -o -f /etc/acpi/events/powerbtn.dpkg-bak ] ; then 
    logger Acpi-support not handling power button, acpid handler exists at /etc/acpi/events/powerbtn or /etc/acpi/events/powerbtn.dpkg-bak.
    exit 0
fi

[ -e /usr/share/acpi-support/policy-funcs ] || exit 0

. /usr/share/acpi-support/policy-funcs

if CheckPolicy; then
    exit 0
fi

if [ -x /etc/acpi/powerbtn.sh ] ; then
    # Compatibility with old config script from acpid package
    /etc/acpi/powerbtn.sh
elif [ -x /etc/acpi/powerbtn.sh.dpkg-bak ] ; then
        # Compatibility with old config script from acpid package
    # which is still around because it was changed by the admin
        /etc/acpi/powerbtn.sh.dpkg-bak
else
    # Normal handling.
    /sbin/shutdown -h -P now "Power button pressed"
fi

更新

上周安装了一个新的 Debian 来宾 VM,它没有关机问题。确实存在问题的 Debian VM 已从 VirtualBox 移至 KVM,并且是 Debian 7 的较旧安装。

kvm-virtualization
  • 2 个回答
  • 11099 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