小编Gre*_*egL的帖子

tcpdump 会看到被 iptables 丢弃的数据包吗?

我有一个带有这些简单规则的防火墙:

iptables -A INPUT -p tcp -s 127.0.0.1/32 --dport 6000 -j ACCEPT
iptables -A INPUT -p tcp -s 192.168.16.20/32 --dport 6000 -j ACCEPT
iptables -A INPUT -p tcp --dport 6000 -j REJECT
Run Code Online (Sandbox Code Playgroud)

现在,假设我像这样使用TCPDUMP

tcpdump port 6000
Run Code Online (Sandbox Code Playgroud)

我有主机192.168.16.21试图连接到端口6000

将/应该tcpdump输出一些来自192.168.16.21?

firewall iptables tcp tcpdump

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

无法连接到 AWS EC2 实例 - “主机密钥验证失败”

我已经设置了一个带有 Rails 包的 Ubuntu 实例,部署了我的应用程序,它运行良好。

但是,当我尝试做SSH,这不是让我对远程登录并抛出这样的错误:Host key verification failed

问题似乎一直存在。我已将弹性 IP 附加到该实例,但无法看到公共 DNS。

我的实例在新加坡地区运行。

ssh 调试输出:

OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 46.137.253.231 [46.137.253.231] port 22.
debug1: Connection established.
debug1: identity file st.pem type -1
debug1: identity file st.pem-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-4ubuntu6
debug1: match: OpenSSH_5.5p1 Debian-4ubuntu6 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0 …
Run Code Online (Sandbox Code Playgroud)

ssh authentication amazon-ec2

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

VMware CPU 超线程调度亲和性

我已经查看了everyware并阅读了一堆关于此的文档,但还没有找到直接的答案,所以这里是:

vCenter 的“资源”选项卡中有一个设置,可让您配置超线程核心共享。我将此设置为“ANY”。

我的问题是关于调度亲和性。如果我将要分配特定内核的文本字段留空,会发生什么情况?

VMWare 是处理所有逻辑核心的超线程还是禁用超线程?

注意:Scheduling Affinity Group Box 说

超线程状态:活动
可用 CPU:##(逻辑 CPU)

virtual-machines hyperthreading affinity

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

为什么我得到状态代码 2,这是什么意思?

这是我的service nginx status命令结果。(Debian 8 64 位)

Loaded: loaded (/lib/systemd/system/nginx.service; enabled)
Active: active (running) since Fri 2015-09-18 12:20:23 CEST; 2h 29min ago
Process: 31845 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=2)
Process: 29093 ExecReload=/usr/sbin/nginx -g daemon on; master_process on; -s reload (code=exited, status=0/SUCCESS)
Process: 31851 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 31848 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 31852 (nginx)
CGroup: /system.slice/nginx.service
       ??31852 nginx: master process /usr/sbin/nginx -g …
Run Code Online (Sandbox Code Playgroud)

nginx systemd debian-jessie

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

将 VM 快照复制到新的 VM 环境

我们有 2 个独立的 VMWare 环境,一个是主环境,它在许多站点上拥有数百个虚拟机。另一个是安装在一台服务器上的小得多的,仅用于归档旧系统。

我想要做的是拍摄我们一个实时 VM 的当前状态的快照,并使用它复制到另一个 VMWare 环境并在那里创建一台新机器,将其用作该系统的存档。

这可能/容易吗?

vmware-vcenter vmware-vsphere

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

无法 ssh,权限被拒绝

我已经使用 创建了新用户useradd USER,但我无法通过 SSH 连接到服务器并使用它登录。我已经有另一个可以轻松通过 SSH 连接的帐户。

ssh -v USER@domain.tld输入密码后运行返回此消息:

debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
Run Code Online (Sandbox Code Playgroud)

当尝试有效的帐户时,我得到

debug1: Authentication succeeded (password).
Run Code Online (Sandbox Code Playgroud)

