小编Per*_*ulf的帖子

列出支持的终端类型?

是否有一种可移植的方式来列出所有N X 系统上支持的终端类型?

如果没有,在 Solaris 上获取此列表的最佳方法是什么?

linux solaris unix terminal terminfo

15
推荐指数
2
解决办法
2万
查看次数

数据包捕获:过滤 RX 与 TX

我有一个网络问题,其中源 MAC 与我的主机的源 MAC 之一匹配的帧到达主机 - 明显的重复 MAC、循环或其他 L2 问题。

我相信这是这种情况,因为我的 linux 网桥的 MAC 表(CAM 表)将本地 MAC(用于托管虚拟机)注册为在上游端口上,并且内核日志显示错误:

bridgename: received packet on bond0.2222 with own address as source address
Run Code Online (Sandbox Code Playgroud)

我想获得有关这些“流氓”数据包/帧的更多详细信息,但我不知道如何将它们归零。使用 tcpdump 您可以过滤特定的源 MAC( 'ether src MAC' ),但这是基于帧中的字节 - 而不是帧是“发送”还是“接收”。我们通常假设带有源 MAC 的帧意味着我们将其发送出去,但如果接收到重复的帧,则过滤器的内容看起来完全相同。

如何观察在数据包捕获中是接收帧还是发送帧?

linux tcpdump pcap interface

8
推荐指数
2
解决办法
1万
查看次数

Nginx 站点配置模板和变量

嗨,我想设置一个简单的 nginx 配置,我读到您可以使用设置变量,set $variable content;但到目前为止我还没有运气...

以下是我到目前为止提出的/我正在努力实现的目标:

server {

##################################################
# Set variables
set $port               80;                        # e.g. 80 or 443;
set $domain         domain.com *.domain.com;   # e.g. www.domain.com or just domain.com
set $subdomain          false;                     # e.g. subdomain in subdomain.domain.com or false
set type               live;                      # live, dev or stage

##################################################
# Include /web/sites configuration template
include /etc/nginx/site-config-template;

}
Run Code Online (Sandbox Code Playgroud)

以下是 /etc/nginx/site-config-template 的内容:

##################################################
# If $subdomain is not false at slash
if ( $subdomain ) {
    set $subdomain "{$subdomain}/";
} …
Run Code Online (Sandbox Code Playgroud)

configuration nginx

7
推荐指数
2
解决办法
3万
查看次数

如何让 mod_security 记录所有 POST 数据?

我目前有一个 CentOS 系统,它成功地将相关的 mod_security 操作记录到审计日志文件中。以下是我的配置:

<IfModule mod_security2.c>
  SecRuleEngine On
  SecAuditEngine RelevantOnly
  SecAuditLog /var/log/httpd/modsec_audit.log
  SecDebugLog /var/log/httpd/modsec_debug.log
  SecDebugLogLevel 0
  SecRequestBodyAccess On
  SecDataDir /tmp
  SecTmpDir /tmp
  SecPcreMatchLimit 250000
  SecPcreMatchLimitRecursion 250000
</IfModule>
Run Code Online (Sandbox Code Playgroud)

这会记录 mod_security 由于SecAuditEngine RelevantOnly设置而拦截/阻止请求的所有操作。

但是,我希望它另外记录提交到服务器的所有 POST 数据(无论状态如何)。我可以通过设置来实现这一点,SecAuditEngine On但这会记录所有的 GET 和 POST 数据,这太过分了。除非请求被拦截,否则我基本上想省略所有 GET 数据。

谁能建议如何做到这一点?

mod-security apache-2.2

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

默认情况下审计日志是什么(即没有定义规则时?)

我在我的 Debian Jessie 机器上安装了auditdaudispd-plugins并且没有涉及任何配置。我看到事件被写入/var/log/audit/audit.log,例如:

type=LOGIN msg=audit(1462384141.770:838): pid=3662 uid=0 old-auid=4294967295 auid=0 old-ses=4294967295 ses=21 res=1
type=USER_START msg=audit(1462384141.770:839): pid=3662 uid=0 auid=0 ses=21 msg='op=PAM:session_open acct="root" exe="/usr/sbin/cron" hostname=? addr=? terminal=cron res=success'
type=CRED_DISP msg=audit(1462384141.778:840): pid=3662 uid=0 auid=0 ses=21 msg='op=PAM:setcred acct="root" exe="/usr/sbin/cron" hostname=? addr=? terminal=cron res=success'
type=USER_END msg=audit(1462384141.778:841): pid=3662 uid=0 auid=0 ses=21 msg='op=PAM:session_close acct="root" exe="/usr/sbin/cron" hostname=? addr=? terminal=cron res=success'
type=USER_ACCT msg=audit(1462384201.780:842): pid=3761 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting acct="root" exe="/usr/sbin/cron" hostname=? addr=? terminal=cron res=success'
type=CRED_ACQ msg=audit(1462384201.780:843): pid=3761 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred acct="root" exe="/usr/sbin/cron" …
Run Code Online (Sandbox Code Playgroud)

security debian auditd debian-jessie

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

为远程桌面启用 SSL

好的,所以我正在尝试从我们的 Nessus 扫描中删除我的一些系统,以免出现这种中等漏洞。

Microsoft Windows 远程桌面协议服务器中间人弱点

我设置了以下 GPO 设置:

计算机配置\策略\管理模板\Windows 组件\远程桌面服务\远程桌面会话主机\需要使用特定安全层进行远程 (RDP) 连接:SSL (TLS 1.0)

一旦我这样做了,我的 Windows 7 客户端不再有 Nessus 问题,但是 RDP 不再适用于 Linux 或 Windows 客户端。我收到以下错误:

来自客户:

Linux:

[ryan@gobo ~]$ rdesktop -0 win7
Autoselected keyboard map en-us
ERROR: recv: Connection reset by peer
Run Code Online (Sandbox Code Playgroud)

视窗:

"the connection cannot proceed becuase authentication is not enabled
Run Code Online (Sandbox Code Playgroud)

一个服务器系统(运行 RDP 的 Windows 7 机器):

Log Name:      System
Source:        TermDD
Date:          4/9/2012 4:28:58 PM
Event ID:      50
Task Category: None
Level:         Error
Keywords:      Classic
User: …
Run Code Online (Sandbox Code Playgroud)

ssl rdp windows-7 remote-desktop group-policy

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

SQL 数据库备份文件的典型压缩率是多少?

我的一位客户希望我们对压缩的 SQL 备份文件占用多少磁盘空间进行安全估计。他们需要相应地调整服务器硬盘的大小。

我们可以粗略地估计 SQL 数据库备份大小(基于估计的记录数等),但是压缩时呢?

我知道这很难回答,但根据您的经验,SQL 备份文件的典型压缩比是多少?

postgresql backup sql

5
推荐指数
2
解决办法
2万
查看次数

连接到域中的其他 Hyper-V 管理器实例

我有一个从我的计算机托管的测试环境。我已经配置了一个外部开关,以便其他人可以访问它。Windows 8 企业版和 Hyper-V 管理器版本:6.2.9200.16384

如果我们看一下 Hyper-V 管理器的内部,我们可以看到我们有:“Hyper-V 管理器”,在它下面我们有到本地机器的连接。我们还可以通过连接服务器来添加新连接。

我尝试连接到域中的另一台本地计算机,但收到以下错误消息:

"尝试连接到服务器“名称”时出错。请检查虚拟机管理服务是否正在运行以及您是否有权连接到服务器。 "

服务正在运行,我需要什么样的授权?(我可以看到网络中的另一台机器)。

我很感谢所有的帮助!

virtualization hyper-v windows-authentication windows-8

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

iptables 的 PF 与 -m

如您所知,iptables 具有-m (match)例如:

-m string 
-m state 
-m -iplimit 
and so on...
Run Code Online (Sandbox Code Playgroud)

我的问题:是否PF也有类似的功能,如-miptables

iptables pf

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

CentOS7 Kerberos Auth:Kerberos 配置文件格式不正确;

我正在Squid 4.0针对 Active Directory 域(Server 2012 R2)为基于组的 AD 身份验证设置显式代理,并在最小的 CentOS 7 (64b) 安装上使用 SSL 碰撞。

域加入的使用非常粗略,authconfig-tui但我设法对其进行了基本配置,以便 AD 用户可以通过 进行身份验证SSH,Squid 代理在身份验证关闭的情况下工作。但kinit失败了:

[root@tc-icap squid]# kinit
kinit: Improper format of Kerberos configuration file while initializing Kerberos 5 library
Run Code Online (Sandbox Code Playgroud)

在升级 Squid 的调试日志并尝试使用加入域的客户端进行身份验证后,我在 Squid 中看到了这一点cache.log

2016/03/02 11:12:56.151| Starting new negotiateauthenticator helpers...
2016/03/02 11:12:56.151| helperOpenServers: Starting 1/10 'negotiate_kerberos_auth' processes
2016/03/02 11:12:56| negotiate_kerberos_auth: ERROR: krb5_init_context: Improper format of Kerberos configuration file
2016/03/02 11:12:56| negotiate_kerberos_auth: ERROR: krb5_init_context: Improper …
Run Code Online (Sandbox Code Playgroud)

security centos kerberos squid samba

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

生成 postfix 的运行配置

当我运行时dovecot -n,dovecot 生成所有运行配置。现在,我需要同样的postfix.

postfix dovecot

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

SSH 公钥身份验证仅在活动会话之前存在时才有效

我的 SSH 配置有一个相当奇怪的问题。我在远程访问卡的帮助下设置了我的服务器,并使用 KVM 查看器配置了所有内容。

因此,在通过 KVM 查看器登录服务器时,我仅使用公钥配置了 SSH,并尝试从本地笔记本电脑登录。它工作得很好。

如果我退出 KVM 会话(或在 KVM 会话中与用户一起注销),我将无法再通过 ssh 登录(公钥被拒绝)。SSH 登录仅在用户在某处仍处于登录状态时才有效。

任何提示可能是什么问题?


登录失败的控制台输出(所有个人数据交换):

OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 debug1: Reading configuration data /Users/mylocaluser/.ssh/config debug1: Reading configuration data /etc/ssh_config debug1: /etc/ssh_config line 20: Applying options for * debug1: /etc/ssh_config line 103: Applying options for * debug1: Connecting to 100.100.100.100 [100.100.100.100] port 12345. debug1: Connection established. debug1: identity file /Users/mylocaluser/.ssh/id_rsa type 1 debug1: identity file /Users/mylocaluser/.ssh/id_rsa-cert type -1 debug1: identity file /Users/mylocaluser/.ssh/id_dsa type -1 debug1: …

remote-access linux ssh ssh-keys kvm-virtualization

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

如果域以 www 开头,则 DNS 查找不显示

我对 DNS 查找有点困惑。如果我在查找时将“www”添加到域中,我看不到任何记录。但是如果我从域中删除“www”然后查询,我会看到 DNS 记录。

DNS 传播检查器(显示记录)
DNS 传播检查器(无记录)

为什么会发生这种情况?

networking domain-name-system

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