我知道密码是正确的,因为一旦我使用工作帐户 SSH 就可以成功更改用户。

ssh centos

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

导出 AD 中多个 OU 中所有计算机的简单列表

我有一个程序,可以根据文本文档选择要连接的计算机。该列表只需要包含计算机名称,每行 1。没有其他的。

我需要一个我可以运行的命令或脚本来产生这个。我想每周自动运行一次此脚本以使用新计算机更新列表。服务器正在运行 Windows Server 2008 R2。我已经安装了 Quest AD 模块,但我没有找到太多使用它的帮助。

任何帮助,将不胜感激!谢谢 :)

windows powershell active-directory

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

我需要使用多个 ssl 端口配置 haproxy

我有两台具有相同 URL 的服务器,但端口号可能会更改。

我想重定向这两个 URL HTTPS。

如果我输入我的第一个 URL ( http://example.com) 那么我希望它会重定向到https://example.com.

如果我输入第二个 URL ( http://example.com:8080) 然后我希望它重定向到https://example.com:8080.

查看我的配置:

frontend www-HTTP
  bind *:80
  bind *:443 ssl crt /etc/apache2/ssl/apache.pem
  reqadd X-Forwarded-Proto:\ https
  default_backend tcp-backend
  mode tcp

frontend TCP-HTTP
  bind *:8080
  bind *:8443 ssl crt /etc/apache2/ssl/paritech.pem
  reqadd X-Forwarded-Proto:\ https
  default_backend www-backend
  mode tcp

backend www-backend
  redirect scheme https if !{ ssl_fc }
  server dev.example.com 192.168.1.120:8080 check

backend TCP-backend
  redirect scheme https if !{ ssl_fc }
  server qa.example.com 192.168.1.120:80 …
Run Code Online (Sandbox Code Playgroud)

rewrite url haproxy

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

Google-compute-engine 无法正常启动,无法 SSH

我在 Google Compute Engine 上的实例无法正常启动,无论如何我都无法通过 SSH 连接它。我在实例上有很多东西。我怎样才能恢复它?

日志如下。当我尝试它是否在来自 Windows 的网络上时,我获得了 nat IP,但我无法通过 SSH 正常工作。我也不能从浏览器 SSH。

[    0.519999] md: autorun ...
[    0.520794] md: ... autorun DONE.
[    0.521761] VFS: Cannot open root device "sda1" or unknown-block(0,0): error -6
[    0.523744] Please append a correct "root=" boot option; here are the available partitions:
[    0.525886] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    0.527829] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.19.0-25-generic #26~14.04.1-Ubuntu
[ …
Run Code Online (Sandbox Code Playgroud)

google-compute-engine

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

当 SSL 终止并转发时,HAProxy SSL 轮循机制不起作用

我使用以下配置来终止 SSL,以便我可以检查请求、进行 URL 重写、ACL 等,然后将 SSL 流量转发回我的后端服务器。但是,我无法坚持工作。当我只使用“模式 tcp”并执行直接的 tcp 路由时,我可以粘着工作,但是一旦我开始在前端终止 SSL,粘性就会停止工作。

这是我的配置:

frontend https-forward
  bind *:443 ssl crt /etc/haproxy/certs.d/combo.pem

  option http-server-close
  option forwardfor
  reqadd X-Forwarded-Proto:\ https
  reqadd X-Forwarded-Port:\ 443

  capture request header Referrer len 64
  capture request header Content-Length len 10
  capture request header User-Agent len 64

  # set HTTP Strict Transport Security (HTST) header
  rspadd  Strict-Transport-Security:\ max-age=15768000

  # some ACLs and URL rewrites...

  default_backend backstuff

backend backstuff

  log 127.0.0.1 local2 notice

  balance roundrobin
  option ssl-hello-chk
  stick-table type binary len …
Run Code Online (Sandbox Code Playgroud)

haproxy

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